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


C# Matrix.LoadFromDataSource方法代码示例

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


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

示例1: SetTR

        private void SetTR(string TYPE)
        {
            bool bModify = false;
            SAPbobsCOM.Recordset oRS = null;
            oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
            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.FlushToDataSource();
                string strNowDate = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
                strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.p_YYYYMMDD);

                string Code = string.Empty;
                string YYYYMM = string.Empty;
                string sQry = string.Empty;

                if (SelectRow != -1)
                {
                    if (TYPE == "TR")
                    {
                        Code = oForm.Items.Item("Code").Specific.value.Trim();
                        YYYYMM = oDB_1.GetValue("U_YYYYMM", SelectRow).ToString().Trim();
                        sQry = " EXEC KIS_SP_FI0020B1_HRD '" + YYYYMM + "'";
                        oRS.DoQuery(sQry);
                        if (oRS.RecordCount == 0)
                        {
                            oDB_1.SetValue("U_UPDATEDT", SelectRow, strNowDate.Replace(".", ""));
                            oDB_1.SetValue("U_STATUS", SelectRow, "Y");
                        }
                        sQry = "UPDATE [@KIS_FI00201_HRD] SET U_UPDATEDT = '" + strNowDate.Replace(".", "") + "' ,U_STATUS = 'Y' WHERE Code = '" + Code + "' AND U_YYYYMM = '" + YYYYMM + "'";
                        oRS.DoQuery(sQry);

                    }
                    else
                    {
                        Code = oForm.Items.Item("Code").Specific.value.Trim();
                        YYYYMM = oDB_1.GetValue("U_YYYYMM", SelectRow).ToString().Trim();
                        sQry = " DELETE FROM [@KIS_FI0020B1_HRD] WHERE U_YYYYMM = '" + YYYYMM + "'";
                        sQry = sQry + " DELETE FROM [@KIS_FI0020B2_HRD] WHERE U_YYYYMM = '" + YYYYMM + "'";
                        oRS.DoQuery(sQry);
                        if (oRS.RecordCount == 0)
                        {
                            oDB_1.SetValue("U_UPDATEDT", SelectRow, "");
                            oDB_1.SetValue("U_STATUS", SelectRow, "N");
                        }
                        sQry = "UPDATE [@KIS_FI00201_HRD] SET U_UPDATEDT = NULL ,U_STATUS = 'N' WHERE Code = '" + Code + "' AND U_YYYYMM = '" + YYYYMM + "'";
                        oRS.DoQuery(sQry);
                    }
                    bModify = true;
                }

                if (bModify)
                {
                    oMatrix.LoadFromDataSource();
                    SelectRow = -1;
                }

                B1Connections.theAppl.StatusBar.SetText("배치가 적용되었습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터 조회중입니다
            }
            catch (Exception ex)
            {
                oForm.Freeze(false);
                B1Connections.theAppl.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);

            }
            finally
            {
                oForm.Freeze(false);
                oRS = null;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:77,代码来源:KIS_FI0020A_HRD.cs

示例2: SetSystemDataTable


//.........这里部分代码省略.........

                        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()); //"가입일자";
                        oDB1_Z.SetValue("U_CLOSEDT", i, oDB1_O.GetValue("U_CLOSEDT", i).Trim()); //"해지일자";
                        oDB1_Z.SetValue("U_USERSG1", i, oDB1_O.GetValue("U_USERSG1", i).Trim()); //"등록자";
                        oDB1_Z.SetValue("U_READTP", i, oDB1_O.GetValue("U_READTP", i).Trim()); //"등록자";     

                        oDB1_Z.SetValue("U_BTEL1", i, oDB1_O.GetValue("U_BTEL1", i).Trim()); //"분국전화1";
                        oDB1_Z.SetValue("U_BTEL2", i, oDB1_O.GetValue("U_BTEL2", i).Trim()); //"분국전화2";    
                    }
                }

                //if (gDs.Tables[oForm.UniqueID + "_Call"] != null)
                //    gDs.Tables[oForm.UniqueID + "_Call"].Clear();
                //else
                //    gDs.Tables[oForm.UniqueID + "_Call"] = SetParameterDataTableSchema(oForm.UniqueID+"Call");
                if (gDs.Tables.Contains(oForm.UniqueID + "_Call"))
                {
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows.Clear();
                }
                else
                {
                    System.Data.DataTable dt = SetParameterDataTableSchema(oForm.UniqueID + "_Call");
                    gDs.Tables.Add(dt);
                }

                if (oDB2_O.Size > 0 && oDB2_O.GetValue("U_DELVCD", 0).ToString().Trim() != "")
                {
                    for (int i = 0; i < oDB2_O.Size; i++)
                    {
                        System.Data.DataRow dr;

                        // 데이터 필터를 위해 DataTable에 담는다.
                        dr = gDs.Tables[oForm.UniqueID + "_Call"].NewRow();
                        dr["IDX"] = i; //"DataTable 고유ID";
                        dr["LINEID"] = oDB2_O.GetValue("LineId", i);//"원본라인번호";
                        dr["DELVCD"] = oDB2_O.GetValue("U_DELVCD", i).Trim(); //"배달코드"
                        dr["CALLTP"] = oDB2_O.GetValue("U_CALLTP", i).Trim(); //"콜유형"
                        dr["MEMO"] = oDB2_O.GetValue("U_MEMO", i).Trim(); //"접수내용"
                        dr["RECVID"] = oDB2_O.GetValue("U_RECVID", i).Trim(); //"접수자ID"
                        dr["RECVNM"] = oDB2_O.GetValue("U_RECVNM", i).Trim(); //"접수자명"
                        dr["RECVDT"] = oDB2_O.GetValue("U_RECVDT", i).Trim(); //"접수일자"
                        dr["RECVTI"] = oDB2_O.GetValue("U_RECVTI", i).Trim(); //"접수시간"
                        dr["RECVTI"] = oDB2_O.GetValue("U_RECVTI", i).Trim(); //"접수시간"
                        dr["PROCID"] = oDB2_O.GetValue("U_PROCID", i).Trim(); //"처리자ID"
                        dr["PROCNM"] = oDB2_O.GetValue("U_PROCNM", i).Trim(); //"처리자명"
                        dr["PROCDT"] = oDB2_O.GetValue("U_PROCDT", i).Trim(); //"처리일자"
                        dr["PROSTAT"] = oDB2_O.GetValue("U_PROSTAT", i).Trim(); //"처리상태"
                        dr["ROWSTATE"] = ""; // 기본: "", 수정: M, 신규: I, 삭제: D 
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows.Add(dr);
                    }
                }
                //else
                //{
                //    gDs.Tables[oForm.UniqueID + "_Call"].Rows.Clear();
                //}


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

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

                // 데이터 로드하면 메트릭스 선택된행 값 초기화 함.(중요)
                gDeliverySelect = -1;
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SO0030A_HRD.cs

示例3: SetDBDataSourceCopy_Line

        /// <summary>
        /// 광고수주오더의 DBDatasource 정보를 광고매출확정 DBdataSource에 복제합니다.(라인)
        /// </summary>
        /// <param name="oKIS_SD00301_HRD">광고주수오더 행 DBDataSource</param>
        /// <param name="oKIS_SD00501_HRD">광고매출확정 행 DBDataSource</param>
        private void SetDBDataSourceCopy_Line(SAPbouiCOM.DBDataSource oKIS_SD00301_HRD, SAPbouiCOM.DBDataSource oKIS_SD00501_HRD)
        {
            try
            {
                List<string> list_KIS_SD00501_HRD = new List<string>();

                for (int iLooper = 0; iLooper < oKIS_SD00501_HRD.Fields.Count; iLooper++)
                {
                    string FieldName = oKIS_SD00501_HRD.Fields.Item(iLooper).Name;
                    //사용자 정의 필드만 복사 대상필드 리스트에 추가
                    if (FieldName.StartsWith("U_"))
                    {
                        list_KIS_SD00501_HRD.Add(oKIS_SD00501_HRD.Fields.Item(iLooper).Name);
                    }
                }

                //라인
                int iCount = 0;
                for (int jLooper = 0; jLooper < oKIS_SD00301_HRD.Size; jLooper++)
                {
                    oKIS_SD00301_HRD.Offset = jLooper;

                    if (oKIS_SD00501_HRD.Size - 1 < iCount)
                    {
                        oKIS_SD00501_HRD.InsertRecord(oKIS_SD00501_HRD.Size);
                    }

                    oKIS_SD00501_HRD.Offset = iCount;

                    //행상태가 미결인 것만 가져오기
                    if (oKIS_SD00301_HRD.GetValue("U_STATUS", oKIS_SD00301_HRD.Offset).Trim() == "O")
                    {
                        iCount++;
                    }
                    else
                    {
                        continue;
                    }

                    //컬럼
                    for (int iLooper = 0; iLooper < oKIS_SD00301_HRD.Fields.Count; iLooper++)
                    {
                        string FieldName = oKIS_SD00301_HRD.Fields.Item(iLooper).Name;

                        if (list_KIS_SD00501_HRD.Contains(FieldName))
                        {
                            switch (FieldName)
                            {
                                case "U_AMT":
                                    oKIS_SD00501_HRD.SetValue(FieldName, oKIS_SD00501_HRD.Offset, oKIS_SD00301_HRD.GetValue("U_OPENAMT", oKIS_SD00301_HRD.Offset).Trim());
                                    break;
                                case "U_BTYPE"://기준문서유형
                                    oKIS_SD00501_HRD.SetValue(FieldName, oKIS_SD00501_HRD.Offset, oKIS_SD00301_HRD.GetValue("Object", oKIS_SD00301_HRD.Offset).Trim());
                                    break;
                                case "U_BENTRY"://기준문서엔트리
                                    oKIS_SD00501_HRD.SetValue(FieldName, oKIS_SD00501_HRD.Offset, oKIS_SD00301_HRD.GetValue("DocEntry", oKIS_SD00301_HRD.Offset).Trim());
                                    break;
                                case "U_BLINEID"://기준문서 행ID
                                    oKIS_SD00501_HRD.SetValue(FieldName, oKIS_SD00501_HRD.Offset, oKIS_SD00301_HRD.GetValue("LineId", oKIS_SD00301_HRD.Offset).Trim());
                                    break;
                                case "U_TTYPE":
                                case "U_TENTRY":
                                case "U_TLINEID":
                                    oKIS_SD00501_HRD.SetValue(FieldName, oKIS_SD00501_HRD.Offset, "");
                                    break;
                                default:
                                    oKIS_SD00501_HRD.SetValue(FieldName, oKIS_SD00501_HRD.Offset, oKIS_SD00301_HRD.GetValue(FieldName, oKIS_SD00301_HRD.Offset).Trim());
                                    break;
                            }

                        }
                    }
                }
                oMatrix = oForm.Items.Item("mtx1").Specific;
                oMatrix.LoadFromDataSource();

                //분할된 미결금액이 있을지도 모르니까, 매출금액 기준으로 다시 재계산 시작
                for (int iLooper = 1; iLooper < oMatrix.VisualRowCount; iLooper++)
                {
                    SetCalc("U_AMT", iLooper);
                }

                SetMatrixCalc_Sum();

                list_KIS_SD00501_HRD = null;
            }
            catch (Exception)
            {

                throw;
            }

        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:98,代码来源:KIS_SD0050A_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: DataToDbDataSource_CALL

        private bool DataToDbDataSource_CALL(SAPbouiCOM.Form oForm)
        {
            bool rtnValue = false;
            try
            {
                oDB2_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00302_HRD");
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;

                /*
                // 1. 메트릭스 삭제대상 삭제 적용
                var objDelete = from row in gDs.Tables[oForm.UniqueID + "_Call"].AsEnumerable()
                                where row.Field<string>("ROWSTATE") == "D"
                                select new
                                {
                                    vIDX = row.Field<Int32>("IDX") + 1
                                };

                foreach (var itemSub in objDelete)
                {
                    //삭제할것들 선택한다.
                    oMatrix.SelectRow(itemSub.vIDX, true, true);
                }

                // 선택된 Rows를 삭제한다.
                int iSelectIdx = 0;

                while (iSelectIdx != -1)
                {
                    iSelectIdx = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
                    if (iSelectIdx != -1)
                        oMatrix.DeleteRow(iSelectIdx);
                }
                if (objDelete.Count() > 0)
                    oMatrix.FlushToDataSource();

                 * */

                var objModify = from row in gDs.Tables[oForm.UniqueID + "_Call"].AsEnumerable()
                                where row.Field<string>("ROWSTATE") == "M" || row.Field<string>("ROWSTATE") == "I"
                                orderby row.Field<Int32>("IDX") descending                         
                                select new
                                {
                                    vIDX = row.Field<Int32>("IDX")
                                    ,
                                    vDELVCD = row.Field<string>("DELVCD")
                                    ,
                                    vCALLTP = row.Field<string>("CALLTP")
                                    ,
                                    vMEMO = row.Field<string>("MEMO")
                                    ,
                                    vRECVID = row.Field<string>("RECVID")
                                    ,
                                    vRECVNM = row.Field<string>("RECVNM")
                                    ,
                                    vRECVDT = row.Field<string>("RECVDT")
                                    ,
                                    vRECVTI = row.Field<string>("RECVTI")
                                    ,
                                    vPROCID = row.Field<string>("PROCID")
                                    ,
                                    vPROCNM = row.Field<string>("PROCNM")
                                    ,
                                    vPROCDT = row.Field<string>("PROCDT")
                                    ,
                                    vPROSTAT = row.Field<string>("PROSTAT")
                                    ,
                                    vROWSTATE = row.Field<string>("ROWSTATE")

                                };

                foreach (var itemSub in objModify)
                {

                    if (itemSub.vROWSTATE == "I")
                        SetDbDataSourceAddRow(ref oForm, ref oMatrix, ref oDB2_O, "U_DELVCD");

                    oDB2_O.SetValue("U_DELVCD", itemSub.vIDX, itemSub.vDELVCD);
                    oDB2_O.SetValue("U_CALLTP", itemSub.vIDX, itemSub.vCALLTP);
                    oDB2_O.SetValue("U_MEMO", itemSub.vIDX, itemSub.vMEMO);
                    oDB2_O.SetValue("U_RECVID", itemSub.vIDX, itemSub.vRECVID);
                    oDB2_O.SetValue("U_RECVNM", itemSub.vIDX, itemSub.vRECVNM);
                    oDB2_O.SetValue("U_RECVDT", itemSub.vIDX, itemSub.vRECVDT);
                    oDB2_O.SetValue("U_RECVTI", itemSub.vIDX, itemSub.vRECVTI);
                    oDB2_O.SetValue("U_PROCID", itemSub.vIDX, itemSub.vPROCID);
                    oDB2_O.SetValue("U_PROCNM", itemSub.vIDX, itemSub.vPROCNM);
                    oDB2_O.SetValue("U_PROCDT", itemSub.vIDX, itemSub.vPROCDT);
                    oDB2_O.SetValue("U_PROSTAT", itemSub.vIDX, itemSub.vPROSTAT);

                }
                if (objModify.Count() > 0)
                    oMatrix.LoadFromDataSource();

                rtnValue = true;
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:100,代码来源:KIS_SO0030A_HRD.cs

示例6: GetDataLoad

        private void GetDataLoad(SAPbouiCOM.Form oForm)
        {
            string strYYYYMM = oForm.DataSources.UserDataSources.Item("U_YYYYMM").Value.Trim();
            string strCENTCD = oForm.DataSources.UserDataSources.Item("U_CENTCD").Value.Trim();
            string strCENTNM = oForm.DataSources.UserDataSources.Item("U_CENTNM").Value.Trim();
            string strBENTRY = oForm.DataSources.UserDataSources.Item("U_BENTRY").Value.Trim();

            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0420T_HRD");
            oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_SO04201_HRD");

            //헤더데이터를 조회
            QueryWithConditions_MASTER(ref oDB_M, strYYYYMM, strCENTCD);
            if (oDB_M.Size > 0)
            {
                string strDocEntry = oDB_M.GetValue("DocEntry", 0).Trim();
                //헤더를 기준으로 라인데이터 조회
                QueryWithConditions(ref oDB_1, "DocEntry", strDocEntry);
                oForm.Mode = BoFormMode.fm_OK_MODE;

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx").Specific;
                oMatrix.LoadFromDataSource();
            }
            else
            {
                string strSTATUS = oForm.DataSources.UserDataSources.Item("U_STATUS").Value.Trim();
                if (strSTATUS == "P")
                {
                    // 아무것도 없는 마스터에 값을 입력할려고 하면 오류 발생 
                    // 폼 모드 Add모드로 강제로 전환 하고 데이터 입력해야함.
                    oForm.Mode = BoFormMode.fm_ADD_MODE;
                }
                oDB_M.SetValue("U_YYYYMM", 0, strYYYYMM);
                oDB_M.SetValue("U_CENTCD", 0, strCENTCD);
                oDB_M.SetValue("U_CENTNM", 0, strCENTNM);
                oDB_M.SetValue("U_BENTRY", 0, strBENTRY);
                oDB_M.SetValue("U_BTYPE", 0, "KIS_SO0310_HRD");
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:38,代码来源:KIS_SO0311A_HRD.cs

示例7: ET_mtx1_AFChooseFromList

        public virtual void ET_mtx1_AFChooseFromList(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1").Specific));
            // ADD YOUR ACTION CODE HERE ...
            SAPbouiCOM.DataTable oDataTable = null;

            oDataTable = FN.GetCFLSelectedObjects(pVal);

            SAPbouiCOM.DBDataSource oKIS_SD00301_HRD = oForm.DataSources.DBDataSources.Item("@KIS_SD00301_HRD");

            string edtORDERRA = ((SAPbouiCOM.EditText)oForm.Items.Item("edtORDERRA").Specific).Value;
            string edtBPRATE = ((SAPbouiCOM.EditText)oForm.Items.Item("edtBPRATE").Specific).Value;

            try
            {
                if (oDataTable != null)
                {
                    oMatrix.FlushToDataSource();

                    int iRow = pVal.Row - 1;

                    switch (pVal.ColUID)
                    {
                        case "U_ITMGRPCD":
                        case "U_ITMGRPNM":
                            for (int iLooper = 0; iLooper < oDataTable.Rows.Count; iLooper++)
                            {
                                if (oKIS_SD00301_HRD.Size - 1 < iRow)
                                {
                                    oKIS_SD00301_HRD.InsertRecord(oKIS_SD00301_HRD.Size);
                                }

                                oKIS_SD00301_HRD.Offset = iRow;

                                oKIS_SD00301_HRD.SetValue("U_ITMGRPCD", oKIS_SD00301_HRD.Offset, oDataTable.GetValue("Code", iLooper).ToString());
                                oKIS_SD00301_HRD.SetValue("U_ITMGRPNM", oKIS_SD00301_HRD.Offset, oDataTable.GetValue("Name", iLooper).ToString());
                                //01.우선순위 로드.
                                oMatrix.LoadFromDataSource();

                                //02.실수주자 수수료 계산
                                oMatrix.SetCellWithoutValidation(iRow +1, "U_ORDERRAT", edtORDERRA);
                                SetCalc("U_ORDERRAT", iRow + 1);
                                //02.대행사 수수료 계산
                                oMatrix.SetCellWithoutValidation(iRow + 1, "U_BPRATE", edtBPRATE);
                                SetCalc("U_BPRATE", iRow + 1);

                                iRow++;
                            }

                            break;
                        default:
                            break;
                    }
                    
                    //행추가
                    //FN.SetMatrixAddRow(ref oForm, ref oMatrix, ref oKIS_SD00301, FN.RowSelectMode.CellClick, "U_ITMGRPCD");
                    //SetMatrixColumnVATGRP(gl_U_VATCD, gl_U_VATCDBP);
                    //SetMatrixRowNumbering(oMatrix, "U_LINENUM");

                    SetMatrixAddRow(FN.RowSelectMode.None);
                    SetMatrixCalc_Sum();

                    if (oForm.Mode == BoFormMode.fm_OK_MODE)
                        oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oKIS_SD00301_HRD = null;
                oDataTable = null;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:77,代码来源:KIS_SD0030A_HRD.cs

示例8: BeforeSave

        /// <summary>
        /// 저장 전에 필수 항목을 체크 합니다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <returns></returns>
        private bool BeforeSave(SAPbouiCOM.Form oForm)
        {
            SAPbouiCOM.DBDataSource oKIS_SO00401_HRD = oForm.DataSources.DBDataSources.Item("@KIS_SO00401_HRD");

            try
            {
                oMatrix = oForm.Items.Item("mtx1").Specific;

                oMatrix.FlushToDataSource();
                FN.SetDBDataSourceDeleteRow(ref oKIS_SO00401_HRD, "U_CENTCD");
                oMatrix.LoadFromDataSource();


                // 1.필수 항목 체크
                string chkColumnList = string.Empty;
                string chkStaticList = string.Empty;

                chkColumnList = "cboAREA,edtCode,edtName,cboBRCGBN,edtCARDCD,edtCARDNM"; //cboPAPERTP,edtPAYCNT
                chkStaticList = "sttAREA,sttCode,sttName,sttBRCGBN,sttCARDCD,sttCARDNM"; //sttPAPERTP,sttPAYCNT
                if (!FN.CondValidationChk(oForm, chkColumnList, chkStaticList)) return false;


                chkColumnList = "U_CENTCD,U_CENTNM,U_SNM,U_STATUS||U_CENTGBN";
                //if (!FN.ValidationChk(oForm, "mtx1", chkColumnList)) return false;
                if (!SO.SO_COMMON_HRD.ValidationChk(oForm, "mtx1", chkColumnList)) return false;

            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
                return false;
            }
            finally
            {
                oKIS_SO00401_HRD = null;
            }

            return true;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:44,代码来源:KIS_SO0040A_HRD.cs

示例9: ET_mtx1_AFChooseFromList

        public virtual void ET_mtx1_AFChooseFromList(ItemEvent pVal) {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1").Specific));
            // ADD YOUR ACTION CODE HERE ...
            SAPbouiCOM.DataTable oDataTable = null;
            SAPbouiCOM.DBDataSource oKIS_HR00203_HRD = oForm.DataSources.DBDataSources.Item("@KIS_HR00203_HRD");
            oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
            oDataTable = FN.GetCFLSelectedObjects(pVal);

            if (pVal.ColUID == "U_EMPNO")
            {
                try
                {
                    if (oDataTable != null)
                    {
                        oMatrix.FlushToDataSource();
                        string sQry = " SELECT B.U_DEPTCD FROM [@KIS_HR0120M] A INNER JOIN [@KIS_HR01202] B ON A.Code = B.Code";
                               sQry = sQry + "\r\n" + " WHERE A.U_EMPNO = '" + oDataTable.GetValue("U_EMPNO", 0).ToString() + "'";
                               oRS.DoQuery(sQry);

                        oKIS_HR00203_HRD.SetValue("U_EMPNO", pVal.Row-1, oDataTable.GetValue("U_EMPNO", 0).ToString());
                        oKIS_HR00203_HRD.SetValue("U_EMPNM", pVal.Row - 1, oDataTable.GetValue("U_EMPNM", 0).ToString());
                        oKIS_HR00203_HRD.SetValue("U_DEPTCD", pVal.Row - 1, oRS.Fields.Item("U_DEPTCD").Value);
                        oKIS_HR00203_HRD.SetValue("U_JIKGBCD", pVal.Row - 1, oDataTable.GetValue("U_JIKGBCD", 0).ToString());
                        oKIS_HR00203_HRD.SetValue("U_JIKCHKCD", pVal.Row - 1, oDataTable.GetValue("U_JIKCHCD", 0).ToString());
                        oMatrix.LoadFromDataSource();
                    }
                }
                catch (Exception ex)
                {
                    B1Connections.theAppl.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                }
                finally
                {
                    oRS = null;
                    oDataTable = null;
                    oKIS_HR00203_HRD = null; ;
                }
            }

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

示例10: GetDataLoad

        private void GetDataLoad(SAPbouiCOM.Form oForm, Dictionary<string, string> pDictionary)
        {
            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0290M_HRD");
            oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_SO02901_HRD");

            //헤더데이터를 조회
            QueryWithConditions(ref oDB_M, pDictionary);
            if (oDB_M.Size > 0)
            {
                //헤더를 기준으로 라인데이터 조회
                QueryWithConditions(ref oDB_1, "DocEntry", oDB_M.GetValue("DocEntry", 0));
                oForm.Mode = BoFormMode.fm_OK_MODE;

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx").Specific;
                oMatrix.LoadFromDataSource();
            }
            else
            {
                // 아무것도 없는 마스터에 값을 입력할려고 하면 오류 발생 
                // 폼 모드 Add모드로 강제로 전환 하고 데이터 입력해야함.
                oForm.Mode = BoFormMode.fm_ADD_MODE;
                if (pDictionary != null)
                {
                    foreach (KeyValuePair<string, string> item in pDictionary)
                    {
                        switch (item.Key.ToString())
                        {
                            case "U_PAPERTP":
                                oDB_M.SetValue(item.Key.ToString(), 0, item.Value.ToString());
                                break;
                            case "U_CENTCD":
                                oDB_M.SetValue(item.Key.ToString(), 0, item.Value.ToString());
                                break;
                            case "U_BRCHCD":
                                oDB_M.SetValue(item.Key.ToString(), 0, item.Value.ToString());
                                break;
                            default:
                                break;
                        }
                    }
                }
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:43,代码来源:KIS_SO0291A_HRD.cs

示例11: GetDataLoad

        private void GetDataLoad(SAPbouiCOM.Form oForm, string pCode)
        {            
            SAPbouiCOM.DBDataSource oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0040M_HRD");
            SAPbouiCOM.DBDataSource oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_SO00401_HRD");

            oForm.Freeze(true);
            try
            {
                FN.SetDbsWithConditionsQuery(ref oDB_M, "Code==" + pCode);
                FN.SetDbsWithConditionsQuery(ref oDB_1, "Code==" + pCode);

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

                FN.SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB_1, FN.RowSelectMode.None, "U_CENTCD");

                if (oDB_M.Size > 0) oForm.Mode = BoFormMode.fm_OK_MODE;
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oDB_M = null;
                oDB_1 = null;
                oForm.Freeze(false);
            }

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

示例12: SetFormLoadFromDBDatasource

        /// <summary>
        /// 지정된 문서를 DBDatasource로 다시 로드 합니다.
        /// </summary>
        /// <param name="KeyValue">문서번호(DocEntry)</param>
        private void SetFormLoadFromDBDatasource()
        {
            oForm.Freeze(true);
            try
            {
                string cboPUBLICA = oForm.DataSources.UserDataSources.Item("cboPUBLICA").Value;
                string cboYEAR = oForm.DataSources.UserDataSources.Item("cboYEAR").Value;
                string cboMONTH = oForm.DataSources.UserDataSources.Item("cboMONTH").Value;

                oForm.Mode = BoFormMode.fm_OK_MODE;

                SAPbouiCOM.Conditions oCons = new SAPbouiCOM.Conditions();

                SAPbouiCOM.DBDataSource oKIS_SD0170T_HRD = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SD0170T_HRD");


                SAPbouiCOM.Condition oCon = null;

                oCon = oCons.Add();

                oCon.Alias = "U_PUBLICA";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = cboPUBLICA;

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "U_YEAR";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = cboYEAR;

                if (string.IsNullOrEmpty(cboMONTH) == false)
                {
                    oCon.Relationship = BoConditionRelationship.cr_AND;

                    oCon = oCons.Add();
                    oCon.Alias = "U_MONTH";
                    oCon.Operation = BoConditionOperation.co_EQUAL;
                    oCon.CondVal = cboMONTH;
                }

                oKIS_SD0170T_HRD.Query(oCons);

                oMatrix = oForm.Items.Item("mtx1").Specific;
                oMatrix.LoadFromDataSource();

                //월 데이터
                if (string.IsNullOrEmpty(cboMONTH)==false)
                {
                    FN.SetItemEnable(oForm, "btnADD", true);
                }

                oCon = null;
                oCons = null;

                oKIS_SD0170T_HRD = null;
                /* 아래 코드부터는  ET_AFFormDataLoad 이벤트와 동일하게 설정해준다.*/

                if (oMatrix.VisualRowCount>0)
                {
                    oMatrix.SelectRow(1, true, false);
                }

                SetHeaderValues();

            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oForm.Freeze(false);
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:79,代码来源:KIS_SD0170A_HRD.cs

示例13: GetDataLoad

        private void GetDataLoad(SAPbouiCOM.Form oForm, string pDocEntry)
        {

            if (!string.IsNullOrEmpty(pDocEntry))
            {
                oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0180T_HRD");
                FN.SetDbsWithConditionsQuery(ref oDB_M, "DocEntry==" + pDocEntry);

                oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_SO01801_HRD");
                FN.SetDbsWithConditionsQuery(ref oDB_1, "DocEntry==" + pDocEntry);

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

                string DocEntry = FN.GetDataSourceValue(oForm, "@KIS_SO0180T_HRD.DocEntry");
                string edtBENTRY = FN.GetRecordsetValue(string.Format("SELECT DocEntry FROM [@KIS_SO0190T_HRD] WHERE ISNULL(U_RJDTDOC,'') = '' AND U_BENTRY = {0}", DocEntry));

                FN.SetDataSourceValue(oForm, "edtBENTRY", edtBENTRY);

                oForm.Mode = BoFormMode.fm_OK_MODE;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:22,代码来源:KIS_SO0181A_HRD.cs

示例14: SetFormLoadFromDBDatasource

        /// <summary>
        /// 지정된 문서를 DBDatasource로 다시 로드 합니다.
        /// </summary>
        /// <param name="KeyValue">문서번호(DocEntry)</param>
        private void SetFormLoadFromDBDatasource(string KeyValue)
        {
            try
            {
                oForm.Mode = BoFormMode.fm_OK_MODE;
                 
                SAPbouiCOM.Conditions oCons = new SAPbouiCOM.Conditions();

                SAPbouiCOM.DBDataSource oKIS_TR0090T_HRD = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_TR0090T_HRD");
                SAPbouiCOM.DBDataSource oKIS_TR00901_HRD = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_TR00901_HRD");

                SAPbouiCOM.Condition oCon = null;

                oCon = oCons.Add();

                oCon.Alias = "DocEntry";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = KeyValue;

                oKIS_TR0090T_HRD.Query(oCons);
                oKIS_TR00901_HRD.Query(oCons);

                oMatrix = oForm.Items.Item("mtx1").Specific;
                oMatrix.LoadFromDataSource();

                oCon = null;
                oCons = null;

                oKIS_TR0090T_HRD = null;
                /* 아래 코드부터는  ET_AFFormDataLoad 이벤트와 동일하게 설정해준다.*/

            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:41,代码来源:KIS_TR0090A_HRD.cs

示例15: ET_mtx_AFChooseFromList

        public virtual void ET_mtx_AFChooseFromList(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific));
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                switch (pVal.ColUID)
                {
                    case "U_PRCCD":

                        //데이터를 가져오기 위해 데이터테이블 추가
                        SAPbouiCOM.DataTable oDataTable;

                        //데이터 테이블을 ChooseFromList에 선택된 오브젝트에서 가져오도록 세팅
                        oDataTable = FN.GetCFLSelectedObjects(pVal);

                        if (oDataTable != null)
                        {
                            oDB_1.SetValue("U_PRCCD", pVal.Row - 1, oDataTable.GetValue("Code", 0).ToString());
                            oDB_1.SetValue("U_PRCNM", pVal.Row - 1, oDataTable.GetValue("Name", 0).ToString());
                        }

                        oMatrix.LoadFromDataSource();
                        oDataTable = null;

                        break;

                    default:
                        break;
                }

            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }

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


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