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


C# Matrix.Clear方法代码示例

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


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

示例1: DBDataSourcesBindingData

        private void DBDataSourcesBindingData(SAPbouiCOM.Form oForm, System.Data.DataTable dt, int sIndex)
        {
            try
            {
                System.Collections.Hashtable hashTable = new System.Collections.Hashtable();
                SetHashTable_Seq(ref hashTable, dt);

                oMatrix = oForm.Items.Item("mtx").Specific;
                oForm.Freeze(true);
                oMatrix.Clear();

                string U_RDCD = string.Empty;
                string U_DELVCD = string.Empty;
                int seq;


                for (int i = sIndex; i < dt.Rows.Count; i++)
                {
                    oMatrix.AddRow();

                    U_RDCD = dt.Rows[i]["U_RDCD"].ToString();
                    seq = GetHashTable_NextSeq(ref hashTable, U_RDCD);
                    U_DELVCD = U_RDCD + "_" + seq.ToString().PadLeft(4, '0');

                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_RDCD", U_RDCD);
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_RDNM", dt.Rows[i]["U_RDNM"].ToString());
                    //oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_DELVCD", dt.Rows[i]["U_DELVCD"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_DELVCD", U_DELVCD);
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_RDEPT", dt.Rows[i]["U_RDEPT"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_PAPERTP", dt.Rows[i]["U_PAPERTP"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_TYPE", dt.Rows[i]["U_TYPE"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_PAYCD", dt.Rows[i]["U_PAYCD"].ToString());
                    //oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_PAYNM", dt.Rows[i][6].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_TEL", dt.Rows[i]["U_TEL"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ADDR1", dt.Rows[i]["U_ADDR1"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ADDR1_D", dt.Rows[i]["U_ADDR1_D"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ADDR2", dt.Rows[i]["U_ADDR2"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ADDR2_D", dt.Rows[i]["U_ADDR2_D"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_CENTCD", dt.Rows[i]["U_CENTCD"].ToString());
                    //oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_CENTNM", dt.Rows[i][11].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_DELVFR", dt.Rows[i]["U_DELVFR"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_DELVCNT", dt.Rows[i]["U_DELVCNT"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_METHOD", dt.Rows[i]["U_METHOD"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_SDEPT", dt.Rows[i]["U_SDEPT"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_SAILCD", dt.Rows[i]["U_SAILCD"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_SAILNM", dt.Rows[i]["U_SAILNM"].ToString());
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_STATUS", "UO");
                    oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_NOTE", "");
                }

                oMatrix.FlushToDataSource();
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
                //throw;
            }
            finally
            {
                oForm.Freeze(false);
            }

        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:63,代码来源:KIS_SO0060A_HRD.cs

示例2: SetSystemDataTable

        private void SetSystemDataTable(SAPbouiCOM.Form oForm)
        {
            try
            {     
                oDB1_O = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00301_HRD");
                oDB2_O = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00302_HRD");

                oDB1_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
                oDB1_Z.Clear();
                             
                //if (gDs.Tables[oForm.UniqueID + "_Deliver"] != null)
                //    gDs.Tables[oForm.UniqueID + "_Deliver"].Clear();
                //else
                //    gDs.Tables[oForm.UniqueID + "_Deliver"] = SetParameterDataTableSchema(oForm.UniqueID+"Deliver");

                if (gDs.Tables.Contains(oForm.UniqueID + "_Deliver"))
                {
                    gDs.Tables[oForm.UniqueID + "_Deliver"].Rows.Clear();
                }
                else
                {
                    System.Data.DataTable dt = SetParameterDataTableSchema(oForm.UniqueID + "_Deliver");
                    gDs.Tables.Add(dt);
                }
                if (oDB1_O.Size > 0 && oDB1_O.GetValue("U_DELVCD", 0).ToString().Trim() != "")
                {

                    for (int i = 0; i < oDB1_O.Size; i++)
                    {
                        System.Data.DataRow dr;

                        // 데이터 필터를 위해 DataTable에 담는다.
                        dr = gDs.Tables[oForm.UniqueID + "_Deliver"].NewRow();

                        dr["IDX"] = i; // "DataTable 고유ID"
                        dr["LINEID"] = oDB1_O.GetValue("LineId", i);//"원본라인번호";
                        dr["DELVCD"] = oDB1_O.GetValue("U_DELVCD", i).Trim(); //"배달코드";
                        dr["RDEPT"] = oDB1_O.GetValue("U_RDEPT", i).Trim(); //"부서";
                        dr["PAPERTP"] = oDB1_O.GetValue("U_PAPERTP", i).Trim(); //"지종";
                        dr["PAYCD"] = oDB1_O.GetValue("U_PAYCD", i).Trim(); //"요금제코드";
                        dr["PAYNM"] = oDB1_O.GetValue("U_PAYNM", i).Trim(); //"요금제명";
                        dr["TEL"] = oDB1_O.GetValue("U_TEL", i).Trim(); //"연락처";
                        dr["MOBILE"] = oDB1_O.GetValue("U_MOBILE", i).Trim(); //"휴대폰";
                        dr["ADDR1"] = oDB1_O.GetValue("U_ADDR1", i).Trim(); //"주소1";
                        dr["ADDR2"] = oDB1_O.GetValue("U_ADDR2", i).Trim(); //"주소2";
                        dr["ADDR1_D"] = oDB1_O.GetValue("U_ADDR1_D", i).Trim(); //"주소1상세";
                        dr["ADDR2_D"] = oDB1_O.GetValue("U_ADDR2_D", i).Trim(); //"주소2상세";
                        dr["CENTCD"] = oDB1_O.GetValue("U_CENTCD", i).Trim(); //"지국";
                        dr["CENTNM"] = oDB1_O.GetValue("U_CENTNM", i).Trim(); //"지국명";
                        dr["DELVFR"] = oDB1_O.GetValue("U_DELVFR", i).Trim(); //"배달시작일";
                        dr["DELVTO"] = oDB1_O.GetValue("U_DELVTO", i).Trim(); //"배달종료일";
                        dr["DELVCNT"] = oDB1_O.GetValue("U_DELVCNT", i).Trim(); //"배달부수";
                        dr["METHOD"] = oDB1_O.GetValue("U_METHOD", i).Trim(); //"가입방법";
                        dr["SAILCD"] = oDB1_O.GetValue("U_SAILCD", i).Trim(); //"유치자";
                        dr["SAILNM"] = oDB1_O.GetValue("U_SAILNM", i).Trim(); //"유치자";
                        dr["STATUS"] = oDB1_O.GetValue("U_STATUS", i).Trim(); //"배달상태";
                        dr["SDEPT"] = oDB1_O.GetValue("U_SDEPT", i).Trim(); //"유치부서";
                        dr["NOTE"] = oDB1_O.GetValue("U_NOTE", i).Trim(); //"배달상세";

                        dr["JOINDT"] = oDB1_O.GetValue("U_JOINDT", i).Trim(); //"가입일자";
                        dr["CLOSEDT"] = oDB1_O.GetValue("U_CLOSEDT", i).Trim(); //"해지일자";
                        dr["USERSG1"] = oDB1_O.GetValue("U_USERSG1", i).Trim(); //"등록자";
                        dr["READTP"] = oDB1_O.GetValue("U_READTP", i).Trim(); //"독자구분";

                        dr["BTEL1"] = oDB1_O.GetValue("U_BTEL1", i).Trim(); //"분국전화1";
                        dr["BTEL2"] = oDB1_O.GetValue("U_BTEL2", i).Trim(); //"분국전화1";

                        dr["ROWSTATE"] = ""; // 기본: "", 수정: M, 신규: I, 삭제: D 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows.Add(dr);


                        oDB1_Z.InsertRecord(i);

                        oDB1_Z.SetValue("U_NO", i, (i + 1).ToString());//"번호";
                        oDB1_Z.SetValue("U_IDX", i, (i).ToString());//"DataTable 고유ID";
                        oDB1_Z.SetValue("LineId", i, oDB1_O.GetValue("LineId", i));//"원본라인번호";
                        oDB1_Z.SetValue("U_DELVCD", i, oDB1_O.GetValue("U_DELVCD", i).Trim()); //"배달코드";
                        oDB1_Z.SetValue("U_RDEPT", i, oDB1_O.GetValue("U_RDEPT", i).Trim()); //"부서";
                        oDB1_Z.SetValue("U_PAPERTP", i, oDB1_O.GetValue("U_PAPERTP", i).Trim()); //"지종";
                        oDB1_Z.SetValue("U_PAYCD", i, oDB1_O.GetValue("U_PAYCD", i).Trim()); //"요금제코드";
                        oDB1_Z.SetValue("U_PAYNM", i, oDB1_O.GetValue("U_PAYNM", i).Trim()); //"요금제명";
                        oDB1_Z.SetValue("U_TEL", i, oDB1_O.GetValue("U_TEL", i).Trim()); //"연락처";
                        oDB1_Z.SetValue("U_MOBILE", i, oDB1_O.GetValue("U_MOBILE", i).Trim()); //"휴대폰";
                        oDB1_Z.SetValue("U_ADDR1", i, oDB1_O.GetValue("U_ADDR1", i).Trim()); //"주소1";
                        oDB1_Z.SetValue("U_ADDR2", i, oDB1_O.GetValue("U_ADDR2", i).Trim()); //"주소2";
                        oDB1_Z.SetValue("U_ADDR1_D", i, oDB1_O.GetValue("U_ADDR1_D", i).Trim()); //"주소1";
                        oDB1_Z.SetValue("U_ADDR2_D", i, oDB1_O.GetValue("U_ADDR2_D", i).Trim()); //"주소2";
                        oDB1_Z.SetValue("U_CENTCD", i, oDB1_O.GetValue("U_CENTCD", i).Trim()); //"지국";
                        oDB1_Z.SetValue("U_CENTNM", i, oDB1_O.GetValue("U_CENTNM", i).Trim()); //"지국명";
                        oDB1_Z.SetValue("U_DELVFR", i, oDB1_O.GetValue("U_DELVFR", i).Trim()); //"배달시작일";
                        oDB1_Z.SetValue("U_DELVTO", i, oDB1_O.GetValue("U_DELVTO", i).Trim()); //"배달종료일";
                        oDB1_Z.SetValue("U_DELVCNT", i, oDB1_O.GetValue("U_DELVCNT", i).Trim()); //"배달부수";
                        oDB1_Z.SetValue("U_METHOD", i, oDB1_O.GetValue("U_METHOD", i).Trim()); //"가입방법";
                        oDB1_Z.SetValue("U_SAILCD", i, oDB1_O.GetValue("U_SAILCD", i).Trim()); //"유치자";
                        oDB1_Z.SetValue("U_SAILNM", i, oDB1_O.GetValue("U_SAILNM", i).Trim()); //"유치자";
                        oDB1_Z.SetValue("U_STATUS", i, oDB1_O.GetValue("U_STATUS", i).Trim()); //"배달상태";
                        oDB1_Z.SetValue("U_SDEPT", i, oDB1_O.GetValue("U_SDEPT", i).Trim()); //"유치부서";
                        oDB1_Z.SetValue("U_NOTE", i, oDB1_O.GetValue("U_NOTE", i).Trim()); //"배달상세";

                        oDB1_Z.SetValue("U_JOINDT", i, oDB1_O.GetValue("U_JOINDT", i).Trim()); //"가입일자";
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SO0030A_HRD.cs

示例3: GetCostCenterList

        private void GetCostCenterList()
        {
            StringBuilder sb = new StringBuilder();
            SAPbobsCOM.Recordset oRS = null;
            string expression = string.Empty;
            System.Data.DataRow[] foundRows;
            int iRow;
            bool bModify = false;
            try
            {
                oForm.Freeze(true);
                oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_FI0010M_HRD");
                oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_FI00101_HRD");

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx").Specific;
                //oMatrix.LoadFromDataSource();

                oMatrix.Clear();
                FN.SetMatrixIsNullOrEmptDeleteRow(ref oForm, ref oMatrix, "U_PRCCD");

                sDataTable = FN.SapDBDataSourceToSystemDataTable(oDB_1);

                oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);

                sb.Append(" SELECT Code,Name FROM [@KIS_CO0110M]                               \r");

                if (FN.GetItemValue(ref oForm, "edtCOSTFR") != "" && FN.GetItemValue(ref oForm, "edtCOSTTO") != "")
                    sb.Append("    WHERE Code BETWEEN '" + FN.GetItemValue(ref oForm, "edtCOSTFR") + "' AND '" + FN.GetItemValue(ref oForm, "edtCOSTTO") + "' \r");

                B1Connections.theAppl.StatusBar.SetText("불러오기를 시작합니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                oRS.DoQuery(sb.ToString());

                iRow = oMatrix.VisualRowCount;
                if (!oRS.EoF)
                {
                    for (int i = 0; i < oRS.RecordCount; i++)
                    {
                        expression = "U_PRCCD = '" + oRS.Fields.Item("Code").Value.ToString() + "'";
                        foundRows = sDataTable.Select(expression);

                        if (foundRows.Length < 1)
                        {
                            if (iRow != 0)
                                oDB_1.InsertRecord(iRow-1);

                            //oDB_1.SetValue("U_LINENUM", iRow, (iRow+1).ToString());
                            oDB_1.SetValue("U_PRCCD", iRow, oRS.Fields.Item("Code").Value.ToString());
                            oDB_1.SetValue("U_PRCNM", iRow, oRS.Fields.Item("Name").Value.ToString());

                            iRow += 1;
                            bModify = true;
                        }
                        oRS.MoveNext();
                    }
                    if (bModify)
                    {
                        oMatrix.LoadFromDataSource();
                        if (oForm.Mode == BoFormMode.fm_OK_MODE)
                            oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    }
                }
                B1Connections.theAppl.StatusBar.SetText("불러오기가 완료 되었습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터 조회중입니다
            }
            catch (Exception ex)
            {
                oForm.Freeze(false);
                B1Connections.theAppl.StatusBar.SetText("GetCostCenterList " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                if (oRS != null)
                {
                    oForm.Freeze(false);
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oRS);
                    oRS = null;
                }
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:78,代码来源:KIS_FI0010A_HRD.cs

示例4: GetMonth

        private bool GetMonth() 
        {
            int iRow;
            bool bModify = false;
            try
            {
                oForm.Freeze(true);
                oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_FI0020M_HRD");
                oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_FI00201_HRD");

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx").Specific;
                //oMatrix.LoadFromDataSource();

                oMatrix.Clear();
                string Year = oForm.Items.Item("Code").Specific.value.Trim();
                YYYYCode = Year;
                int Month = 1;
                string YYYYMM = "";
                iRow = oMatrix.VisualRowCount;

                for (int i = 0; i < 12; i++)
                {
                    if (Month.ToString().Length == 1)
                    {
                        YYYYMM = Year + "0" + Month.ToString();
                    }
                    else
                    {
                        YYYYMM = Year + Month.ToString();
                    }
                    oDB_1.InsertRecord(iRow);

                    oDB_1.SetValue("U_YYYYMM", iRow, YYYYMM);

                    Month = Month + 1;
                    iRow += 1;
                    bModify = true;
                    if (i == 11)
                        oDB_1.RemoveRecord(iRow);
                }
                if (bModify)
                {
                    oMatrix.LoadFromDataSource();
                }

                //B1Connections.theAppl.StatusBar.SetText("저장이 완료 되었습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터 조회중입니다
            }
            catch (Exception ex)
            {
                oForm.Freeze(false);
                B1Connections.theAppl.StatusBar.SetText("GetCostCenterList " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                return false;
            }
            finally
            {
                oForm.Freeze(false);
                oRS = null;
            }
            return true;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:60,代码来源:KIS_FI0020A_HRD.cs

示例5: SetItemEnabled

        private void SetItemEnabled(SAPbouiCOM.Form oForm)
        {
            string strTransID = string.Empty;
            string strRejTran = string.Empty;
            string strStatus = string.Empty;
            string strAcctCd = string.Empty;
            string strTYPE = string.Empty;
            try
            {
                oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0320T_HRD");
                strTransID = oDB_M.GetValue("U_JDTDOC", 0).Trim();
                strRejTran = oDB_M.GetValue("U_RJDTDOC", 0).Trim();
                strTYPE = oDB_M.GetValue("U_TYPE", 0).Trim();

                oCheckBox = (SAPbouiCOM.CheckBox)oForm.Items.Item("chkACCTIN").Specific;
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx").Specific;

                FN.SetAutoManagedAttribute(ref oForm, "edtDOCNUM,cboTYPE,edtCENTCD,edtCENTNM,cboSTATUS,edtDOCDT,cboMETHOD,cboACCTCD,edtBNKACCT,edtBNKBRCH,edtBNKHOLD,edtAMT,edtJDTDOC,edtRJDTDOC,btnTRAN,btnCANCTR,btnPOPUP,chkACCTIN,mtx", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_All, BoModeVisualBehavior.mvb_False);
                FN.SetAutoManagedAttribute(ref oForm, "edtDOCNUM,cboTYPE,edtCENTCD,edtCENTNM,cboSTATUS,edtDOCDT,cboMETHOD,cboACCTCD,edtBNKACCT,edtBNKBRCH,edtBNKHOLD,edtAMT,chkACCTIN", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Find, BoModeVisualBehavior.mvb_True);


                // 분개처리 상태
                if (string.IsNullOrEmpty(strTransID) == false && string.IsNullOrEmpty(strRejTran))
                {
                    FN.SetAutoManagedAttribute(ref oForm, "btnCANCTR", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Ok, BoModeVisualBehavior.mvb_True);
                }
                // 일반문서상태
                else if (string.IsNullOrEmpty(strTransID))
                {
                    //FN.SetItemEnable(oForm, "btnCANCTR", false);

                    if (oCheckBox.Checked || strTYPE == "O")
                    {
                        //strAcctCd = FN.GetRecordsetValue(" SELECT U_RMK1 FROM [@KIS_AD00201] WHERE Code = 'SO19' AND U_SMLCD = 'U204' ");
                        //oDB_M.SetValue("U_ACCTCD", 0, strAcctCd);

                        FN.SetAutoManagedAttribute(ref oForm, "edtDOCDT,cboMETHOD,cboACCTCD,edtBNKACCT,edtBNKHOLD,edtAMT,btnTRAN,chkACCTIN,cboACCTCD", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Ok, BoModeVisualBehavior.mvb_True);
                        FN.SetAutoManagedAttribute(ref oForm, "cboTYPE,edtCENTCD,edtCENTNM,edtDOCDT,cboMETHOD,edtBNKACCT,edtBNKHOLD,edtAMT,chkACCTIN,cboACCTCD", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Add, BoModeVisualBehavior.mvb_True);

                        oMatrix.Clear();
                        oMatrix.FlushToDataSource();
                    }
                    else
                    {
                        //oDB_M.SetValue("U_ACCTCD", 0, "");
                        FN.SetAutoManagedAttribute(ref oForm, "edtDOCDT,cboMETHOD,cboACCTCD,edtBNKACCT,edtBNKHOLD,mtx,btnPOPUP,btnTRAN,chkACCTIN", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Ok, BoModeVisualBehavior.mvb_True);
                        FN.SetAutoManagedAttribute(ref oForm, "cboTYPE,edtCENTCD,edtCENTNM,edtDOCDT,cboMETHOD,edtBNKACCT,edtBNKHOLD,btnPOPUP,chkACCTIN,mtx", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Add, BoModeVisualBehavior.mvb_True);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:55,代码来源:KIS_SO0320A_HRD.cs

示例6: FindData2

        private void FindData2(SAPbouiCOM.Form oForm)
        {
            
            oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd1").Specific;
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1").Specific));
            SAPbouiCOM.DBDataSource oKIS_HR00203_HRD = oForm.DataSources.DBDataSources.Item("@KIS_HR00203_HRD");
            StringBuilder pQuery = new StringBuilder();
            string sQry = string.Empty;

            oForm.Freeze(true);

            oMatrix.Clear();
            oKIS_HR00203_HRD.Clear();

            oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);

            try
            {

                #region 조회Query
                pQuery.Clear();
                pQuery.AppendLine(" SELECT                                  ");
                pQuery.AppendLine("  U_CHEKER     AS U_CHEKER               ");
                pQuery.AppendLine(" ,U_EMPNO      AS U_EMPNO                ");
                pQuery.AppendLine(" ,U_EMPNM      AS U_EMPNM                ");
                pQuery.AppendLine(" ,U_JIKGBCD    AS U_JIKGBCD              ");
                pQuery.AppendLine(" ,U_JIKCHKCD   AS U_JIKCHKCD             ");
                pQuery.AppendLine(" ,U_DEPTCD     AS U_DEPTCD               ");
                pQuery.AppendLine(" ,U_CHKRATE    AS U_CHKRATE              ");
                pQuery.AppendLine(" FROM [@KIS_HR00203_HRD]                 ");
                pQuery.AppendLine(" WHERE Code = '{0}' AND U_EMPCD <> 'L'   ");
                pQuery.AppendLine(" ORDER BY U_CHEKER                       ");
                sQry = string.Format(pQuery.ToString(), GRIDCODE);
                #endregion

                oRS.DoQuery(sQry);

                B1Connections.theAppl.StatusBar.SetText("데이터 조회중입니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터 조회중입니다


                if (oRS.RecordCount > 0)
                {
                    for (int i = 0; i < oRS.RecordCount; i++)
                    {
                        if (i < oRS.RecordCount)
                        { oKIS_HR00203_HRD.InsertRecord(i); }
                        oKIS_HR00203_HRD.SetValue("U_CHEKER", i, oRS.Fields.Item("U_CHEKER").Value);
                        oKIS_HR00203_HRD.SetValue("U_EMPNO", i, oRS.Fields.Item("U_EMPNO").Value);
                        oKIS_HR00203_HRD.SetValue("U_EMPNM", i, oRS.Fields.Item("U_EMPNM").Value);
                        oKIS_HR00203_HRD.SetValue("U_JIKGBCD", i, oRS.Fields.Item("U_JIKGBCD").Value);
                        oKIS_HR00203_HRD.SetValue("U_JIKCHKCD", i, oRS.Fields.Item("U_JIKCHKCD").Value);
                        oKIS_HR00203_HRD.SetValue("U_DEPTCD", i, oRS.Fields.Item("U_DEPTCD").Value);
                        oKIS_HR00203_HRD.SetValue("U_CHKRATE", i, oRS.Fields.Item("U_CHKRATE").Value);
                        oRS.MoveNext();
                    }
                    oMatrix.LoadFromDataSource();
                    B1Connections.theAppl.StatusBar.SetText("조회완료", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); //조회완료
                }
                else
                {
                    FN.SetMatrixAddRow(ref oForm, ref oMatrix, ref oKIS_HR00203_HRD, FN.RowSelectMode.None, "U_CHEKER");
                    B1Connections.theAppl.StatusBar.SetText("데이터가 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터가 없습니다.
                }

            }
            catch (Exception ex)
            {
                oForm.Freeze(false);
                B1Connections.theAppl.StatusBar.SetText("btnFIND_OnAfterItemPressed " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);

            }
            finally
            {
                oForm.Freeze(false);
                oGrid = null;
                oMatrix = null;
                oRS = null;
                oKIS_HR00203_HRD = null;

            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:81,代码来源:KIS_HR0040B_HRD.cs

示例7: DBDataSourcesBindingData

        private void DBDataSourcesBindingData(SAPbouiCOM.Form oForm, System.Data.DataTable dt, string strFileName)
        {
            try
            {
                //string U_RELDT = B1Connections.diCompany.GetCompanyDate().ToString("yyyy-MM-dd");//임포트 실행일              
                string U_RELDT = B1Connections.diCompany.GetCompanyDate().ToString("yyyyMMdd");//임포트 실행일
                string U_RELUSER = B1Connections.diCompany.UserName;//임포트 실행 사용자


                oMatrix = oForm.Items.Item("mtx").Specific;
                oForm.Freeze(true);

                oMatrix.Clear();
                oMatrix.FlushToDataSource();

                heDataTable.Clear();
                boDataTable.Clear();
                trDataTable.Clear();

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    //oMatrix.AddRow();
                    //oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ERRCD", dt.Rows[i][0].ToString());
                    //oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ERRMSG", dt.Rows[i][0].ToString());

                    string upRowText = dt.Rows[i][0].ToString();
                    string dataType = string.Empty;

                    // dataType - 11 : 헤더, 22 : 바디, 33 : 합계
                    dataType = dt.Rows[i][0].ToString().Substring(0, 2);

                    switch (dataType)
                    {
                        case "11":
                            SetGiroTable(ref heDataTable, upRowText, dataType);
                            break;

                        case "22":
                            SetGiroTable(ref boDataTable, upRowText, dataType);
                            break;

                        case "33":
                            SetGiroTable(ref trDataTable, upRowText, dataType);
                            break;

                        default:
                            break;
                    }
                }

                // 수납자료의 고객관리번호를 Concat
                var linqTable = (from a in boDataTable.AsEnumerable() select new { U_RDNO = "'" + a.Field<string>("0140").Trim() + "'" });
                string output = String.Join(",", linqTable.AsEnumerable().Select(a => a.U_RDNO).ToArray());

                
                #region 유효성 체크 - 지로청구 자료가 삭제된 고객관리번호 표시 (개별입금에서 처리하기로 함)
                DBDataSourcesBindingData(oForm, output.Replace("'", ""));
                #endregion


                // 수납자료의 고객관리번호에 해당하는 청구자료 조회
                //output = "14030000000040204118";
                System.Data.DataTable sKIS_SO01601_HRD = null;
                System.Data.DataTable sKIS_SO0220M_HRD = null;
                sKIS_SO01601_HRD = FN.GetRecordsetToDataTable(string.Format("SELECT * FROM [@KIS_SO01601_HRD] WHERE U_RDNO IN ({0})", output)); // 지로청구 테이블
                sKIS_SO0220M_HRD = FN.GetRecordsetToDataTable(string.Format("SELECT * FROM [@KIS_SO0220M_HRD] WHERE U_RDNO IN ({0})", output)); // 지로개별인쇄 테이블


                #region 헤더
                string U_GIRONO = heDataTable.Rows[0]["0020"].ToString().Substring(2, 7);

                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_TRNSDT", heDataTable.Rows[0]["0050"].ToString());
                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_RELUSER", U_RELUSER);
                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_RELDT", U_RELDT);
                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_FILENM", Path.GetFileName(strFileName));
                //FN.SetItemValue(ref oForm, "edtTRNSDT", heDataTable.Rows[0]["0050"].ToString());    //이체일자
                //FN.SetItemValue(ref oForm, "edtRELUSER", U_RELUSER);                                //실행자
                //FN.SetItemValue(ref oForm, "edtRELDT", U_RELDT);                                    //실행일
                //FN.SetItemValue(ref oForm, "edtFILENM", Path.GetFileName(strFileName));             //업로드파일
                #endregion


                #region 바디

                string U_RDNO = string.Empty;
                string U_DEPAMT = string.Empty;
                string U_CMMAMT = string.Empty;
                string U_DEPDT = string.Empty;
                string U_ERRCD = string.Empty;
                string U_ERRMSG = string.Empty;
                string U_PREQYM = string.Empty;
                string U_CENTGBN = string.Empty;
                string U_BPPER = string.Empty;

                int U_NOMCNT_S = 0;
                int U_UNSCNT_S = 0;
                int U_TOTCNT_S = boDataTable.Rows.Count;

                int U_NOMAMT_S = 0;
                int U_UNSAMT_S = 0;
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SO0170A_HRD.cs


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