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


C# SAPbouiCOM.SetCellWithoutValidation方法代码示例

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


在下文中一共展示了SAPbouiCOM.SetCellWithoutValidation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: SetSupplyAmtToMatrix

        private void SetSupplyAmtToMatrix(SAPbouiCOM.Form oForm, SAPbouiCOM.Matrix oMatrix, int pRow)
        {
            string strREADCD = FN.GetMatirxCellValue(ref oMatrix, "U_READCD", pRow);
            string strYYYYMM = FN.GetMatirxCellValue(ref oMatrix, "U_YYYYMM", pRow);
            string strMONCNT = FN.GetMatirxCellValue(ref oMatrix, "U_MONCNT", pRow);
            string strPAPERTP = FN.GetRecordsetValue(string.Format("SELECT TOP 1 U_PAPERTP FROM [@KIS_SO00301_HRD] WHERE Code = '{0}' ", strREADCD));

            if (!string.IsNullOrEmpty(strREADCD) && !string.IsNullOrEmpty(strYYYYMM) && !string.IsNullOrEmpty(strPAPERTP))
            {

                string strAMT = FN.GetRecordsetValue(string.Format(" SELECT U_AMT FROM dbo.KIS_FN_GET_REQUEST_HRD ('{0}', '{1}', '{2}') ", strPAPERTP, strYYYYMM, strREADCD));
                decimal dSuppAmt = 0;
                if (!string.IsNullOrEmpty(strAMT))
                {
                    dSuppAmt = Convert.ToDecimal(strAMT) * int.Parse(strMONCNT == "" ? "0" : strMONCNT);
                }
                oMatrix.SetCellWithoutValidation(pRow, "U_SUPAMT", dSuppAmt.ToString());
            }
            else
                oMatrix.SetCellWithoutValidation(pRow, "U_SUPAMT", "0");
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:21,代码来源:KIS_SO0380A_HRD.cs

示例3: SetMonthCountToMatrix

        private void SetMonthCountToMatrix(SAPbouiCOM.Form oForm, SAPbouiCOM.Matrix oMatrix, int pRow)
        {
            string strFRDATE = FN.GetMatirxCellValue(ref oMatrix, "U_FRDATE", pRow);
            string strTODATE = FN.GetMatirxCellValue(ref oMatrix, "U_TODATE", pRow);

            if (!string.IsNullOrEmpty(strFRDATE) && !string.IsNullOrEmpty(strTODATE))
            {
                string strMONCNT = FN.GetRecordsetValue(string.Format("SELECT DATEDIFF(DD, '{0}', '{1}') / 29 ", strFRDATE, strTODATE));
                oMatrix.SetCellWithoutValidation(pRow, "U_MONCNT", strMONCNT);
            }

            SetSupplyAmtToMatrix(oForm, oMatrix, pRow);
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:13,代码来源:KIS_SO0380A_HRD.cs

示例4: SetMatrixValidate

        private void SetMatrixValidate(SAPbouiCOM.Form oForm, SAPbouiCOM.Matrix oMatrix, ItemEvent pVal)
        {
            StringBuilder sb = new StringBuilder();
            string strCode = string.Empty;

            string strCardCode = string.Empty;
            string strCardName = string.Empty;
            string strVatRegNo = string.Empty;
            string strVatGroup = string.Empty;
            string strPerson = string.Empty;
            string strEmail = string.Empty;
            try
            {
                oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.BoRecordset);


                if (pVal.ColUID == "U_READCD" || pVal.ColUID == "U_CENTCD")
                {
                    strCode = FN.GetMatirxCellValue(ref oMatrix, pVal.ColUID, pVal.Row);

                    if (string.IsNullOrEmpty(strCode))
                    {
                        if (pVal.ColUID == "U_READCD")
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_READNM", "");
                        else
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTNM", "");

                        oMatrix.SetCellWithoutValidation(pVal.Row, "U_CARDCD", "");
                        oMatrix.SetCellWithoutValidation(pVal.Row, "U_CARDNM", "");
                        oMatrix.SetCellWithoutValidation(pVal.Row, "U_SAUPNO", "");
                        oMatrix.SetCellWithoutValidation(pVal.Row, "U_VATGRP", "");
                        oMatrix.SetCellWithoutValidation(pVal.Row, "U_PERSON", "");
                        oMatrix.SetCellWithoutValidation(pVal.Row, "U_EMAIL", "");
                    }
                    else
                    {
                        sb.AppendLine(" SELECT T1.CardCode                                                           ");
                        sb.AppendLine("      , T1.CardName                                                           ");
                        sb.AppendLine("      , T1.VATRegNum                                                          ");
                        sb.AppendLine("      , T1.ECVatGroup                                                         ");
                        sb.AppendLine("      , T1.CntctPrsn                                                          ");
                        sb.AppendLine("      , T1.E_Mail                                                             ");
                        if (pVal.ItemUID == "mtx1")
                            sb.AppendLine("   FROM [@KIS_SO0030M_HRD] T0 INNER JOIN OCRD T1 ON T0.U_CARDCD = T1.CardCode ");
                        else
                            sb.AppendLine("   FROM [@KIS_SO0040M_HRD] T0 INNER JOIN OCRD T1 ON T0.U_CARDCD = T1.CardCode ");
                        sb.AppendFormat("  WHERE T0.Code = '{0}'                                            ", strCode);

                        oRS.DoQuery(sb.ToString());
                        if (!oRS.EoF)
                        {
                            //string strNowDate = B1Connections.theAppl.Company.ServerDate;

                            string strNowDate = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
                            strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD);
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_WRITEDT", FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD));


                            strCardCode = oRS.Fields.Item("CardCode").Value.ToString();
                            strCardName = oRS.Fields.Item("CardName").Value.ToString();
                            strVatRegNo = oRS.Fields.Item("VATRegNum").Value.ToString();
                            strVatGroup = "A0";
                            //strPerson = oRS.Fields.Item("CntctPrsn").Value.ToString();
                            //strEmail = oRS.Fields.Item("E_Mail").Value.ToString();

                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CARDCD", strCardCode);
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CARDNM", strCardName);
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_SAUPNO", strVatRegNo);
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_VATGRP", strVatGroup);
                            //oMatrix.SetCellWithoutValidation(pVal.Row, "U_PERSON", strPerson);
                            //oMatrix.SetCellWithoutValidation(pVal.Row, "U_EMAIL", strEmail);
                        }
                    }
                }

                else if (pVal.ColUID == "U_FRDATE")
                {
                    string strDate = FN.GetMatirxCellValue(ref oMatrix, pVal.ColUID, pVal.Row);
                    strDate = DateTimeLibrary.FirstDayOfCurrentMonth(strDate);
                    oMatrix.SetCellWithoutValidation(pVal.Row, "U_FRDATE", FN.SetDateFormatToDB(strDate, FN.eDateType.n_YYYYMMDD));
                    SetMonthCountToMatrix(oForm, oMatrix, pVal.Row);
                }

                else if (pVal.ColUID == "U_TODATE")
                {
                    string strDate = FN.GetMatirxCellValue(ref oMatrix, pVal.ColUID, pVal.Row);
                    strDate = DateTimeLibrary.LastDayOfCurrentMonth(strDate);
                    oMatrix.SetCellWithoutValidation(pVal.Row, "U_TODATE", FN.SetDateFormatToDB(strDate, FN.eDateType.n_YYYYMMDD));
                    SetMonthCountToMatrix(oForm, oMatrix, pVal.Row);
                }
                else if (pVal.ColUID == "U_MONCNT")
                {
                    SetSupplyAmtToMatrix(oForm, oMatrix, pVal.Row);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:100,代码来源:KIS_SO0380A_HRD.cs


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