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


C# SAPbouiCOM.Freeze方法代码示例

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


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

示例1: Act1_FormInit

 private void Act1_FormInit(SAPbouiCOM.Form oForm)
 {
     oForm.Freeze(true);
     Act2_DataSourcesBinding(oForm);
     //Call LabelInit(oForm)
     Act3_DefualtSetting(oForm, "", "");
     Act4_FormMenuSetting(oForm);
     //FindData(false)
     oForm.Freeze(false);
 }
开发者ID:wldyd0210,项目名称:TEST,代码行数:10,代码来源:KIS_SO0141A_HRD.cs

示例2: FindData

        private static void FindData(SAPbouiCOM.Form oForm)
        {
            SAPbouiCOM.Grid oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;

            string edtDATE = oForm.DataSources.UserDataSources.Item("edtDATE").Value;
            string cboGROUP = oForm.DataSources.UserDataSources.Item("cboGROUP").Value;
            string GrdTitle = string.Empty;

            int BDATE = Convert.ToInt16(edtDATE) -1;

            StringBuilder pQuery = new StringBuilder();
            string query = string.Empty;

            pQuery.AppendLine(" EXEC [KIS_SP_SD0180F1_HRD]   ");
            pQuery.AppendLine(" 	   @DATE	    = '{0}'	 ");
            pQuery.AppendLine(" 	  ,@GROUP	    = '{1}'	 ");

            string sQry = string.Format(pQuery.ToString(), edtDATE, cboGROUP);

            try
            {
                GrdTitle = string.Format("{0}년1월,{1}년1월,{0}년2월,{1}년2월,{0}년3월,{1}년3월,{0}년4월,{1}년4월,{0}년5월,{1}년5월,{0}년6월,{1}년6월,{0}년7월,{1}년7월,{0}년8월,{1}년8월,{0}년9월,{1}년9월,{0}년10월,{1}년10월,{0}년11월,{1}년11월,{0}년12월,{1}년12월,{0}년합계,{1}년합계,ROWSID", BDATE, edtDATE);

                oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
                oGrid.SelectionMode = BoMatrixSelect.ms_Single;

                string cv_ColumnsUID_s = "LINENUM,GROUP1,CARDNM,BMON1,MON1,BMON2,MON2,BMON3,MON3,BMON4,MON4,BMON5,MON5,BMON6,MON6,BMON7,MON7,BMON8,MON8,BMON9,MON9,BMON10,MON10,BMON11,MON11,BMON12,MON12,BAMTSUM,AMTSUM,ROWSID";
                string cv_NoEditable_s = "LINENUM,GROUP1,CARDNM,BMON1,MON1,BMON2,MON2,BMON3,MON3,BMON4,MON4,BMON5,MON5,BMON6,MON6,BMON7,MON7,BMON8,MON8,BMON9,MON9,BMON10,MON10,BMON11,MON11,BMON12,MON12,BAMTSUM,AMTSUM,ROWSID";
                string cv_ColumnsNAM_s = string.Format("#,고객그룹-기업,BP명,{0}",GrdTitle);
                string cv_Right_Just_s = "BMON1,MON1,BMON2,MON2,BMON3,MON3,BMON4,MON4,BMON5,MON5,BMON6,MON6,BMON7,MON7,BMON8,MON8,BMON9,MON9,BMON10,MON10,BMON11,MON11,BMON12,MON12,BAMTSUM,AMTSUM";
                string cv_No_Visible_s = "LINENUM,ROWSID";

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

                oForm.Freeze(true);

                oForm.DataSources.DataTables.Item("grd").ExecuteQuery(sQry);
                oGrid.DataTable = oForm.DataSources.DataTables.Item("grd"); //데이터 그리드에 Display      

                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid.DataTable.Rows.Count == 1 && oGrid.DataTable.GetValue("GROUP1", 0).ToString() == "")
                {
                    FN.SetGridTitle(oGrid, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_No_Visible_s);
                    B1Connections.theAppl.StatusBar.SetText("데이터가 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터가 없습니다.
                }
                else
                {
                    FN.BindGrid(oGrid, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_NoEditable_s, cv_No_Visible_s, "", cv_Right_Just_s);
                    //FN.SetGridSumField(ref oGrid, cv_Right_Just_s);
                    B1Connections.theAppl.StatusBar.SetText("조회완료", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); //조회완료
                    oGrid.RowHeaders.Width = 0;


                    #region Color Setting
                    Color newRGBColor = Color.FromArgb(100, 100, 200);
                    //int rowForeColor = newRGBColor.R | (newRGBColor.G << 8) | (newRGBColor.B << 16);
                    string DefultFontColor = "#000000";

                    Color systemBackColor = Color.FromArgb(217, 229, 242);

                    int rowBackColor1 = Color.LightYellow.R | Color.LightYellow.G << 8 | Color.LightYellow.B << 16;
                    int rowBackColor2 = Color.LightCyan.R | Color.LightCyan.G << 8 | Color.LightCyan.B << 16;


                    int blueForeColor = Color.Blue.R | (Color.Blue.G << 8) | (Color.Blue.B << 16);
                    int redForeColor = Color.Red.R | Color.Red.G << 8 | Color.Red.B << 16;

                    //int iDefultFontColor = setting.GetCellFontColor(-1, 1);
                    int iDefultFontColor = Convert.ToInt32(System.Drawing.ColorTranslator.FromHtml(DefultFontColor).ToArgb());
                    int iDefultBackColor = systemBackColor.R | (systemBackColor.G << 8) | (systemBackColor.B << 16);
                    #endregion

                    #region GridColorSet
                    FN.SetColumnProperty(oForm, "grd", "BackColor=#DCDCDC");

                    XDocument root = XDocument.Parse(oGrid.DataTable.SerializeAsXML(BoDataTableXmlSelect.dxs_DataOnly));

                    //필터링 : 선택된 행의 컬랙션을 조회합니다.
                    var rows = from c in root.Descendants("Row")
                               where c.Elements("Cells").Elements("Cell").Any(o => o.Element("ColumnUid").Value == "ROWSID" && o.Element("Value").Value != "0")
                               select c;

                    string Row = string.Empty;

                    foreach (XElement r in rows)
                    {
                        foreach (XElement c in r.Descendants("Cell"))
                        {
                            string ColumnUid = c.Element("ColumnUid").Value;
                            string Value = c.Element("Value").Value;

                            if (ColumnUid == "LINENUM")
                            {
                                Row = c.Element("Value").Value;
                            }
                            else if (ColumnUid == "CARDNM")
                            {
                                if (Value == "소계")
                                    oGrid.CommonSetting.SetRowBackColor(Convert.ToInt32(Row), rowBackColor1);
                                else
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SD0180F_HRD.cs

示例3: GetAdvanceAmt

        private void GetAdvanceAmt(SAPbouiCOM.Form oForm)
        {           
            string strREADCD = string.Empty;
            try
            {
                oForm.Freeze(true);
                oUDS = oForm.DataSources.UserDataSources;
                oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
                strREADCD = oDB_M.GetValue("Code", 0).Trim();

               string strRtnValue =  FN.GetRecordsetValue(string.Format( " SELECT ISNULL(U_AMT,0) FROM KIS_VW_SO02401_HRD WHERE U_READCD = '{0}' " , strREADCD));
               oUDS.Item("edtADVANCE").Value = strRtnValue;

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

示例4: SetGridTitle

        public void SetGridTitle(SAPbouiCOM.Form oForm)
        {
            //ADD YOUR ACTION CODE HERE ...
            try
            {
                oForm.Freeze(true);

                //* 미발행 그리드 초기화 */
                oForm.DataSources.DataTables.Add("grd");
                oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
                oGrid.DataTable = oForm.DataSources.DataTables.Item("grd");

                FN.SetGridTitle(oGrid
                                , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnUid)
                                , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnName)
                                , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotVisible)
                                , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotEditable));
                oGrid.RowHeaders.Width = 0;
                oGrid.AutoResizeColumns();
                oGrid.SelectionMode = BoMatrixSelect.ms_NotSupported;
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText("SetGridTitle " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oForm.Freeze(false);
                oForm.Refresh();
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:31,代码来源:KIS_SO0030A_HRD.cs

示例5: FindData

        private void FindData(SAPbouiCOM.Form oForm)
        {
            string cv_ColumnsUID_s;
            string cv_NoEditable_s;
            string cv_ColumnsNAM_s;
            string cv_Right_Just_s;
            string cv_No_Visible_s;

            StringBuilder sb = new StringBuilder();

            string cboTAKEYM = string.Empty;
            string edtTAKEDT = string.Empty;

            try
            {
                oForm.Freeze(true);

                oUDS = oForm.DataSources.UserDataSources;
                cboTAKEYM = oUDS.Item("cboTAKEYM").ValueEx.Trim();
                edtTAKEDT = oUDS.Item("edtTAKEDT").ValueEx;


                oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
                oGrid.SelectionMode = BoMatrixSelect.ms_Single;

                cv_ColumnsUID_s = " DocEntry, U_TAKEYM, U_TAKEDT, U_SFILE, U_EFILE, U_TOTCNT, U_NEWCNT, U_MODCNT, U_CLOCNT, U_RCLCNT, CreateDate, CreateTime, USER_CODE ";
                cv_NoEditable_s = " DocEntry, U_TAKEYM, U_TAKEDT, U_SFILE, U_EFILE, U_TOTCNT, U_NEWCNT, U_MODCNT, U_CLOCNT, U_RCLCNT, CreateDate, CreateTime, USER_CODE ";
                cv_ColumnsNAM_s = " 문서번호, 신청접수년월, 신청접수일자, 신청파일이름, 결과파일이름, 총건수, 신규등록건수, 변경등록건수, 해지등록건수, 임의해지건수, 실행일자, 실행시간, 실행자 ";
                cv_Right_Just_s = " DocEntry, U_TOTCNT, U_NEWCNT, U_MODCNT, U_CLOCNT, U_RCLCNT ";
                cv_No_Visible_s = " ";

                sb.AppendLine(" SELECT T0.DocEntry                                                                      ");
                sb.AppendLine("      , T0.U_TAKEYM                                                                      ");
                sb.AppendLine("      , T0.U_TAKEDT                                                                      ");
                //sb.AppendLine("      , T0.U_DESC                                                                        ");
                sb.AppendLine("      , T0.U_SFILE                                                                       ");
                sb.AppendLine("      , T0.U_EFILE                                                                       ");
                sb.AppendLine("      , T0.U_TOTCNT                                                                      ");
                sb.AppendLine("      , T0.U_NEWCNT                                                                      ");
                sb.AppendLine("      , T0.U_MODCNT                                                                      ");
                sb.AppendLine("      , T0.U_CLOCNT                                                                      ");
                sb.AppendLine("      , T0.U_RCLCNT                                                                      ");
                sb.AppendLine("      , T0.CreateDate                                                                    ");
                sb.AppendLine("      , T0.CreateTime                                                                    ");
                sb.AppendLine("      , (SELECT F.USER_CODE FROM OUSR F WHERE F.USERID = T0.UserSign) AS USER_CODE       ");
                sb.AppendLine("   FROM [@KIS_SO0390T_HRD] T0                                                            ");
                sb.AppendLine("  WHERE (ISNULL('{0}','') = '' OR (T0.U_TAKEYM = '{0}'))                                 ");
                sb.AppendLine("    AND (ISNULL('{1}','') = '' OR (T0.U_TAKEDT = '{1}'))                                 ");
                sb.AppendLine("  ORDER BY T0.U_TAKEYM, T0.U_TAKEDT                                                      ");


                oForm.DataSources.DataTables.Item("grd").ExecuteQuery(string.Format(sb.ToString(), cboTAKEYM, edtTAKEDT));

                oGrid.DataTable = oForm.DataSources.DataTables.Item("grd"); //데이터 그리드에 Display

                if (oGrid.DataTable.Rows.Count == 1)
                {
                    if (oGrid.DataTable.Columns.Item("DocEntry").Cells.Item(0).Value.ToString().Trim() == "0")
                    {
                        oGrid.DataTable.Rows.Clear();
                    }
                }

                FN.SetGirdColumnLinkedObjec(ref oGrid, "DocEntry", BoLinkedObject.lf_ProfitCenter);

                FN.BindGrid(oGrid, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_NoEditable_s, cv_No_Visible_s, "", cv_Right_Just_s);

                oGrid.RowHeaders.Width = 0;

                oGrid.AutoResizeColumns();

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

示例6: FindData

        private SAPbouiCOM.DataTable FindData(SAPbouiCOM.Form oForm)
        {
            //ADD YOUR ACTION CODE HERE ...
            SAPbouiCOM.Grid oGrid;

            StringBuilder sb;
            string strCALLPER = string.Empty;
            string strColYyyyMm = string.Empty;

            string strCENTCE_FR = string.Empty;
            string strCENTCE_TO = string.Empty;
            try
            {
                oForm.Freeze(true);
                oUDS = oForm.DataSources.UserDataSources;

                strCALLPER = oUDS.Item("edtCALLPER").ValueEx;

                strCENTCE_FR = oUDS.Item("edtCENTCD1").ValueEx;
                strCENTCE_TO = oUDS.Item("edtCENTCD2").ValueEx;

                sb = new StringBuilder();
                //조회
                sb.AppendLine("  EXEC KIS_SP_SO0260F1_HRD @pQUERY_TYPE    = '{0}' ");
                sb.AppendLine("                         , @pPERSON        = '{1}' ");
                sb.AppendLine("                         , @pCENTCD_FR     = '{2}' ");
                sb.AppendLine("                         , @pCENTCD_TO     = '{3}' ");



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

                oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
                oForm.DataSources.DataTables.Item("grd").ExecuteQuery(string.Format(sb.ToString(), "Q", strCALLPER, strCENTCE_FR, strCENTCE_TO));
                oGrid.DataTable = oForm.DataSources.DataTables.Item("grd");


                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid.DataTable.Rows.Count == 1 && (oGrid.DataTable.GetValue("U_READCD", 0).ToString() == null || oGrid.DataTable.GetValue("U_READCD", 0).ToString() == ""))
                {
                    FN.SetGridTitle(oGrid
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnUid)
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnName)
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotVisible)
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotEditable));

                }
                else
                {
                    strColYyyyMm = FN.GetRecordsetValue(string.Format(sb.ToString(), "C", "", "", "", "")).Replace("[", "").Replace("]", "");
                    FN.SetGrdColumnNumber(ref oGrid, "", GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.AlignRight) + "," + strColYyyyMm, "", "");

                    // 독자 링크버튼추가
                    FN.SetGirdColumnLinkedObjec(ref oGrid, "U_READCD", BoLinkedObject.lf_BusinessPartner);

                    // 지국 링크버튼추가
                    FN.SetGirdColumnLinkedObjec(ref oGrid, "U_CENTCD", BoLinkedObject.lf_BusinessPartner);

                    FN.BindGrid(oGrid
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnUid) + "," + strColYyyyMm
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnName) + "," + strColYyyyMm
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotEditable) + "," + strColYyyyMm
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotVisible)
                        , ""
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.AlignRight) + "," + strColYyyyMm);

                    //FN.SetColoumnColor(oForm, "grd3", "#E0ECF8", "ETAX_YN,DTINO,DTSTAT"); //그리드 BG 기본색(#E6E6FA)
                    //oGrid.RowHeaders.Width = 0;

                    oGrid.AutoResizeColumns();
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText("ET_btnFind_AFItemPressed " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oForm.Freeze(false);
                oForm.Refresh();
            }
            SAPbouiCOM.DataTable dt = oForm.DataSources.DataTables.Item("grd");
            return dt;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:84,代码来源:KIS_SO0260F_HRD.cs

示例7: DBDataSourcesBindingData

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

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

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


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

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

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

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

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

示例8: FindData2

        private void FindData2(SAPbouiCOM.Form oForm)
        {
            string cv_ColumnsUID_s;
            string cv_NoEditable_s;
            string cv_ColumnsNAM_s;
            string cv_Right_Just_s;
            string cv_No_Visible_s;

            oGrid1 = (SAPbouiCOM.Grid)oForm.Items.Item("grd1").Specific;
            oGrid2 = (SAPbouiCOM.Grid)oForm.Items.Item("grd2").Specific;
            oGrid2.SelectionMode = BoMatrixSelect.ms_None;
            StringBuilder pQuery = new StringBuilder();
            string sQry = string.Empty;

            if (iROW != -1)
            {
                oForm.Items.Item("edtEMPNO2").Specific.value = oGrid1.DataTable.GetValue("U_EMPNO", iROW);
                oForm.Items.Item("edtDEPTNM").Specific.value = oGrid1.DataTable.GetValue("U_DEPTNM", iROW);
                oForm.Items.Item("edtJIKGBNM").Specific.value = oGrid1.DataTable.GetValue("U_JIKGBNM", iROW);
                oForm.Items.Item("edtJIKCHNM").Specific.value = oGrid1.DataTable.GetValue("U_JIKCHNM", iROW);
            }

            //고과항목 그리드호출
            try
            {
                cv_ColumnsUID_s = "U_CHEKER, U_EMPNM, U_DEPTCD, U_JIKGBCD, U_JIKCHKCD, U_PASSYN, Code";
                cv_NoEditable_s = "U_CHEKER, U_EMPNM, U_DEPTCD, U_JIKGBCD, U_JIKCHKCD, Code";
                cv_ColumnsNAM_s = "고과,사원,부서,직급,직책,상태,코드";
                cv_Right_Just_s = " ";
                cv_No_Visible_s = "Code";

                #region 조회Query
                pQuery.Clear();
                pQuery.AppendLine(" SELECT                            ");
                pQuery.AppendLine("    U_CHEKER                      ");
                pQuery.AppendLine("   ,U_EMPNM                       ");
                pQuery.AppendLine("   ,U_DEPTCD                      ");
                pQuery.AppendLine("   ,U_JIKGBCD                     ");
                pQuery.AppendLine("   ,U_JIKCHKCD                    ");
                pQuery.AppendLine("   ,U_PASSYN                      ");
                pQuery.AppendLine("   ,Code                          ");
                pQuery.AppendLine("   FROM [@KIS_HR00203_HRD]        ");
                pQuery.AppendLine("  WHERE Code = '{0}'              ");
                sQry = string.Format(pQuery.ToString(), GRIDCODE);
                #endregion

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

                oForm.DataSources.DataTables.Item("grd2").ExecuteQuery(sQry);
                oGrid2.DataTable = oForm.DataSources.DataTables.Item("grd2"); //데이터 그리드에 Display          

                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid2.DataTable.Rows.Count == 1 && oGrid2.DataTable.GetValue("U_CHEKER", 0).ToString() == "")
                {
                    FN.SetGridTitle(oGrid2, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_No_Visible_s);
                    B1Connections.theAppl.StatusBar.SetText("데이터가 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터가 없습니다.
                }
                else
                {
                    FN.BindGrid(oGrid2, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_NoEditable_s, cv_No_Visible_s, "", cv_Right_Just_s);

                    FN.SetGridCombo(ref oGrid2, "U_CHEKER", "", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR12' AND U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid2, "U_DEPTCD", "", " SELECT U_DEPTCD,U_DEPTNM FROM [@KIS_HR00401] WHERE U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid2, "U_JIKGBCD", "", " SELECT U_SMLCD,U_SMLNM FROM [@KIS_AD00101] WHERE CODE = 'HR11' AND U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid2, "U_JIKCHKCD", "", " SELECT U_SMLCD,U_SMLNM FROM [@KIS_AD00101] WHERE CODE = 'HR14' AND U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid2, "U_PASSYN", "", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR11' AND U_USEYN = 'Y'", "");

                    B1Connections.theAppl.StatusBar.SetText("조회완료", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); //조회완료
                    oGrid2.RowHeaders.Width = 0;
                    //FN.SetGirdSort(ref oGrid1);
                    oGrid2.AutoResizeColumns();
                }

            }
            catch (Exception ex)
            {

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

            }
            finally
            {
                oForm.Freeze(false);
                iROW = -1;
                GRIDCODE = "SAVE";
                oGrid2 = null;
            }

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

示例9: FindData2

        private void FindData2(SAPbouiCOM.Form oForm)
        {
            string cv_ColumnsUID_s;
            string cv_NoEditable_s;
            string cv_ColumnsNAM_s;
            string cv_Right_Just_s;
            string cv_No_Visible_s;

            oGrid2 = (SAPbouiCOM.Grid)oForm.Items.Item("grd2").Specific;
            oGrid2.SelectionMode = BoMatrixSelect.ms_None;

            oForm.Freeze(true);

            //고과항목 그리드호출
            try
            {
                cv_ColumnsUID_s = "Code,U_DTCD, U_ABILCD, U_COMPOCD, U_BASESC, U_CONTENTS,U_GRADE4,U_GRADE1,U_GRADE2,U_GRADE3,U_LASTGAF";
                cv_NoEditable_s = "Code,U_DTCD, U_ABILCD, U_COMPOCD, U_BASESC, U_CONTENTS,U_GRADE4,U_GRADE1,U_GRADE2,U_GRADE3,U_LASTGAF";
                cv_ColumnsNAM_s = "코드,구분,역량,구성요소,배점,구성요소내용,평가등급,1차고과등급,2차고과등급,3차고과등급,최종등급";
                cv_Right_Just_s = "U_BASESC";
                cv_No_Visible_s = "Code";

                string sQry = "";

                sQry = " EXEC KIS_SP_HR0100F1_HRD '" + EXAMCD + "','" + GRIDCODE + "'";

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

                oForm.DataSources.DataTables.Item("grd2").ExecuteQuery(sQry);
                oGrid2.DataTable = oForm.DataSources.DataTables.Item("grd2"); //데이터 그리드에 Display          

                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid2.DataTable.Rows.Count == 1 && oGrid2.DataTable.GetValue("U_DTCD", 0).ToString() == "")
                {
                    FN.SetGridTitle(oGrid2, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_No_Visible_s);
                    B1Connections.theAppl.StatusBar.SetText("데이터가 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터가 없습니다.
                }
                else
                {
                    FN.BindGrid(oGrid2, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_NoEditable_s, cv_No_Visible_s, "", cv_Right_Just_s);

                    FN.SetGridCombo(ref oGrid2, "U_DTCD", "", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR02' AND U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid2, "U_ABILCD", "", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR03' AND U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid2, "U_COMPOCD", "", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR04' AND U_USEYN = 'Y'", "");

                    FN.SetGridCombo(ref oGrid2, "U_GRADE4", "", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR15' AND U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid2, "U_GRADE1", "", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR15' AND U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid2, "U_GRADE2", "", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR15' AND U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid2, "U_GRADE3", "", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201]  WHERE CODE = 'HR15' AND U_USEYN = 'Y'", "");

                    B1Connections.theAppl.StatusBar.SetText("조회완료", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); //조회완료
                    oGrid2.RowHeaders.Width = 0;
                    //FN.SetGirdSort(ref oGrid1);
                    oGrid2.AutoResizeColumns();
                }

            }
            catch (Exception ex)
            {

                B1Connections.theAppl.StatusBar.SetText("btnFIND_OnAfterItemPressed " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);

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

示例10: FindData1

        private void FindData1(SAPbouiCOM.Form oForm)
        {
            string cv_ColumnsUID_s;
            string cv_NoEditable_s;
            string cv_ColumnsNAM_s;
            string cv_Right_Just_s;
            string cv_No_Visible_s;

            EXAMCD = oForm.Items.Item("cboYEAR").Specific.Value;
            string EMPNO = oForm.Items.Item("edtEMPNO").Specific.Value;
            string DEPT = oForm.Items.Item("cboDEPT").Specific.Value;

            try
            {
                oGrid1 = (SAPbouiCOM.Grid)oForm.Items.Item("grd1").Specific;
                oGrid1.SelectionMode = BoMatrixSelect.ms_Single;

                cv_ColumnsUID_s = "U_EMPNO, U_EMPNM, U_DEPTCD, U_SCORE4, U_GRADE4, U_SCORE1, U_GRADE1, U_SCORE2, U_GRADE2, U_SCORE3, U_GRADE3,U_LASTSAF,U_LASTGAF,Code";
                cv_NoEditable_s = "U_EMPNO, U_EMPNM, U_DEPTCD, U_SCORE4, U_GRADE4, U_SCORE1, U_GRADE1, U_SCORE2, U_GRADE2, U_SCORE3, U_GRADE3,U_LASTSAF,U_LASTGAF,Code";
                cv_ColumnsNAM_s = "사원코드,사원명,부서,본인점수,본인등급,1차고과점수,1차고과등급,2차고과점수,2차고과등급,3차고과점수,3차고과등급,최종점수,최종등급,코드";
                cv_Right_Just_s = " ";
                cv_No_Visible_s = "Code";

                string sQry = "";

                sQry = " EXEC KIS_SP_HR0100F0_HRD '" + EXAMCD + "','" + EMPNO + "','" + DEPT + "'";

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

                oForm.Freeze(true);

                oForm.DataSources.DataTables.Item("grd1").ExecuteQuery(sQry);
                oGrid1.DataTable = oForm.DataSources.DataTables.Item("grd1"); //데이터 그리드에 Display          

                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid1.DataTable.Rows.Count == 1 && oGrid1.DataTable.GetValue("U_EMPNO", 0).ToString() == "")
                {
                    FN.SetGridTitle(oGrid1, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_No_Visible_s);
                    B1Connections.theAppl.StatusBar.SetText("데이터가 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터가 없습니다.
                }
                else
                {
                    FN.BindGrid(oGrid1, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_NoEditable_s, cv_No_Visible_s, "", cv_Right_Just_s);
                    FN.SetGridCombo(ref oGrid1, "U_DEPTCD", "", " SELECT U_DEPTCD,U_DEPTNM FROM [@KIS_HR00401] WHERE U_USEYN = 'Y'", "");
                    B1Connections.theAppl.StatusBar.SetText("조회완료", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); //조회완료
                    oGrid1.RowHeaders.Width = 0;
                    //FN.SetGirdSort(ref oGrid1);
                    oGrid1.AutoResizeColumns();
                }

            }
            catch (Exception ex)
            {

                B1Connections.theAppl.StatusBar.SetText("btnFIND_OnAfterItemPressed " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);

            }
            finally
            {
                oForm.Freeze(false);
                GRIDCODE = "";
                oGrid1 = null;

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

示例11: SetGridValidate

        private void SetGridValidate(SAPbouiCOM.Form oForm, SAPbouiCOM.Grid oGrid, ItemEvent pVal)
        {
            try
            {
                if (pVal.Row < 0)
                {
                    if (pVal.ColUID == "CHK")
                    {
                        oForm.Freeze(true);
                        SAPbouiCOM.UserDataSources oUserData;
                        oUserData = oForm.DataSources.UserDataSources;

                        for (int i = 0; i <= oGrid.DataTable.Rows.Count - 1; i++)
                        {
                            if (!Chk_b)
                            {
                                oGrid.DataTable.Columns.Item("CHK").Cells.Item(i).Value = CFL.YES_MARK;
                            }
                            else
                            {
                                oGrid.DataTable.Columns.Item("CHK").Cells.Item(i).Value = CFL.NO_MARK;
                            }
                        }
                        Chk_b = !Chk_b;
                        //RecalAMT(oForm, oGrid);
                    }
                }
                else
                {
                    oGrid.Rows.SelectedRows.Clear();
                    oGrid.Rows.SelectedRows.Add(pVal.Row);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                oForm.Freeze(false);
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:42,代码来源:KIS_SO0230A_HRD.cs

示例12: FindData

        private void FindData(SAPbouiCOM.Form oForm)
        {
            //ADD YOUR ACTION CODE HERE ...
            SAPbouiCOM.Grid oGrid;

            StringBuilder sb;
            string strQueryTp = string.Empty;
            string strYyyyMm_F = string.Empty;
            string strYyyyMm_T = string.Empty;
            string strReadCd_F = string.Empty;
            string strReadCd_T = string.Empty;
            string strCentCd_F = string.Empty;
            string strCentCd_T = string.Empty;
            string strBillTp = string.Empty;

            string strISSUEDT_F = string.Empty;
            string strISSUEDT_T = string.Empty;

            try
            {
                oForm.Freeze(true);
                oUDS = oForm.DataSources.UserDataSources;

                strQueryTp = oUDS.Item("optALL").ValueEx;
                strYyyyMm_F = oUDS.Item("cboREQYM_F").ValueEx;
                strYyyyMm_T = oUDS.Item("cboREQYM_T").ValueEx;
                strReadCd_F = oUDS.Item("edtREAD_F").ValueEx;
                strReadCd_T = oUDS.Item("edtREAD_T").ValueEx;
                strCentCd_F = oUDS.Item("edtCENT_F").ValueEx;
                strCentCd_T = oUDS.Item("edtCENT_T").ValueEx;
                strBillTp = oUDS.Item("cboBILLTP").ValueEx;

                strISSUEDT_F = oUDS.Item("edtISSUDT1").ValueEx;
                strISSUEDT_T = oUDS.Item("edtISSUDT2").ValueEx;

                sb = new StringBuilder();
                //조회
                sb.AppendFormat(" EXEC KIS_SP_SO0230F1_HRD @pFOLDLEV   = '{0}' ", oForm.PaneLevel.ToString());
                sb.AppendFormat("                        , @pQUERYTP   = '{0}' ", strQueryTp);
                sb.AppendFormat("                        , @pDATE_FR   = '{0}' ", strYyyyMm_F);
                sb.AppendFormat("                        , @pDATE_TO   = '{0}' ", strYyyyMm_T);
                sb.AppendFormat("                        , @pREAD_FR   = '{0}' ", strReadCd_F);
                sb.AppendFormat("                        , @pREAD_TO   = '{0}' ", strReadCd_T);
                sb.AppendFormat("                        , @pCENT_FR   = '{0}' ", strCentCd_F);
                sb.AppendFormat("                        , @pCENT_TO   = '{0}' ", strCentCd_T);
                sb.AppendFormat("                        , @pBILLTP    = '{0}' ", strBillTp);

                sb.AppendFormat("                        , @pISSUDT1   = '{0}' ", strISSUEDT_F);
                sb.AppendFormat("                        , @pISSUDT2   = '{0}' ", strISSUEDT_T);

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

                switch (oForm.PaneLevel)
                {
                    case 1:
                        oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd1").Specific;
                        oForm.DataSources.DataTables.Item("grd1").ExecuteQuery(sb.ToString());
                        oGrid.DataTable = oForm.DataSources.DataTables.Item("grd1"); //데이터 그리드에 Display
                        FN.SetGirdSort(ref oGrid);
                        FN.SetSumField(ref oGrid, "SUPPAMT");
                        break;
                    case 2:
                        oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd2").Specific;
                        oForm.DataSources.DataTables.Item("grd2").ExecuteQuery(sb.ToString());
                        oGrid.DataTable = oForm.DataSources.DataTables.Item("grd2"); //데이터 그리드에 Display
                        FN.SetGirdSort(ref oGrid);
                        FN.SetSumField(ref oGrid, "SUPPAMT");
                        break;
                    case 3:
                        oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd3").Specific;
                        oForm.DataSources.DataTables.Item("grd3").ExecuteQuery(sb.ToString());
                        oGrid.DataTable = oForm.DataSources.DataTables.Item("grd3"); //데이터 그리드에 Display
                        FN.SetSumField(ref oGrid, "PRICE,QTY,SUPPAMT");
                        break;
                    default:
                        oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd1").Specific;
                        break;
                }


                //그리드 컬럼셋팅
                FN.SetGridCheckBox(ref oGrid, "CHK", true);

                //그리드 컬럼셋팅
                FN.SetGridComboDataBind(ref oGrid, "DOCTP", "R:독자,C:지국", BoComboDisplayType.cdt_Description);

                //2. 세금그룹
                FN.SetComboBoxValidValues(oGrid, "VATGRUP", "SELECT Code, Name FROM OVTG WHERE Code = 'A0' ", FN.Enum_WholeTp.m_Nothing);

                //3. 계산서발행구분
                FN.SetComboBoxValidValues(oGrid, "BILLGBN", "SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code ='SO15' ", FN.Enum_WholeTp.m_Nothing);

                //링크컬럼셋팅
                FN.SetGirdColumnLinkedObjec(ref oGrid, "CODE", BoLinkedObject.lf_BusinessPartner); // 독자/지국링크
                FN.SetGirdColumnLinkedObjec(ref oGrid, "CARDCODE", BoLinkedObject.lf_BusinessPartner);
                //FN.SetGirdColumnLinkedObjec(ref oGrid, "VATGRUP", BoLinkedObject.lf_VatGroup);

                if (oForm.PaneLevel == 3)
                {
                    FN.SetGridCheckBox(ref oGrid, "ETAX_YN", true);
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SO0230A_HRD.cs

示例13: FindData

        private static void FindData(SAPbouiCOM.Form oForm)
        {
            SAPbouiCOM.Grid oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;

            string edtDOCDTF = oForm.DataSources.UserDataSources.Item("edtDOCDTF").Value;
            string edtDOCDTT = oForm.DataSources.UserDataSources.Item("edtDOCDTT").Value;
            string cboPRCCD = oForm.DataSources.UserDataSources.Item("cboPRCCD").Value;
            string cboSLPCD = oForm.DataSources.UserDataSources.Item("cboSLPCD").Value;
            string edtCARDCDF = oForm.DataSources.UserDataSources.Item("edtCARDCDF").Value;
            string edtBPCDF = oForm.DataSources.UserDataSources.Item("edtBPCDF").Value;
            string cboPUBLICA = oForm.DataSources.UserDataSources.Item("cboPUBLICA").Value;

            StringBuilder pQuery = new StringBuilder();
            string query = string.Empty;

            pQuery.AppendLine(" EXEC [KIS_SP_SD0150F_HRD]                    ");
            pQuery.AppendLine(" 	   @edtDOCDTF   = '{0}'                  ");
            pQuery.AppendLine(" 	  ,@edtDOCDTT	= '{1}'	                 ");
            pQuery.AppendLine(" 	  ,@cboPRCCD    = '{2}'		             ");
            pQuery.AppendLine(" 	  ,@cboSLPCD	= '{3}'	                 ");
            pQuery.AppendLine(" 	  ,@edtCARDCDF  = '{4}'		             ");
            pQuery.AppendLine(" 	  ,@edtBPCDF    = '{5}'		             ");
            pQuery.AppendLine(" 	  ,@cboPUBLICA  = '{6}'		             ");
            string sQry = string.Format(pQuery.ToString(), edtDOCDTF, edtDOCDTT, cboPRCCD, cboSLPCD, edtCARDCDF, edtBPCDF, cboPUBLICA);

            try
            {
                oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
                oGrid.SelectionMode = BoMatrixSelect.ms_Single;

                string cv_ColumnsUID_s = "U_DOCDT,U_PUBLICA,U_CARDCD,U_CARDNM,U_AMTSUM,U_VATSUM,U_DOCTOT,DPMSUM,U_SLPNM,U_BPCD,U_BPNM";
                string cv_NoEditable_s = "U_DOCDT,U_PUBLICA,U_CARDCD,U_CARDNM,U_AMTSUM,U_VATSUM,U_DOCTOT,DPMSUM,U_SLPNM,U_BPCD,U_BPNM";
                string cv_ColumnsNAM_s = "전기일,간행물,매출처,매출처명,매출액,매출부가세,매출합계,미수금,영업사원,대행사,대행사명";
                string cv_Right_Just_s = "U_AMTSUM,U_VATSUM,U_DOCTOT,DPMSUM";
                string cv_No_Visible_s = " ";

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

                oForm.Freeze(true);

                oForm.DataSources.DataTables.Item("grd").ExecuteQuery(sQry);
                oGrid.DataTable = oForm.DataSources.DataTables.Item("grd"); //데이터 그리드에 Display      

                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid.DataTable.Rows.Count == 1 && oGrid.DataTable.GetValue(1, 0).ToString() == "")
                {
                    FN.SetGridTitle(oGrid, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_No_Visible_s);
                    B1Connections.theAppl.StatusBar.SetText("데이터가 없습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터가 없습니다.
                }
                else
                {
                    FN.BindGrid(oGrid, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_NoEditable_s, cv_No_Visible_s, "", cv_Right_Just_s);
                    FN.SetGridSumField(ref oGrid, cv_Right_Just_s);
                    FN.SetGirdColumnLinkedObjec(ref oGrid, "U_CARDCD", BoLinkedObject.lf_BusinessPartner);
                    FN.SetGirdColumnLinkedObjec(ref oGrid, "U_BPCD", BoLinkedObject.lf_BusinessPartner);
                    B1Connections.theAppl.StatusBar.SetText("조회완료", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); //조회완료
                    oGrid.RowHeaders.Width = 0;
                    FN.SetGirdSort(ref oGrid);
                    oGrid.AutoResizeColumns();
                }

            }
            catch (Exception ex)
            {

                B1Connections.theAppl.StatusBar.SetText("btnFIND_OnAfterItemPressed " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);

            }
            finally
            {
                oForm.Freeze(false);

                oGrid = null;

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

示例14: FindData

        private SAPbouiCOM.DataTable FindData(SAPbouiCOM.Form oForm)
        {
            //ADD YOUR ACTION CODE HERE ...
            SAPbouiCOM.Grid oGrid;

            StringBuilder sb;
            string strREQDT_FR = string.Empty;
            string strREQDT_TO = string.Empty;
            string strREADCD_FR = string.Empty;
            string strREADCD_TO = string.Empty;

            string strPAPERTP = string.Empty;
            string strBRANCHCD = string.Empty;
            string strSALECD = string.Empty;
            string strSTATUS = string.Empty;

            try
            {
                oForm.Freeze(true);
                oUDS = oForm.DataSources.UserDataSources;

                strREQDT_FR = oUDS.Item("edtREQDT1").ValueEx;
                strREQDT_TO = oUDS.Item("edtREQDT2").ValueEx;
                strREADCD_FR = oUDS.Item("edtREADCD1").ValueEx;
                strREADCD_TO = oUDS.Item("edtREADCD2").ValueEx;
                strPAPERTP = oUDS.Item("cboPAPERTP").ValueEx;
                strBRANCHCD = oUDS.Item("edtBRCHCD").ValueEx;
                strSALECD = oUDS.Item("edtSALECD").ValueEx;
                strSTATUS = oUDS.Item("cboSTATUS").ValueEx;


                sb = new StringBuilder();
                //조회
                sb.AppendFormat("  EXEC KIS_SP_SO0130F1_HRD @pREQDT_FR    = '{0}' ", strREQDT_FR);
                sb.AppendFormat("                         , @pREQDT_TO    = '{0}' ", strREQDT_TO);
                sb.AppendFormat("                         , @pREADCD_FR   = '{0}' ", strREADCD_FR);
                sb.AppendFormat("                         , @pREADCD_TO   = '{0}' ", strREADCD_TO);
                sb.AppendFormat("                         , @pPAPERTP     = '{0}' ", strPAPERTP);
                sb.AppendFormat("                         , @pBRANCHCD    = '{0}' ", strBRANCHCD);
                sb.AppendFormat("                         , @pSALECD      = '{0}' ", strSALECD);
                sb.AppendFormat("                         , @pSTATUS      = '{0}' ", strSTATUS);


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

                oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
                oForm.DataSources.DataTables.Item("grd").ExecuteQuery(sb.ToString());
                oGrid.DataTable = oForm.DataSources.DataTables.Item("grd"); //데이터 그리드에 Display                  

                //1. 지종
                //FN.SetComboBoxValidValues(oGrid, "U_PAPERTP", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code ='SO01' ", FN.Enum_WholeTp.m_Nothing);           

                //2. 상태
                //FN.SetComboBoxValidValues(oGrid, "U_STATUS", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code ='SO13' ", FN.Enum_WholeTp.m_Nothing);
                            

                // 독자 링크버튼추가
                FN.SetGirdColumnLinkedObjec(ref oGrid, "READCD", BoLinkedObject.lf_BusinessPartner);

                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid.DataTable.Rows.Count == 1 && (oGrid.DataTable.GetValue("READCD", 0).ToString() == null || oGrid.DataTable.GetValue("READCD", 0).ToString() == ""))
                {
                    FN.SetGridTitle(oGrid
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnUid)
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnName)
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotVisible)
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotEditable));

                }
                else
                {
                    FN.BindGrid(oGrid
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnUid)
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.ColumnName)
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotEditable)
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.NotVisible)
                        , ""
                        , GetGridFieldInfo(oForm, SO.SO_COMMON_HRD.GridTitleType.AlignRight));

                    //FN.SetColoumnColor(oForm, "grd3", "#E0ECF8", "ETAX_YN,DTINO,DTSTAT"); //그리드 BG 기본색(#E6E6FA)
                    oGrid.RowHeaders.Width = 0;
                    oGrid.AutoResizeColumns();
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText("ET_btnFind_AFItemPressed " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oForm.Freeze(false);
                oForm.Refresh();
            }
            SAPbouiCOM.DataTable dt = oForm.DataSources.DataTables.Item("grd");
            return dt;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:96,代码来源:KIS_SO0130F_HRD.cs

示例15: SetGridTitle

        public void SetGridTitle(SAPbouiCOM.Form oForm)
        {
            oForm.Freeze(true);

            oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
            oForm.DataSources.DataTables.Item("grd").Clear();
            oGrid.DataTable = oForm.DataSources.DataTables.Item("grd");

            string cv_ColumnsUID_s = "GROUP1,CARDNM,BMON1,MON1,BMON2,MON2,BMON3,MON3,BMON4,MON4,BMON5,MON5,BMON6,MON6,BMON7,MON7,BMON8,MON8,BMON9,MON9,BMON10,MON10,BMON11,MON11,BMON12,MON12,BAMTSUM,AMTSUM";
            string cv_ColumnsNAM_s = "고객그룹-기업,BP명,전년도1월,조회년도1월,전년도2월,조회년도2월,전년도3월,조회년도3월,전년도4월,조회년도4월,전년도5월,조회년도5월,전년도6월,조회년도6월,전년도7월,조회년도7월,전년도8월,조회년도8월,전년도9월,조회년도9월,전년도10월,조회년도10월,전년도11월,조회년도11월,전년도12월,조회년도12월,전년도합계,조회년도합계";
            string cv_No_Visible_s = " ";

            FN.SetGridTitle(oGrid, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_No_Visible_s);

            oGrid.RowHeaders.Width = 0;

            oGrid.AutoResizeColumns();

            oForm.Freeze(false);
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:20,代码来源:KIS_SD0180F_HRD.cs


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