当前位置: 首页>>代码示例>>C#>>正文


C# SAPbouiCOM.FlushToDataSource方法代码示例

本文整理汇总了C#中SAPbouiCOM.FlushToDataSource方法的典型用法代码示例。如果您正苦于以下问题:C# SAPbouiCOM.FlushToDataSource方法的具体用法?C# SAPbouiCOM.FlushToDataSource怎么用?C# SAPbouiCOM.FlushToDataSource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SAPbouiCOM的用法示例。


在下文中一共展示了SAPbouiCOM.FlushToDataSource方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetMatrixRowNumbering

 /// <summary>
 /// 메트릭스의 행번호를 재정의합니다.
 /// </summary>
 /// <param name="Matrix">Matrix Object</param>
 /// <param name="ColUID">Numbering ColUID</param>
 private void SetMatrixRowNumbering(SAPbouiCOM.Matrix Matrix, string ColUID)
 {
     for (int iLooper = 1; iLooper <= Matrix.VisualRowCount; iLooper++)
     {
         Matrix.SetCellWithoutValidation(iLooper, ColUID, iLooper.ToString());
     }
     Matrix.FlushToDataSource();
 }
开发者ID:wldyd0210,项目名称:TEST,代码行数:13,代码来源:KIS_SD0030A_HRD.cs

示例2: SetMatrixAddRow

        /// <summary>
        /// 메트릭스에서 하나씩 추가할때 사용
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="oMatrix"></param>
        /// <param name="oDB"></param>
        /// <param name="pIndex"></param>
        /// <param name="pDelivCd"></param>
        /// <param name="KeyAlias"></param>
        private void SetMatrixAddRow(ref SAPbouiCOM.Form oForm, ref SAPbouiCOM.Matrix oMatrix, ref SAPbouiCOM.DBDataSource oDB, string pIndex, string pDelivCd, string KeyAlias = "LineId")
        {

            try
            {
                string bindAlias = "";
                string value = string.Empty;

                oMatrix.FlushToDataSource();
                if (KeyAlias != "")
                {
                    if (oDB.Size > 0)
                    {
                        if (oDB.GetValue(KeyAlias, oDB.Size - 1).Trim() == "")
                        {
                            //if (!(oMatrix.VisualRowCount == 0 && oDB.Size == 1))
                            //{
                            //    oDB.InsertRecord(oDB.Size);
                            //}
                        }
                        else
                        {
                            oDB.InsertRecord(oDB.Size);
                        }
                    }
                    else
                    {
                        oDB.InsertRecord(oDB.Size);
                    }
                }
                else
                {
                    oDB.InsertRecord(oDB.Size);
                }

                oDB.Offset = oDB.Size - 1;
                for (int iLooper = 0; iLooper < oMatrix.Columns.Count; iLooper++)
                {
                    if (oMatrix.Columns.Item(iLooper).UniqueID.StartsWith("U_"))
                    {
                        if (oMatrix.Columns.Item(iLooper).DataBind.DataBound == true && !string.IsNullOrEmpty(oMatrix.Columns.Item(iLooper).DataBind.TableName))
                        {
                            bindAlias = oMatrix.Columns.Item(iLooper).DataBind.Alias.ToString();

                            switch (oDB.Fields.Item(bindAlias).Type)
                            {
                                case BoFieldsType.ft_AlphaNumeric:
                                case BoFieldsType.ft_Date:
                                case BoFieldsType.ft_NotDefined:
                                case BoFieldsType.ft_Text:
                                    value = "";
                                    break;

                                case BoFieldsType.ft_Float:
                                case BoFieldsType.ft_Integer:
                                case BoFieldsType.ft_Measure:
                                case BoFieldsType.ft_Percent:
                                case BoFieldsType.ft_Price:
                                case BoFieldsType.ft_Quantity:
                                case BoFieldsType.ft_Rate:
                                case BoFieldsType.ft_ShortNumber:
                                case BoFieldsType.ft_Sum:
                                    value = "0";
                                    break;

                                default:
                                    value = "";
                                    break;
                            }
                            if (bindAlias == "U_IDX")
                            {
                                if (string.IsNullOrEmpty(pIndex) == false)
                                    oDB.SetValue(bindAlias, oDB.Offset, pIndex);
                            }
                            else if (bindAlias == "U_DELVCD")
                            {
                                if (string.IsNullOrEmpty(pDelivCd) == false)
                                    oDB.SetValue(bindAlias, oDB.Offset, pDelivCd);
                            }
                            else if (bindAlias == "U_STATUS")
                            {
                                oDB.SetValue(bindAlias, oDB.Offset, "UO");
                            }
                            else if (bindAlias == "U_ADDR1")
                            {
                                oDB.SetValue(bindAlias, oDB.Offset, oForm.Items.Item("edtADDR1").Specific.value);
                            }
                            else if (bindAlias == "U_ADDR1_D")
                            {
                                oDB.SetValue(bindAlias, oDB.Offset, oForm.Items.Item("edtADDR1_D").Specific.value);
                            }
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SO0030A_HRD.cs

示例3: SetMatrixAddRow

        private void SetMatrixAddRow(ref SAPbouiCOM.Form oForm, ref SAPbouiCOM.Matrix oMatrix, ref SAPbouiCOM.DBDataSource oDB, string KeyAlias = "LineId")
        {
            System.Data.DataRow dr = null; ;
            try
            {
                string bindAlias = "";
                string value = string.Empty;

                oMatrix.FlushToDataSource();

                if (oDB.Size > 0)
                {
                    if (oDB.GetValue(KeyAlias, oDB.Size - 1).Trim() != "")
                    {
                        oDB.InsertRecord(oDB.Size);
                    } 
                }
                else
                {
                    oDB.InsertRecord(oDB.Size);
                }

                oDB.Offset = oDB.Size - 1;
                for (int iLooper = 0; iLooper < oMatrix.Columns.Count; iLooper++)
                {
                    if (oMatrix.Columns.Item(iLooper).UniqueID.StartsWith("U_"))
                    {
                        if (oMatrix.Columns.Item(iLooper).DataBind.DataBound == true && !string.IsNullOrEmpty(oMatrix.Columns.Item(iLooper).DataBind.TableName))
                        {
                            bindAlias = oMatrix.Columns.Item(iLooper).DataBind.Alias.ToString();

                            switch (oDB.Fields.Item(bindAlias).Type)
                            {
                                case BoFieldsType.ft_AlphaNumeric:
                                case BoFieldsType.ft_Date:
                                case BoFieldsType.ft_NotDefined:
                                case BoFieldsType.ft_Text:
                                    value = "";
                                    break;

                                case BoFieldsType.ft_Float:
                                case BoFieldsType.ft_Integer:
                                case BoFieldsType.ft_Measure:
                                case BoFieldsType.ft_Percent:
                                case BoFieldsType.ft_Price:
                                case BoFieldsType.ft_Quantity:
                                case BoFieldsType.ft_Rate:
                                case BoFieldsType.ft_ShortNumber:
                                case BoFieldsType.ft_Sum:
                                    value = "0";
                                    break;

                                default:
                                    value = "";
                                    break;
                            }
                            if (bindAlias == "U_CIDX")
                            {
                                oDB.SetValue(bindAlias, oDB.Offset, oDB.Offset.ToString());                                
                            }
                            else if (bindAlias == "U_PIDX")
                            {
                                oDB.SetValue(bindAlias, oDB.Offset, (-1).ToString());                                
                            }
                            else if (bindAlias == "U_DATE")
                            {
                                string strNow = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
                                oDB.SetValue(bindAlias, oDB.Offset, FN.SetDateFormatToDB(strNow, FN.eDateType.n_YYYYMMDD));                                
                            }
                            else if (bindAlias == "U_ADVRECV")
                            {
                                oDB.SetValue(bindAlias, oDB.Offset, value);                                
                            }
                            else if (bindAlias == "U_ADVSUBT")
                            {
                                oDB.SetValue(bindAlias, oDB.Offset, value);                               
                            }
                            else
                            {
                                oDB.SetValue(bindAlias, oDB.Offset, value);                                
                            }
                        }
                    }
                }                
                oMatrix.LoadFromDataSource();
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText("SetMatrixAddRow " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:91,代码来源:KIS_SO0311A_HRD.cs


注:本文中的SAPbouiCOM.FlushToDataSource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。