Exemplo n.º 1
0
        public static void SetValue(ref SAPbouiCOM.Matrix matrix, dynamic col, int row, object val)
        {
            var editable = matrix.Columns.Item(col).Editable;

            matrix.Columns.Item(col).Editable = true;

            try
            {
                val = klib.ValuesEx.To(val).ToString();
                matrix.SetCellWithoutValidation(row, col.ToString(), val.ToString());
            }
            finally
            {
                matrix.Columns.Item(col).Editable = editable;
            }
        }
Exemplo n.º 2
0
        public virtual void ET_CallBack_AFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("CallBack").Specific));

            // ADD YOUR ACTION CODE HERE ...
            string popupID = string.Empty;
            popupID = oButton.Caption.ToString();

            if (string.IsNullOrEmpty(popupID)) return;

            // 리턴 DataTable
            SAPbouiCOM.DataTable rDT = KIS_SO0000F_HRD.GetReturnDT(popupID, oForm.UniqueID);

            int rowIdx = KIS_SO0000F_HRD.GetSelectRowIdx(popupID, oForm.UniqueID);
            oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
            int idx = GetDataTableIndexByMatrix(oMatrix, rowIdx);

            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");

            switch (popupID)
            {
                case "DTL_지번주소":

                    oMatrix.SetCellWithoutValidation(rowIdx, "U_ADDR1", rDT.GetValue("RADDR_KOR", 0));
                    SetDeliveryDataApply(oForm, "U_ADDR1", rowIdx);
                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "DTL_거리주소":
                    oMatrix.SetCellWithoutValidation(rowIdx, "U_ADDR2", rDT.GetValue("RADDR_KOR", 0));
                    SetDeliveryDataApply(oForm, "U_ADDR2", rowIdx);
                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "MST_지번주소":

                    oDB_M.SetValue("U_ZIPCD1", 0, rDT.GetValue("ZIP_CD", 0));
                    oDB_M.SetValue("U_ADDR1", 0, rDT.GetValue("RADDR_KOR", 0));

                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "MST_거리주소":
                    oDB_M.SetValue("U_ZIPCD2", 0, rDT.GetValue("ZIP_CD", 0));
                    oDB_M.SetValue("U_ADDR2", 0, rDT.GetValue("RADDR_KOR", 0));

                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "접수내용":
                    rowIdx = int.Parse(oForm.DataSources.UserDataSources.Item("cRow").Value);

                    SetCallDataApply(oForm, "U_MEMO", rowIdx);
                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "선수금내역":
                    break;

                default:
                    break;
            }
        }
Exemplo n.º 3
0
        public virtual void ET_btnSTOP_AFItemPressed(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("btnSTOP").Specific));
            // ADD YOUR ACTION CODE HERE ...

            int idx = 0;
            string strRowStat = string.Empty;
            try
            {
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
                oDB1_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");

                
                string strNowDate  = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
                strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD);

                string strStopDate = oForm.DataSources.UserDataSources.Item("edtSTOPDT").ValueEx;
                
                //if (String.IsNullOrEmpty(strNowDate))
                //{
                //    B1Connections.theAppl.StatusBar.SetText("중지 일자가 입력되지 않았습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                //    //oForm.Items.Item("btnSTOP").Click(0);
                //    return ;
                //}

                for (int i = 1; i <= oMatrix.VisualRowCount; i++)
                {
                    idx = GetDataTableIndexByMatrix(oMatrix, i);
                    strRowStat = gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"].ToString(); //Row상태값

                    if (strNowDate.CompareTo(strStopDate) >= 0)
                    {
                        // 상태값
                        oMatrix.SetCellWithoutValidation(i, "U_STATUS", "US");
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["STATUS"] = "US";

                    }
                    else
                    {
                        // 상태값
                        oMatrix.SetCellWithoutValidation(i, "U_STATUS", "UO");
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["STATUS"] = "UO";

                    }


                    // 중지일자
                    //oMatrix.SetCellWithoutValidation(i, "U_CLOSEDT", strStopDate);
                    //gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = FN.SetDateFormatToDB(strStopDate, FN.eDateType.n_YYYYMMDD);
                    oMatrix.SetCellWithoutValidation(i, "U_CLOSEDT", strNowDate);
                    gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD);

                    // 배달종료일자 
                    oMatrix.SetCellWithoutValidation(i, "U_DELVTO", strStopDate);
                    gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVTO"] = FN.SetDateFormatToDB(strStopDate, FN.eDateType.n_YYYYMMDD);

                    if (string.IsNullOrEmpty(strRowStat))
                    {
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"] = "M";
                        SetSumNumberOfCofies(oForm);
                    }
                }

                if (oMatrix.VisualRowCount > 0)
                {
                    oMatrix.FlushToDataSource();

                    if (oForm.Mode == BoFormMode.fm_OK_MODE)
                        oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 4
0
        public virtual void ET_mtx1_DUMY_AFChooseFromList(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...
            SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent)pVal;
            SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
            bool bModify = false;

            try
            {
                int idx = GetDataTableIndexByMatrix(oMatrix, pVal.Row);
                switch (pVal.ColUID)
                {
                    case "U_PAYCD"://요금제
                        if (oDataTable != null)
                        {
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYCD", oDataTable.GetValue("Code", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYNM", oDataTable.GetValue("Name", 0).ToString());

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYCD"] = oDataTable.GetValue("Code", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = oDataTable.GetValue("Name", 0).ToString();

                            bModify = true;
                        }
                        break;
                    case "U_PAYNM"://요금제
                        if (oDataTable != null)
                        {
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYCD", oDataTable.GetValue("Code", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYNM", oDataTable.GetValue("Name", 0).ToString());

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYCD"] = oDataTable.GetValue("Code", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = oDataTable.GetValue("Name", 0).ToString();

                            bModify = true;
                        }
                        break;
                    case "U_SAILCD"://유치자
                        if (oDataTable != null)
                        {

                            string strUserCode = oDataTable.GetValue("U_EMPNO", 0).ToString();
                            string strUserName = oDataTable.GetValue("lastName", 0).ToString();

                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_SAILCD", strUserCode);
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_SAILNM", strUserName);

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILCD"] = strUserCode;
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILNM"] = strUserName;


                            // 유치자 사용자의 부서정보를 조회한다.
                            string strDeptName = GetEmployeeInfo(SO.SO_COMMON_HRD.QueryType_Employee.Dept_Name, strUserCode);

                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_SDEPT", strDeptName);
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SDEPT"] = strDeptName;

                            bModify = true;
                        }
                        break;
                    case "U_CENTCD"://분국
                        if (oDataTable != null)
                        {
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTCD", oDataTable.GetValue("Code", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTNM", oDataTable.GetValue("Name", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL1", oDataTable.GetValue("U_TEL1", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL2", oDataTable.GetValue("U_TEL2", 0).ToString());

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTCD"] = oDataTable.GetValue("Code", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = oDataTable.GetValue("Name", 0).ToString();

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL1"] = oDataTable.GetValue("U_TEL1", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL2"] = oDataTable.GetValue("U_TEL2", 0).ToString();

                            bModify = true;
                        }
                        break;
                    case "U_CENTNM"://분국
                        if (oDataTable != null)
                        {
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTCD", oDataTable.GetValue("Code", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTNM", oDataTable.GetValue("Name", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL1", oDataTable.GetValue("U_TEL1", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL2", oDataTable.GetValue("U_TEL2", 0).ToString());

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTCD"] = oDataTable.GetValue("Code", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = oDataTable.GetValue("Name", 0).ToString();

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL1"] = oDataTable.GetValue("U_TEL1", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL2"] = oDataTable.GetValue("U_TEL2", 0).ToString();

                            bModify = true;
                        }
                        break;
                    default:
                        break;
                }

                if (bModify)
                {
                    if (oForm.Mode == BoFormMode.fm_OK_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE)
                    {
                        if (gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"].ToString() == "")
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"] = "M";
                        oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                oCFLEvento = null;
                oDataTable = null;
            }
        }
Exemplo n.º 5
0
        public void SetCallDataApply(SAPbouiCOM.Form oForm, string pColID, int pRowID)
        {
            string strValue = string.Empty;
            string strIDX = string.Empty;
            string strRowStat = string.Empty;
            try
            {
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
                //oMatrix.FlushToDataSource();

                strIDX = FN.GetMatirxCellValue(ref oMatrix, "U_IDX", pRowID); //DataTable 고유번호

                strRowStat = gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["ROWSTATE"].ToString(); //Row상태값

                switch (pColID)
                {
                    case "U_DELVCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pRowID); //배달코드 
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["DELVCD"] = strValue;
                        break;

                    case "U_CALLTP":

                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CALLTP", pRowID); //콜유형
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["CALLTP"] = strValue;

                        //불착(U20), 주소변경(U30) ,지로출력요청(U60) ,계산서출력(U70) :: N:미결
                        if (strValue == "U20" || strValue == "U30" || strValue == "U60" || strValue == "U70")
                        {
                            // 처리상태
                            oMatrix.SetCellWithoutValidation(pRowID, "U_PROSTAT", "N");
                            gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROSTAT"] = "N";

                        }
                        else
                        {
                            // 처리상태 , O완료 디폴트:(O 완료)
                            oMatrix.SetCellWithoutValidation(pRowID, "U_PROSTAT", "O");
                            gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROSTAT"] = "O";
                        }

                        break;
                    case "U_MEMO":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_MEMO", pRowID); //접수내용     
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["MEMO"] = strValue;
                        break;

                    case "U_RECVID":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVID", pRowID); //접수자코드
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVID"] = strValue;
                        break;

                    case "U_RECVNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVNM", pRowID); //접수자명  
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVNM"] = strValue;
                        break;

                    case "U_PROCID":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROCID", pRowID); //처리자코드  
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCID"] = strValue;
                        break;

                    case "U_PROCNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROCNM", pRowID); //처리자명 
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCNM"] = strValue;
                        break;

                    case "U_RECVDT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVDT", pRowID); //상담일자   
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVDT"] = strValue;
                        break;

                    case "U_RECVTI":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVTI", pRowID); //상담시간
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVTI"] = strValue;
                        break;

                    case "U_PROCDT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROCDT", pRowID); //처리일자      
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCDT"] = strValue;
                        break;

                    case "U_PROSTAT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROSTAT", pRowID); //처리상태 
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROSTAT"] = strValue;
                        break;

                    default:
                        break;
                }

                DateTime deDate = B1Connections.diCompany.GetCompanyDate();
                string strDate = deDate.ToShortDateString();

                string U_RECVTI = B1Connections.diCompany.GetCompanyTime().Replace(":", "");//임포트 실행시간


                // 최초 등록일때만 처리자 및 처리일자 등록
                if (strRowStat == "I")
                {
                    oMatrix.SetCellWithoutValidation(pRowID, "U_RECVID", B1Connections.diCompany.UserName);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_RECVNM", gUserName);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_RECVDT", strDate);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_RECVTI", U_RECVTI);

                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVDT"] = FN.SetDateFormatToDB(strDate, FN.eDateType.n_YYYYMMDD);
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVTI"] = U_RECVTI;
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVID"] = B1Connections.diCompany.UserName;
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVNM"] = gUserName;
                }

                // 수정하게되면 처리자 및 처리일자 갱신
                string strCallType = gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["CALLTP"].ToString();
                if (strCallType != "U20" && strCallType != "U30" && strCallType != "U60" && strCallType != "U70")
                {
                    oMatrix.SetCellWithoutValidation(pRowID, "U_PROCID", B1Connections.diCompany.UserName);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_PROCNM", gUserName);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_PROCDT", strDate);

                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCDT"] = FN.SetDateFormatToDB(strDate, FN.eDateType.n_YYYYMMDD);
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCID"] = B1Connections.diCompany.UserName;
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCNM"] = gUserName;
                }

                if (string.IsNullOrEmpty(strRowStat))
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["ROWSTATE"] = "M";

            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 6
0
        private void SetDeliveryDataApply(SAPbouiCOM.Form oForm, string pColID, int pRowID)
        {
            string strValue = string.Empty;
            string strIDX = string.Empty;
            string strRowStat = string.Empty;
            StringBuilder sb = null;

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

                int idx = GetDataTableIndexByMatrix(oMatrix, pRowID);

                strRowStat = gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"].ToString(); //Row상태값

                switch (pColID)
                {
                    case "U_DELVCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pRowID); //배달코드 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVCD"] = strValue;
                        break;

                    case "U_RDEPT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RDEPT", pRowID); //부서  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["RDEPT"] = strValue;
                        break;

                    case "U_PAPERTP":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAPERTP", pRowID); //지종      
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAPERTP"] = strValue;
                        break;

                    case "U_READTP":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_READTP", pRowID); //독자구분      
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["READTP"] = strValue;
                        break;

                    case "U_PAYCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAYCD", pRowID); //요금제코드
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYCD"] = strValue;

                        if (string.IsNullOrEmpty(strValue))
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_PAYNM", "");
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = "";
                        }
                        break;

                    case "U_PAYNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAYNM", pRowID); //요금제명  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = strValue;
                        break;

                    case "U_TEL":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_TEL", pRowID); //연락처  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["TEL"] = strValue;
                        break;

                    case "U_MOBILE":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_MOBILE", pRowID); //휴대폰  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["MOBILE"] = strValue;
                        break;

                    case "U_ADDR1":

                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR1", pRowID); //주소1    
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR1"] = strValue;
                        break;

                    case "U_ADDR2":

                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR2", pRowID); //주소2     
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR2"] = strValue;
                        break;

                    case "U_ADDR1_D":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR1_D", pRowID); //주소1    
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR1_D"] = strValue;
                        break;

                    case "U_ADDR2_D":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR2_D", pRowID); //주소2     
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR2_D"] = strValue;
                        break;

                    case "U_CENTCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CENTCD", pRowID); //지국      
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTCD"] = strValue;

                        if (string.IsNullOrEmpty(strValue))
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_CENTNM", "");
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = "";
                        }

                        break;

                    case "U_CENTNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CENTNM", pRowID); //지국명    
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = strValue;
                        break;

                    case "U_DELVFR":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVFR", pRowID); //배달시작일
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVFR"] = strValue;

                        string strPAPERTP = FN.GetMatirxCellValue(ref oMatrix, "U_PAPERTP", pRowID);
                        if (strPAPERTP == "UJH")
                        {
                            string strPAYCD = FN.GetMatirxCellValue(ref oMatrix, "U_PAYCD", pRowID); //요금제코드

                            sb = new StringBuilder();
                            sb.AppendLine(" SELECT CONVERT (NVARCHAR (10)                            ");
                            sb.AppendLine("               , DATEADD (MM                              ");
                            sb.AppendLine("                        , (SELECT CONVERT (INT, U_TERM)   ");
                            sb.AppendLine("                             FROM [@KIS_SO0050M_HRD]      ");
                            sb.AppendLine("                            WHERE Code = '{0}')           ");
                            sb.AppendLine("                        , CONVERT (DATE, '{1}'))          ");
                            sb.AppendLine("               , 112)                                     ");

                            string strDELVTO = FN.GetRecordsetValue(string.Format(sb.ToString(), strPAYCD, strValue));
                            oMatrix.SetCellWithoutValidation(pRowID, "U_DELVTO", strDELVTO);
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVTO"] = strDELVTO;
                        }

                        break;

                    case "U_DELVTO":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVTO", pRowID); //배달종료일
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVTO"] = strValue;
                        break;

                    case "U_DELVCNT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCNT", pRowID); //배달부수 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVCNT"] = strValue;

                        // 마스터의 구독부수를 갱신한다.
                        SetSumNumberOfCofies(oForm);
                        break;

                    case "U_METHOD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_METHOD", pRowID); //가입방법  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["METHOD"] = strValue;
                        break;

                    case "U_SAILCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_SAILCD", pRowID); //유치자 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILCD"] = strValue;

                        if (string.IsNullOrEmpty(strValue))
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_SAILNM", "");
                            oMatrix.SetCellWithoutValidation(pRowID, "U_SDEPT", "");
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILNM"] = "";
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SDEPT"] = "";
                        }

                        break;

                    case "U_SAILNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_SAILNM", pRowID); //유치자 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILNM"] = strValue;
                        break;

                    case "U_STATUS":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_STATUS", pRowID); //배달상태  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["STATUS"] = strValue;

                        string strNowDate = B1Connections.theAppl.Company.ServerDate;

                        // 1.배달상태를 정상으로 바꾸면 중지일자를 Null로 바꾼다.
                        // 2.배달상태를 중지로 바꾸면 중지일자에 현재일자를 넣는다.
                        if (strValue == "UO")
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_CLOSEDT", "");
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = "";
                        }

                        else if (strValue == "US")
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_CLOSEDT", strNowDate);
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD);
                        }

                        // 마스터의 구독부수를 갱신한다.
                        SetSumNumberOfCofies(oForm);

                        break;

                    case "U_SDEPT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_SDEPT", pRowID); //배달상태 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SDEPT"] = strValue;
                        break;

                    case "U_NOTE":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_NOTE", pRowID); //배달상세  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["NOTE"] = strValue;
                        break;

                    case "U_JOINDT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_JOINDT", pRowID); //가입일자  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["JOINDT"] = strValue;
                        break;

                    case "U_CLOSEDT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CLOSEDT", pRowID); //해지일자
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = strValue;
                        break;

                    default:
                        break;
                }
                if (string.IsNullOrEmpty(strRowStat))
                    gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"] = "M";

            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// 메트릭스의 컬럼 수수료율을 일괄 조종합니다.
        /// </summary>
        /// <param name="oColumnuid">컬럼UID</param>
        /// <param name="Rate">수수료율</param>
        private void SetMatrixRateColumn(string oColumnuid , string Rate)
        {
            oMatrix = oForm.Items.Item("mtx1").Specific;

            for (int iLooper = 1; iLooper <= oMatrix.VisualRowCount; iLooper++)
            {
                string U_ITMGRPCD = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_ITMGRPCD", iLooper)).Value;
                if (string.IsNullOrEmpty(U_ITMGRPCD) == false)
                {
                    oMatrix.SetCellWithoutValidation(iLooper, oColumnuid, Rate);
                    SetCalc(oColumnuid, iLooper);
                }
            }

            SetMatrixCalc_Sum();
        }
Exemplo n.º 8
0
        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;
            }
        }
Exemplo n.º 9
0
        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);
            }

        }
Exemplo n.º 10
0
        private void SetChildDataToMatrix(SAPbouiCOM.Form oForm)
        {
            SAPbouiCOM.Form cForm = B1Connections.theAppl.Forms.Item(oForm.DataSources.UserDataSources.Item("cFORMUID").ValueEx);
            oMatrix = oForm.Items.Item("mtx").Specific;
            string strREADCD = string.Empty;
            string strCENTCD = string.Empty;
            string strADVRECV = string.Empty;
            string strUpLineId = string.Empty;
            bool bModify = false;
            try
            {
                oForm.Freeze(true);
                SAPbouiCOM.Grid cGrid = cForm.Items.Item("grd").Specific;
                for (int i = 0; i < cGrid.DataTable.Rows.Count; i++)
                {
                    if (FN.GetGridCellValue(ref cGrid, "CHK", i) == "Y")
                    {

                        strREADCD = FN.GetGridCellValue(ref cGrid, "U_READCD", i);
                        strCENTCD = FN.GetGridCellValue(ref cGrid, "U_CENTCD", i);
                        strADVRECV = FN.GetGridCellValue(ref cGrid, "U_ADVRECV", i);
                        strUpLineId = oForm.DataSources.UserDataSources.Item("U_BLINEID").ValueEx;

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

                        if (string.IsNullOrEmpty(strCENTCD) == false)
                        {                                

                            SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB_1, "U_READCD");

                            oMatrix.SetCellWithoutValidation(oMatrix.VisualRowCount, "U_READCD", FN.GetGridCellValue(ref cGrid, "U_READCD", i));
                            oMatrix.SetCellWithoutValidation(oMatrix.VisualRowCount, "U_READNM", FN.GetGridCellValue(ref cGrid, "U_READNM", i));
                            oMatrix.SetCellWithoutValidation(oMatrix.VisualRowCount, "U_ADVAMT", FN.GetGridCellValue(ref cGrid, "U_ADVRECV", i));
                            oMatrix.SetCellWithoutValidation(oMatrix.VisualRowCount, "U_ADVSUBT", FN.GetGridCellValue(ref cGrid, "U_ADVRECV", i));

                            bModify = true;
                        }

                    }
                }
                if (bModify)
                {
                    oMatrix.FlushToDataSource();
                    if (oForm.Mode == BoFormMode.fm_OK_MODE)
                        oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                oForm.Freeze(false);
                if (oMatrix != null) { Marshal.ReleaseComObject(oMatrix); } oMatrix = null;
                if (cForm != null) { Marshal.ReleaseComObject(cForm); } cForm = null;
            }
        }
Exemplo n.º 11
0
        public virtual void ET_mtx2_AFChooseFromList(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2").Specific));
            // ADD YOUR ACTION CODE HERE ...
            SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent)pVal;
            SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
            bool bModify = false;

            try
            {
                switch (pVal.ColUID)
                {
                    case "U_CENTCD"://지국
                        if (oDataTable != null)
                        {
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTCD", oDataTable.GetValue("Code", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTNM", oDataTable.GetValue("Name", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_PERSON", oDataTable.GetValue("U_BRCMNG", 0).ToString()); //지국장명
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_EMAIL", oDataTable.GetValue("U_EMAIL", 0).ToString()); // 메일
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_VATGRP", "A0");

                            SetMatrixValidate(oForm, oMatrix, pVal);
                            bModify = true;
                        }
                        break;
                    default:
                        break;
                }

                if (bModify)
                {
                    if (oForm.Mode == BoFormMode.fm_OK_MODE)
                    {
                        oMatrix.FlushToDataSource();
                        oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                oCFLEvento = null;
                oDataTable = null;
            }
        }
Exemplo n.º 12
0
        public virtual void ET_mtx_AFValidate(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific));
            // ADD YOUR ACTION CODE HERE ...

            if (pVal.InnerEvent == true || pVal.ItemChanged == true)
            {
                if (pVal.ColUID == "U_HB_AMT" || pVal.ColUID == "U_KH_AMT")
                {
                    string strHB_AMT = FN.GetMatirxCellValue(ref oMatrix, "U_HB_AMT", pVal.Row);
                    string strKH_AMT = FN.GetMatirxCellValue(ref oMatrix, "U_KH_AMT", pVal.Row);

                    if (string.IsNullOrEmpty(strHB_AMT))
                        strHB_AMT = "0";

                    if (string.IsNullOrEmpty(strKH_AMT))
                        strKH_AMT = "0";

                    oMatrix.SetCellWithoutValidation(pVal.Row, "U_REQDEP", (decimal.Parse(strHB_AMT) + decimal.Parse(strKH_AMT)).ToString());
                }
            }
        }
Exemplo n.º 13
0
        private void DBDataSourcesBindingData(SAPbouiCOM.Form oForm, System.Data.DataTable dt, string strFileName)
        {
            try
            {
                SetLayOut();

                //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();

               if (heDataTable_EB22 != null) heDataTable_EB22.Clear();
               if (boDataTable_EB22 != null) boDataTable_EB22.Clear();
               if (trDataTable_EB22 != null) trDataTable_EB22.Clear();


                for (int i = 0; i < dt.Rows.Count; i++)
                {

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

                    // dataType - H : 헤더, R : 바디, T : 합계
                    dataType = dt.Rows[i][0].ToString().Substring(0, 1);

                    switch (dataType)
                    {
                        case "H":
                            SetDataTable(LayOutDataTable_EB22, ref heDataTable_EB22, upRowText, dataType);
                            break;

                        case "R":
                            SetDataTable(LayOutDataTable_EB22, ref boDataTable_EB22, upRowText, dataType);
                            break;

                        case "T":
                            SetDataTable(LayOutDataTable_EB22, ref trDataTable_EB22, upRowText, dataType);
                            break;

                        default:
                            break;
                    }
                }


                #region 헤더
                string S0290 = trDataTable_EB22.Rows[0]["0290"].ToString().Trim();  // 총건수
                string S0300 = trDataTable_EB22.Rows[0]["0300"].ToString().Trim();  // 전액출금불능건수
                string S0310 = trDataTable_EB22.Rows[0]["0310"].ToString().Trim();  // 전액출금불능금액
                string S0320 = trDataTable_EB22.Rows[0]["0320"].ToString().Trim();  // 부분출금불능건수
                string S0330 = trDataTable_EB22.Rows[0]["0330"].ToString().Trim();  // 부분출금불능금액
                string S0340 = trDataTable_EB22.Rows[0]["0340"].ToString().Trim();  // 센터검증오류건수
                string S0350 = trDataTable_EB22.Rows[0]["0350"].ToString().Trim();  // FILLER
                string S0360 = trDataTable_EB22.Rows[0]["0360"].ToString().Trim();  // 출금은행 수수료
                string S0370 = trDataTable_EB22.Rows[0]["0370"].ToString().Trim();  // 입금은행 수수료
                string S0380 = trDataTable_EB22.Rows[0]["0380"].ToString().Trim();  // FILLER
                string S0390 = trDataTable_EB22.Rows[0]["0390"].ToString().Trim();  // MAC 검증값

                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_ETOTCNT", S0290);
                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_EFULCNT", S0300);
                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_EFULAMT", S0310);
                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_EPATCNT", S0320);
                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_EPATAMT", S0330);
                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_ERRCNT", S0340);
                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_OCMMAMT", S0360);
                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_IMMAMT", S0370);
                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_EMAC", S0390);
                FN.SetDataSourceValue(oForm, "@KIS_SO0190T_HRD.U_EFILE", Path.GetFileName(strFileName));
                //FN.SetItemValue(ref oForm, "edtEFILE", Path.GetFileName(strFileName));
                #endregion

                #region 바디
                string LineId = string.Empty;
                string U_READCD = string.Empty;
                string U_PAYNO = string.Empty;
                string U_BNKACCT = string.Empty;
                string U_SERNO = string.Empty;
                string U_REQAMT = string.Empty;

                string U_IMPAMT = string.Empty;

                string filterExpression = string.Empty;

                for (int r1 = 1; r1 <= oMatrix.VisualRowCount; r1++)
                {
                    LineId = FN.GetMatirxCellValue(ref oMatrix, "LineId", r1);  //oMatrix.GetCellSpecific("LineId", r1).ToString();
                    U_READCD = FN.GetMatirxCellValue(ref oMatrix, "U_READCD", r1);
                    U_PAYNO = FN.GetMatirxCellValue(ref oMatrix, "U_PAYNO", r1);
                    U_BNKACCT = FN.GetMatirxCellValue(ref oMatrix, "U_BNKACCT", r1);
                    U_SERNO = FN.GetMatirxCellValue(ref oMatrix, "U_SERNO", r1);
                    U_REQAMT = FN.GetMatirxCellValue(ref oMatrix, "U_REQAMT", r1);

                    //filterExpression = string.Format("0120 = '{0}' AND 0140 = '{1}' AND 0110 = '{2}'", U_PAYNO, U_BNKACCT, U_TAKEGBN);
                    //System.Data.DataRow[] foundRows = boDataTable_EB22.Select(filterExpression);


                    IEnumerable<DataRow> sDataRows = (from a in boDataTable_EB22.AsEnumerable()
                                                      where a.Field<string>("0100") == U_SERNO
                                                         && a.Field<string>("0200") == U_PAYNO
                                                         //&& a.Field<string>("0130") == U_BNKACCT
                                                      select a).Take(1);


                    //if (foundRows.Length == 0)

                    if (sDataRows.Count() == 0)
                    {
                        oMatrix.SetCellWithoutValidation(r1, "U_RESCD", "");
                        oMatrix.SetCellWithoutValidation(r1, "U_IMPCD", "");
                        oMatrix.SetCellWithoutValidation(r1, "U_IMPAMT", "");
                        oMatrix.SetCellWithoutValidation(r1, "U_DEPAMT", U_REQAMT);
                    }
                    else
                    {
                        System.Data.DataTable serchTable = sDataRows.CopyToDataTable();

                        U_IMPAMT = serchTable.Rows[0]["0140"].ToString().Trim();

                        oMatrix.SetCellWithoutValidation(r1, "U_RESCD", serchTable.Rows[0]["0160"].ToString().Trim());  // 결과코드
                        oMatrix.SetCellWithoutValidation(r1, "U_IMPCD", serchTable.Rows[0]["0170"].ToString().Trim());  // 불능코드
                        oMatrix.SetCellWithoutValidation(r1, "U_IMPAMT", U_IMPAMT);  // 출금불능금액
                        oMatrix.SetCellWithoutValidation(r1, "U_DEPAMT", (decimal.Parse(U_REQAMT) - decimal.Parse(U_IMPAMT)).ToString());  // 입금금액

                        //oMatrix.SetCellWithoutValidation(r1, "U_RESCD", foundRows[0]["0180"].ToString().Trim());
                        //oMatrix.SetCellWithoutValidation(r1, "U_IMPCD", foundRows[0]["0190"].ToString().Trim());
                    }
                }
                #endregion

                oMatrix.FlushToDataSource();

                if (oForm.Mode == BoFormMode.fm_OK_MODE)
                    oForm.Mode = BoFormMode.fm_UPDATE_MODE;

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

        }
Exemplo n.º 14
0
        public virtual void ET_CallBack_AFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("CallBack").Specific));

            // ADD YOUR ACTION CODE HERE ...
            string popupID = string.Empty;
            popupID = oButton.Caption.ToString();

            if (string.IsNullOrEmpty(popupID)) return;

            // 리턴 DataTable
            SAPbouiCOM.DataTable rDT = KIS_SO0000F_HRD.GetReturnDT(popupID, oForm.UniqueID);
            
            int rowIdx = KIS_SO0000F_HRD.GetSelectRowIdx(popupID, oForm.UniqueID);

            switch (popupID)
            {
                case "지번주소":
                    oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1").Specific;
                    oMatrix.SetCellWithoutValidation(rowIdx, "U_ZIPCD1", rDT.GetValue("ZIP_CD", 0));
                    oMatrix.SetCellWithoutValidation(rowIdx, "U_ADDR1", rDT.GetValue("RADDR_KOR", 0));
                    
                    oMatrix.FlushToDataSource();
                    break;

                case "거리주소":
                    oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1").Specific;
                    oMatrix.SetCellWithoutValidation(rowIdx, "U_ZIPCD2", rDT.GetValue("ZIP_CD", 0));
                    oMatrix.SetCellWithoutValidation(rowIdx, "U_ADDR2", rDT.GetValue("RADDR_KOR", 0));
                    
                    oMatrix.FlushToDataSource();
                    break;

                case "분국조회":
                    string KeyValue = rDT.GetValue("U_BRCCD", 0).ToString();
                    if (!string.IsNullOrEmpty(KeyValue))
                    {
                        GetDataLoad(oForm, KeyValue);
                    }

                    break;

                default:
                    break;
            }
        }
Exemplo n.º 15
0
        public virtual void ET_mtx1_AFComboSelect(ItemEvent pVal) {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1").Specific));
            // ADD YOUR ACTION CODE HERE ...
            oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);

            string sQry = "";

            if (pVal.ColUID == "U_DTCD")
            {
                string DTCD = FN.GetMatirxCellValue(ref oMatrix, "U_DTCD", pVal.Row);
                string DTNM = "";

                sQry = string.Format(" SELECT U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR02' AND U_USEYN = 'Y' AND U_SMLCD = '{0}'", DTCD);

                oRS.DoQuery(sQry);

                DTNM = oRS.Fields.Item("U_SMLNM").Value.ToString();

                oMatrix.SetCellWithoutValidation(pVal.Row, "U_DTNM", DTNM);
                oMatrix.FlushToDataSource();

            }
            else if (pVal.ColUID == "U_ABILCD")
            {
                string ABILCD = FN.GetMatirxCellValue(ref oMatrix, "U_ABILCD", pVal.Row);
                string ABILNM = "";

                sQry = string.Format(" SELECT U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR03' AND U_USEYN = 'Y' AND U_SMLCD = '{0}'", ABILCD);

                oRS.DoQuery(sQry);

                ABILNM = oRS.Fields.Item("U_SMLNM").Value.ToString();

                oMatrix.SetCellWithoutValidation(pVal.Row, "U_ABILNM", ABILNM);
                oMatrix.FlushToDataSource();
            }
            else if (pVal.ColUID == "U_COMPOCD")
            {
                string COMPOCD = FN.GetMatirxCellValue(ref oMatrix, "U_COMPOCD", pVal.Row);
                string COMPONM = "";

                sQry = string.Format(" SELECT U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR04' AND U_USEYN = 'Y' AND U_SMLCD = '{0}'", COMPOCD);

                oRS.DoQuery(sQry);

                COMPONM = oRS.Fields.Item("U_SMLNM").Value.ToString();

                oMatrix.SetCellWithoutValidation(pVal.Row, "U_COMPONM", COMPONM);
                oMatrix.FlushToDataSource();
            }
        }
Exemplo n.º 16
0
        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;
                int U_TOTAMT_S = 0;
                int U_CMMAMT_S = 0;

                DataRow[] errDr = null;
                DataRow[] dataDr = null;
                System.Data.DataTable sDataTable = null;

                for (int boidx = 0; boidx < boDataTable.Rows.Count; boidx++)
                {
                    U_RDNO = boDataTable.Rows[boidx]["0140"].ToString();
                    U_DEPAMT = boDataTable.Rows[boidx]["0150"].ToString();
                    U_CMMAMT = boDataTable.Rows[boidx]["0170"].ToString();
                    U_DEPDT = boDataTable.Rows[boidx]["0100"].ToString();
                    U_ERRCD = boDataTable.Rows[boidx]["0160"].ToString();

                    U_TOTAMT_S = U_TOTAMT_S + int.Parse(U_DEPAMT);
                    U_CMMAMT_S = U_CMMAMT_S + int.Parse(U_CMMAMT);

                    errDr = ErrorDataTable.Select(string.Format("U_CD='{0}'", U_ERRCD));
                    if (errDr.Length > 0)
                    {
                        U_ERRMSG = errDr[0]["U_SMLNM"].ToString();
                        U_UNSCNT_S++;
                        U_UNSAMT_S = U_UNSAMT_S + int.Parse(U_DEPAMT);
                    }

                    #region linq datarow
                    //IEnumerable<DataRow> sDataRows = (from a in sKIS_SO01601_HRD.AsEnumerable()
                    //                                  where a.Field<string>("U_RDNO") == U_RDNO //14030000000040204118
                    //                                  select a).Take(1);

                    //System.Data.DataTable rTable = sDataRows.CopyToDataTable();
                    //rTable.Rows[0]["U_RDCD"].ToString();
                    #endregion
                    #region linq foreach
                    //var lKIS_SO01601_HRD = (from a in sKIS_SO01601_HRD.AsEnumerable()
                    //                        where a.Field<string>("U_RDNO") == U_RDNO
                    //                        select new
                    //                        {
                    //                            U_GIRONO = a.Field<string>("U_GIRONO").Trim(),
                    //                            U_RDCD = a.Field<string>("U_RDCD").Trim(),
                    //                            U_RDNM = a.Field<string>("U_RDNM").Trim(),
                    //                            U_RDNO = a.Field<string>("U_RDNO").Trim(),
                    //                            U_ZIPCD1 = a.Field<string>("U_ZIPCD1").Trim(),
                    //                            U_ADDR1 = a.Field<string>("U_ADDR1").Trim(),
                    //                            U_ADDR1_D = a.Field<string>("U_ADDR1_D").Trim(),
                    //                            U_ZIPCD2 = a.Field<string>("U_ZIPCD2").Trim(),
                    //                            U_ADDR2 = a.Field<string>("U_ADDR2").Trim(),
                    //                            U_ADDR2_D = a.Field<string>("U_ADDR2_D").Trim(),
                    //                            U_BRCCD = a.Field<string>("U_BRCCD").Trim(),
                    //                            U_REQYM = a.Field<string>("U_REQYM").Trim(),
                    //                            U_CNT = a.Field<int>("U_CNT"),
                    //                            U_USEYM = a.Field<string>("U_USEYM").Trim(),
                    //                            U_REQAMT = a.Field<int>("U_REQAMT"),
                    //                            U_PMETHOD = a.Field<string>("U_PMETHOD").Trim(),
                    //                            U_MARKYM = a.Field<string>("U_MARKYM").Trim(),
                    //                            U_PAYCD = a.Field<string>("U_PAYCD").Trim()
                    //                        }).Take(1);

                    //foreach (var linqRow in lKIS_SO01601_HRD)
                    //{
                    //    linqRow.U_ADDR1
                    //}
                    #endregion


                    // 지로청구내역 조회
                    sDataTable = null;
                    dataDr = null;

                    sDataTable = sKIS_SO01601_HRD.Copy();
                    dataDr = sDataTable.Select(string.Format("U_RDNO='{0}'", U_RDNO));

                    if (dataDr.Length == 0)
                    {
                        sDataTable = sKIS_SO0220M_HRD.Copy();
                        dataDr = sKIS_SO0220M_HRD.Select(string.Format("U_RDNO='{0}'", U_RDNO));
                    }

                    if (dataDr.Length > 0)
                    {
                        oMatrix.AddRow();

                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_GIRONO", U_GIRONO);                                           // 지로번호
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_RDNO", U_RDNO);                                               // 고객관리번호
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_DEPAMT", U_DEPAMT);                                           // 입금액
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_CMMAMT", U_CMMAMT);                                           // 수수료
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_DEPDT", U_DEPDT);                                             // 입금일자
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ERRCD", U_ERRCD);                                             // 에러코드
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ERRMSG", U_ERRMSG);                                           // 에러명칭


                        if (sDataTable.Columns.Contains("U_PREQYM"))
                            U_PREQYM = dataDr[0]["U_PREQYM"].ToString();
                        else
                            U_PREQYM = dataDr[0]["U_REQYM"].ToString();

                        if (sDataTable.Columns.Contains("U_CENTGBN"))
                            U_CENTGBN = dataDr[0]["U_CENTGBN"].ToString();
                        else
                            U_CENTGBN = "";

                        if (sDataTable.Columns.Contains("U_BPPER"))
                            U_BPPER = dataDr[0]["U_BPPER"].ToString();
                        else
                            U_BPPER = "";


                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_RDCD", dataDr[0]["U_RDCD"].ToString());                   // 독자코드
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_RDNM", dataDr[0]["U_RDNM"].ToString());                   // 청구처이름
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ZIPCD1", dataDr[0]["U_ZIPCD1"].ToString());               // 우편번호1
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ADDR1", dataDr[0]["U_ADDR1"].ToString());                 // 주소1
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ADDR1_D", dataDr[0]["U_ADDR1_D"].ToString());             // 주소1 상세
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ZIPCD2", dataDr[0]["U_ZIPCD2"].ToString());               // 우편번호2
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ADDR2", dataDr[0]["U_ADDR2"].ToString());                 // 주소2
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_ADDR2_D", dataDr[0]["U_ADDR2_D"].ToString());             // 주소2 상세
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_BRCCD", dataDr[0]["U_BRCCD"].ToString());                 // 지국코드
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_BRCNM", dataDr[0]["U_BRCNM"].ToString());                 // 지국명칭
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_REQYM", dataDr[0]["U_REQYM"].ToString());                 // 청구월 (TR)
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_CNT", dataDr[0]["U_CNT"].ToString());                     // 부수
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_USEYM", dataDr[0]["U_USEYM"].ToString());                 // 사용월 (TR)
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_REQAMT", dataDr[0]["U_REQAMT"].ToString());               // 청구금액
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_PMETHOD", dataDr[0]["U_PMETHOD"].ToString());             // 납부방법
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_MARKYM", dataDr[0]["U_MARKYM"].ToString());               // 표기년월
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_PAYCD", dataDr[0]["U_PAYCD"].ToString());                 // 요금제코드
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_PAPERTP", dataDr[0]["U_PAPERTP"].ToString());             // 지종
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_CENTGBN", U_CENTGBN);                                     // 분국구분
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_BPPER", U_BPPER);                                         // 담당자
                        oMatrix.SetCellWithoutValidation(oMatrix.RowCount, "U_PREQYM", U_PREQYM);                                       // 지로청구월 (지로청구마스터의 청구월)
                    }
                    //else
                    //{
                    //    throw new Exception("고객관리번호[" + U_RDNO + "]가 존재하지 않습니다. 지로청구 자료를 확인해 주세요.");
                    //}
                }

                #endregion


                #region 합계

                U_NOMCNT_S = U_TOTCNT_S - U_UNSCNT_S;
                U_NOMAMT_S = U_TOTAMT_S - U_UNSAMT_S;

                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_NOMCNT", U_NOMCNT_S.ToString());
                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_UNSCNT", U_UNSCNT_S.ToString());
                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_TOTCNT", U_TOTCNT_S.ToString());
                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_NOMAMT", U_NOMAMT_S.ToString());
                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_UNSAMT", U_UNSAMT_S.ToString());
                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_TOTAMT", U_TOTAMT_S.ToString());
                FN.SetDataSourceValue(oForm, "@KIS_SO0170T_HRD.U_CMMAMT", U_CMMAMT_S.ToString());

                #endregion


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

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

                heDataTable.Clear();
                boDataTable.Clear();
                trDataTable.Clear();
            }
            finally
            {
                oForm.Freeze(false);
            }

        }