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


C# DBDataSource.InsertRecord方法代码示例

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


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

示例1: FindData

        private void FindData(SAPbouiCOM.Form oForm)
        {
            string strExpr = string.Empty;
            string strSort = string.Empty;

            /* 조회조건 */
            string strF_DEPT = string.Empty;    // 구독부서
            string strF_TEL = string.Empty;     // 전화번호
            string strF_ADDR = string.Empty;    // 주소
            string strF_CENTER = string.Empty;  // 지국(분국)
            string strF_STATUS = string.Empty;  // 상태


            System.Data.DataRow[] findRows = null;
            StringBuilder sb = new StringBuilder();
            int i = 0;

            try
            {
                /*조회조건 값 가져오기 */
                oUDS = oForm.DataSources.UserDataSources;

                strF_DEPT = oUDS.Item("edtF_RDEPT").Value;
                strF_TEL = oUDS.Item("edtF_TEL").Value;
                strF_ADDR = oUDS.Item("edtF_ADDR").Value;
                strF_CENTER = oUDS.Item("edtF_CENT").Value;
                strF_STATUS = oUDS.Item("cboF_STATU").Value;

                oDB1_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
                oDB1_Z.Clear();

                sb.Append(" 1 = 1                               ");
                if (!string.IsNullOrEmpty(strF_DEPT)) //구독부서
                    sb.AppendFormat(" AND RDEPT LIKE '%{0}%'         ", strF_DEPT);
                if (!string.IsNullOrEmpty(strF_TEL)) //전화번호
                    sb.AppendFormat(" AND TEL LIKE '%{0}%'           ", strF_TEL);
                if (!string.IsNullOrEmpty(strF_ADDR)) //주소
                    sb.AppendFormat(" AND (ADDR1 LIKE '%{0}%' OR ADDR1_D LIKE '%{0}%' OR ADDR2 LIKE '%{0}%' OR ADDR2_D LIKE '%{0}%' )  ", strF_ADDR);
                if (!string.IsNullOrEmpty(strF_CENTER)) //지국
                    sb.AppendFormat(" AND CENTNM LIKE '%{0}%'        ", strF_CENTER);
                if (!string.IsNullOrEmpty(strF_STATUS)) //상태
                    sb.AppendFormat(" AND STATUS = '{0}'        ", strF_STATUS);

                // 정렬 기준
                findRows = gDs.Tables[oForm.UniqueID + "_Deliver"].Select(sb.ToString(), "LINEID ASC");

                foreach (System.Data.DataRow dr in findRows)
                {
                    oDB1_Z.InsertRecord(i);

                    oDB1_Z.SetValue("U_NO", i, (i + 1).ToString());
                    oDB1_Z.SetValue("U_IDX", i, dr["IDX"].ToString()); //"데이터테이블 고유번호 IDX";
                    oDB1_Z.SetValue("LineId", i, dr["LineId"].ToString());//"원본라인번호";
                    oDB1_Z.SetValue("U_DELVCD", i, dr["DELVCD"].ToString()); //"배달코드";
                    oDB1_Z.SetValue("U_RDEPT", i, dr["RDEPT"].ToString()); //"부서";
                    oDB1_Z.SetValue("U_PAPERTP", i, dr["PAPERTP"].ToString()); //"지종";
                    oDB1_Z.SetValue("U_READTP", i, dr["READTP"].ToString()); //"독자구분";
                    oDB1_Z.SetValue("U_PAYCD", i, dr["PAYCD"].ToString()); //"요금제코드";
                    oDB1_Z.SetValue("U_PAYNM", i, dr["PAYNM"].ToString()); //"요금제명";
                    oDB1_Z.SetValue("U_TEL", i, dr["TEL"].ToString()); //"연락처";
                    oDB1_Z.SetValue("U_MOBILE", i, dr["MOBILE"].ToString()); //"휴대폰";
                    oDB1_Z.SetValue("U_ADDR1", i, dr["ADDR1"].ToString()); //"주소1";
                    oDB1_Z.SetValue("U_ADDR2", i, dr["ADDR2"].ToString()); //"주소2";
                    oDB1_Z.SetValue("U_ADDR1_D", i, dr["ADDR1_D"].ToString()); //"주소1상세";
                    oDB1_Z.SetValue("U_ADDR2_D", i, dr["ADDR2_D"].ToString()); //"주소2상세";
                    oDB1_Z.SetValue("U_CENTCD", i, dr["CENTCD"].ToString()); //"지국";
                    oDB1_Z.SetValue("U_CENTNM", i, dr["CENTNM"].ToString()); //"지국명";
                    oDB1_Z.SetValue("U_DELVFR", i, FN.SetDateFormatToDB(dr["DELVFR"].ToString(), FN.eDateType.n_YYYYMMDD)); //"배달시작일";
                    oDB1_Z.SetValue("U_DELVTO", i, FN.SetDateFormatToDB(dr["DELVTO"].ToString(), FN.eDateType.n_YYYYMMDD)); //"배달종료일";
                    oDB1_Z.SetValue("U_DELVCNT", i, dr["DELVCNT"].ToString()); //"배달부수";
                    oDB1_Z.SetValue("U_METHOD", i, dr["METHOD"].ToString()); //"가입방법";
                    oDB1_Z.SetValue("U_SAILCD", i, dr["SAILCD"].ToString()); //"유치자";
                    oDB1_Z.SetValue("U_SAILNM", i, dr["SAILNM"].ToString()); //"유치자";
                    oDB1_Z.SetValue("U_SDEPT", i, dr["SDEPT"].ToString()); //"유치부서";
                    oDB1_Z.SetValue("U_NOTE", i, dr["NOTE"].ToString()); //"배달상세";
                    oDB1_Z.SetValue("U_STATUS", i, dr["STATUS"].ToString()); //"배달상태";

                    oDB1_Z.SetValue("U_JOINDT", i, FN.SetDateFormatToDB(dr["JOINDT"].ToString(), FN.eDateType.n_YYYYMMDD)); //"가입일자";
                    oDB1_Z.SetValue("U_CLOSEDT", i, FN.SetDateFormatToDB(dr["CLOSEDT"].ToString(), FN.eDateType.n_YYYYMMDD)); //"중지일자";

                    oDB1_Z.SetValue("U_USERSG1", i, dr["USERSG1"].ToString()); //"등록자";

                    oDB1_Z.SetValue("U_BTEL1", i, dr["BTEL1"].ToString()); //"분국전화1";
                    oDB1_Z.SetValue("U_BTEL2", i, dr["BTEL2"].ToString()); //"분국전화1";

                    i += 1;
                }

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
                oMatrix.LoadFromDataSource();
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                findRows = null;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:100,代码来源:KIS_SO0030A_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: FindSubData

        private void FindSubData(SAPbouiCOM.Form oForm, int pRowIdx, string Type = "")
        {
            string strDeliveryCode = string.Empty;
            string strExpr = string.Empty;
            string strSort = string.Empty;
            System.Data.DataRow[] findRows = null;
            StringBuilder sb = new StringBuilder();
            int i = 0;

            try
            {
                oForm.Freeze(true);
                oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));

                oDB2_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00302Z_HRD");
                oDB2_Z.Clear();

                if (oMatrix.VisualRowCount > 0)
                {

                    strDeliveryCode = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pRowIdx);

                    sb.Append(" 1 = 1                                   ");
                    if (!string.IsNullOrEmpty(strDeliveryCode))
                    {
                        sb.AppendFormat(" AND DELVCD = '{0}'  ", strDeliveryCode);
                    }
                    if (Type == "")
                    {
                        sb.AppendFormat(" AND DELVCD = '{0}'  ", strDeliveryCode);
                        sFindTY = "F";
                    }
                    else
                    {
                        sFindTY = "";
                    }

                    findRows = gDs.Tables[oForm.UniqueID + "_Call"].Select(sb.ToString(), "IDX DESC");
                    oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;

                    foreach (System.Data.DataRow dr in findRows)
                    {
                        oDB2_Z.InsertRecord(i);

                        oDB2_Z.SetValue("U_NO", i, (i + 1).ToString());
                        oDB2_Z.SetValue("U_IDX", i, dr["IDX"].ToString());//"데이터테이블 고유번호 IDX";
                        oDB2_Z.SetValue("LineId", i, dr["LINEID"].ToString());//"원본라인번호";
                        oDB2_Z.SetValue("U_DELVCD", i, dr["DELVCD"].ToString());//"배달코드"
                        oDB2_Z.SetValue("U_CALLTP", i, dr["CALLTP"].ToString());//"콜유형"
                        oDB2_Z.SetValue("U_MEMO", i, dr["MEMO"].ToString());//"접수내용"
                        oDB2_Z.SetValue("U_RECVID", i, dr["RECVID"].ToString());//"접수자ID"
                        oDB2_Z.SetValue("U_RECVNM", i, dr["RECVNM"].ToString());//"접수자명"
                        oDB2_Z.SetValue("U_RECVDT", i, dr["RECVDT"].ToString());//"접수일자"
                        oDB2_Z.SetValue("U_RECVTI", i, dr["RECVTI"].ToString());//"접수시간"
                        oDB2_Z.SetValue("U_PROCID", i, dr["PROCID"].ToString());//"처리자ID"
                        oDB2_Z.SetValue("U_PROCNM", i, dr["PROCNM"].ToString());//"처리자명"
                        oDB2_Z.SetValue("U_PROCDT", i, dr["PROCDT"].ToString());//"처리일자"
                        oDB2_Z.SetValue("U_PROSTAT", i, dr["PROSTAT"].ToString());//"처리상태"

                        i += 1;
                    }


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

                    //접수자 ID와 로그인 아이디가 다를경우 수정불가
                    for (int j = 0; j < oMatrix.VisualRowCount; j++)
                    {
                        if ((oMatrix.GetCellSpecific("U_RECVID", j + 1).Value.Trim() == B1Connections.diCompany.UserName.ToString()) && (sFindTY == "F"))
                        {
                            oMatrix.CommonSetting.SetCellEditable(j + 1, gCallTp_IDX, true);
                            oMatrix.CommonSetting.SetCellEditable(j + 1, gComment_IDX, true);
                        }
                        else
                        {
                            oMatrix.CommonSetting.SetCellEditable(j + 1, gCallTp_IDX, false);
                            oMatrix.CommonSetting.SetCellEditable(j + 1, gComment_IDX, false);
                        }

                    }

                }
            }
            catch (Exception)
            {
                oForm.Freeze(false);
                throw;
            }
            finally
            {
                oForm.Freeze(false);
                findRows = null;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:95,代码来源:KIS_SO0030A_HRD.cs

示例5: 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


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