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


C# Grid.AutoResizeColumns方法代码示例

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


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

示例1: SetGridTitle

        public void SetGridTitle(SAPbouiCOM.Form oForm)
        {
            oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
            oGrid.DataTable = oForm.DataSources.DataTables.Item("grd");

            string cv_ColumnsUID_s = "피고과자,현부서,희망직무,희망부서,변경시기,전환희망사유,고과자의견";
            string cv_ColumnsNAM_s = "피고과자,현부서,희망직무,희망부서,변경시기,전환희망사유,고과자의견";
            string cv_No_Visible_s = " ";

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

            oGrid.RowHeaders.Width = 0;

            oGrid.AutoResizeColumns();

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

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

示例3: FindRequestData


//.........这里部分代码省略.........
                sb.AppendLine(" 			      FROM [@KIS_SO01403_HRD] F                                                                                 ");
                sb.AppendLine(" 			     WHERE A.DocEntry = F.DocEntry                                                                              ");
                sb.AppendLine(" 				   AND A.LineId = F.U_UPLINEID                                                                              ");
                sb.AppendLine(" 				   AND F.U_TYPE IN ('110', '120') ) AS U_AMT                                                                ");
                sb.AppendLine(" 			 , CASE WHEN ISNULL(B.U_TYPE, '') NOT IN ('110', '120','150') THEN ISNULL(B.U_CREDIT, 0) ELSE 0 END AS U_INAMT  ");
                sb.AppendLine(" 			 , B.U_DATE					                                                                                    ");
                sb.AppendLine(" 			 , ISNULL(B.U_DEBIT,0) AS U_DEBIT                                                                               ");
                sb.AppendLine(" 			 , ISNULL(B.U_CREDIT,0) AS U_CREDIT                                                                             ");
                sb.AppendLine(" 			 , B.U_TYPE                                                                                                     ");
                sb.AppendLine(" 			 , (SELECT F.U_SMLNM FROM [@KIS_AD00201] F WHERE F.Code = 'SO54' AND F.U_CD = B.U_TYPE) AS U_SMLNM              ");
                sb.AppendLine(" 			 , (SELECT F.U_SMLNM FROM [@KIS_AD00201] F WHERE F.Code = 'SO51' AND F.U_SMLCD = B.U_SUBTYPE) AS U_SMLNM2       ");
                sb.AppendLine(" 			 , A.U_STATUS                                                                                                   ");
                sb.AppendLine(" 		  FROM [@KIS_SO01401_HRD] A                                                                                         ");
                sb.AppendLine(" 		       LEFT OUTER JOIN [@KIS_SO01403_HRD] B ON A.DocEntry = B.DocEntry                                              ");
                sb.AppendLine(" 													AND A.LineId = B.U_UPLINEID                                             ");
                sb.AppendLine(" 													AND B.U_TYPE NOT IN ('110', '120', '150')                               ");
                sb.AppendLine(" 	   ) M                                                                                                                  ");
                sb.AppendLine("   WHERE M.U_AMT <> 0 AND M.U_READCD = '{0}'                                                                                 ");
                sb.AppendLine("   ORDER BY M.U_READCD, M.U_REQYM                                                                                            ");
                */

                sb.AppendLine(" SELECT CASE WHEN ROW_NUMBER() OVER (PARTITION BY M.U_READCD, M.U_REQYM ORDER BY M.U_READCD, M.U_REQYM, M.U_AMT, M.DocEntry, M.LineId, M.U_DATE) = 1 THEN M.U_REQYM ELSE NULL END AS U_YYYYMM                                                     ");
                sb.AppendLine("      , CASE WHEN ROW_NUMBER() OVER (PARTITION BY M.U_READCD, M.U_REQYM ORDER BY M.U_READCD, M.U_REQYM, M.U_AMT, M.DocEntry, M.LineId, M.U_DATE) = 1 THEN M.U_AMT ELSE NULL END AS REQAMT                                                         ");
                sb.AppendLine("      , M.U_DATE     AS DEPO_DATE                                                                                            ");
                sb.AppendLine("      , M.U_INAMT    AS DEPO_AMT                                                                                             ");
                sb.AppendLine("      , M.U_SMLNM + (CASE ISNULL(M.U_SMLNM2,'') WHEN '' THEN '' ELSE ' ' + M.U_SMLNM2 END) AS U_PMETHOD                      ");
                sb.AppendLine("      , M.U_STATUS   AS U_STATUS                                                                                             ");
                sb.AppendLine("   FROM (                                                                                                                    ");
                sb.AppendLine(" 		SELECT A.U_READCD                                                                                                   ");
                sb.AppendLine(" 			 , A.U_REQYM                                                                                                    ");
                sb.AppendLine(" 			 , A.DocEntry                                                                                                   ");
                sb.AppendLine(" 			 , A.LineId                                                                                                     ");
                sb.AppendLine(" 			 , ISNULL((SELECT SUM(ISNULL(F.U_DEBIT, 0))                                                                     ");
                sb.AppendLine(" 			             FROM [@KIS_SO01403_HRD] F                                                                          ");
                sb.AppendLine(" 			            WHERE A.DocEntry = F.DocEntry                                                                       ");
                sb.AppendLine(" 				          AND A.LineId = F.U_UPLINEID                                                                       ");
                sb.AppendLine(" 				          AND F.U_TYPE IN ('110') ), 0) AS U_AMT                                                            ");
                sb.AppendLine(" 			 , CASE WHEN ISNULL(B.U_TYPE, '') NOT IN ('110','150','910','920','000') THEN ISNULL(B.U_CREDIT, 0) ELSE 0 END AS U_INAMT         ");
                sb.AppendLine(" 			 , B.U_DATE					                                                                                    ");
                sb.AppendLine(" 			 , ISNULL(B.U_DEBIT,0) AS U_DEBIT                                                                               ");
                sb.AppendLine(" 			 , ISNULL(B.U_CREDIT,0) AS U_CREDIT                                                                             ");
                sb.AppendLine(" 			 , B.U_TYPE                                                                                                     ");
                sb.AppendLine(" 			 , (SELECT F.U_SMLNM FROM [@KIS_AD00201] F WHERE F.Code = 'SO54' AND F.U_CD = B.U_TYPE) AS U_SMLNM              ");
                sb.AppendLine(" 			 , (SELECT F.U_SMLNM FROM [@KIS_AD00201] F WHERE F.Code = 'SO51' AND F.U_SMLCD = B.U_SUBTYPE) AS U_SMLNM2       ");
                sb.AppendLine(" 			 , A.U_STATUS                                                                                                   ");
                sb.AppendLine(" 		  FROM [@KIS_SO01401_HRD] A                                                                                         ");
                sb.AppendLine(" 		       LEFT OUTER JOIN [@KIS_SO01403_HRD] B ON A.DocEntry = B.DocEntry                                              ");
                sb.AppendLine(" 													AND A.LineId = B.U_UPLINEID                                             ");
                sb.AppendLine(" 													AND B.U_TYPE NOT IN ('110','150','910','920','000')                                       ");
                sb.AppendLine(" 	   ) M                                                                                                                  ");
                sb.AppendLine("   WHERE M.U_AMT <> 0 AND M.U_READCD = '{0}'                                                                                 ");
                sb.AppendLine("   ORDER BY M.U_READCD, M.U_REQYM                                                                                            ");

                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(), strREADCD));
                oGrid.DataTable = oForm.DataSources.DataTables.Item("grd"); //데이터 그리드에 Display                  

                //1. 납부방법
                //FN.SetComboBoxValidValues(oGrid, "U_PMETHOD", " SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code ='SO09' ", FN.Enum_WholeTp.m_Nothing);

                //2. 상태
                FN.SetComboBoxValidValues(oGrid, "U_STATUS", " SELECT 'O' [Code], '미납' AS [Name] UNION ALL SELECT 'C' [Code], '완납' AS [Name]  ", FN.Enum_WholeTp.m_Nothing);

                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid.DataTable.Rows.Count == 1 && (oGrid.DataTable.GetValue("U_YYYYMM", 0).ToString() == null || oGrid.DataTable.GetValue("U_YYYYMM", 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("FindRequestData " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oForm.Freeze(false);
                oForm.Refresh();
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SO0030A_HRD.cs

示例4: SetGridTitle

        public void SetGridTitle(SAPbouiCOM.Form oForm)
        {
            oGrid2 = (SAPbouiCOM.Grid)oForm.Items.Item("grd2").Specific;
            oGrid2.DataTable = oForm.DataSources.DataTables.Item("grd2");

            string cv_ColumnsUID_s = "U_CHEKER, U_EMPNM, U_DEPTCD, U_JIKGBCD, U_JIKCHKCD, U_PASSYN, Code";
            string cv_ColumnsNAM_s = "고과,사원,부서,직급,직책,상태,코드";
            string cv_No_Visible_s = "Code";

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

            oGrid2.RowHeaders.Width = 0;

            oGrid2.AutoResizeColumns();

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

示例5: FindData

        internal static void FindData(SAPbouiCOM.Form oForm)
        {

            string pFORMUID = oForm.DataSources.UserDataSources.Item("pFORMUID").ValueEx;
            SAPbouiCOM.Form pForm = (SAPbouiCOM.Form)B1Connections.theAppl.Forms.Item(pFORMUID);
            SAPbouiCOM.Grid oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;

            string cboBPLID = string.Empty;
            string edtFRDT = string.Empty;
            string edtTODT = string.Empty;
            string edtFRPRCCD = string.Empty;
            string edtTOPRCCD = string.Empty;
            string cboTRANSTY = string.Empty;

            string strReportFiles = string.Empty;

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

            try
            {
                oForm.Items.Item("grd").Enabled = false;

                cboBPLID = pForm.DataSources.UserDataSources.Item("cboBPLID").Value;
                edtFRDT = pForm.DataSources.UserDataSources.Item("edtFRDT").Value;
                edtTODT = pForm.DataSources.UserDataSources.Item("edtTODT").Value;
                edtFRPRCCD = pForm.DataSources.UserDataSources.Item("edtFRPRCCD").Value;
                edtTOPRCCD = pForm.DataSources.UserDataSources.Item("edtTOPRCCD").Value;
                cboTRANSTY = pForm.DataSources.UserDataSources.Item("cboTRANSTY").Value;

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

                pQuery.Append(" EXEC KIS_SP_FI0050F1_HRD  @cboBPLID         = '{0}' ");
                pQuery.Append("                         , @edtFRDT          = '{1}' ");
                pQuery.Append("                         , @edtTODT          = '{2}' ");
                pQuery.Append("                         , @edtFRPRCCD       = '{3}' ");
                pQuery.Append("                         , @edtTOPRCCD       = '{4}' ");
                pQuery.Append("                         , @cboTRANSTY       = '{5}' ");

                string cv_ColumnsUID_s = "ROWSID,U_BPLID,RefDate,TransId,U_PRCNM,Debit,Credit,JEDT,U_PRCCD,BatchNum,TransType,TransNM,CreateDate";
                string cv_NoEditable_s = "ROWSID,U_BPLID,RefDate,TransId,U_PRCNM,Debit,Credit,JEDT,U_PRCCD,BatchNum,TransType,TransNM,CreateDate";
                string cv_ColumnsNAM_s = "#,사업장,전기일자,분개번호,코스트센터명,차변,대변,분개장 전기일,코스트센터,분개장 번호,입력경로코드,입력경로,분개 생성일";
                string cv_Right_Just_s = "Debit,Credit";
                string cv_No_Visible_s = "TransType";
                
                B1Connections.theAppl.StatusBar.SetText("데이터 조회중입니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); //데이터 조회중입니다

                oForm.Freeze(true);

                string sQry = (string.Format(pQuery.ToString()
                                        , cboBPLID
                                        , edtFRDT
                                        , edtTODT
                                        , edtFRPRCCD
                                        , edtTOPRCCD
                                        , cboTRANSTY
                                        ));

                oForm.DataSources.DataTables.Item("grd").ExecuteQuery(sQry);

                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid.DataTable.Rows.Count == 0)
                {
                    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.SetGirdColumnLinkedObjec(ref oGrid, "TransId", BoLinkedObject.lf_JournalPosting);//분개
                    FN.SetGirdColumnLinkedObjec(ref oGrid, "BatchNum", BoLinkedObject.lf_JournalVoucher);//분개장

                    /* 자동정렬 */
                    oGrid.AutoResizeColumns();

                    /*컬럼 길이 조작*/
                    oGrid.RowHeaders.Width = 0;

                    B1Connections.theAppl.StatusBar.SetText("조회완료", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); //조회완료

                }

            }
            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,代码行数:100,代码来源:KIS_FI0051F_HRD.cs

示例6: FindData

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

            string FRRDCD = oForm.DataSources.UserDataSources.Item("edtFRRDCD").ValueEx;
            string TORDCD = oForm.DataSources.UserDataSources.Item("edtTORDCD").ValueEx;
            string FRRECDT = oForm.DataSources.UserDataSources.Item("edtFRRECDT").ValueEx;
            string TORECDT = oForm.DataSources.UserDataSources.Item("edtTORECDT").ValueEx;
            string FRDELCD = oForm.DataSources.UserDataSources.Item("edtFRDELCD").ValueEx;
            string TODELCD = oForm.DataSources.UserDataSources.Item("edtTODELCD").ValueEx;
            string CALLTP = oForm.DataSources.UserDataSources.Item("cboCALLTP").ValueEx;
            string RECVID = oForm.DataSources.UserDataSources.Item("edtRECVID").ValueEx;
            string PROSTAT = oForm.DataSources.UserDataSources.Item("cboPROSTAT").ValueEx;
            string SPROCNM = B1Connections.theAppl.Company.UserName;

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

            pQuery.AppendLine(" EXEC [KIS_SP_SO0080A_HRD]                 ");
            pQuery.AppendLine(" 	  	@TYPE='FIND'                      ");
            pQuery.AppendLine(" 	  ,	@FRRDCD='{0}'                     ");
            pQuery.AppendLine(" 	  ,	@TORDCD='{1}'                     ");
            pQuery.AppendLine(" 	  ,	@FRRECVDT='{2}'                   ");
            pQuery.AppendLine(" 	  ,	@TORECVDT='{3}'                   ");
            pQuery.AppendLine(" 	  ,	@FRDELVCD='{4}'                   ");
            pQuery.AppendLine(" 	  ,	@TODELVCD='{5}'                   ");
            pQuery.AppendLine(" 	  ,	@CALLTP='{6}'                     ");
            pQuery.AppendLine(" 	  ,	@RECVID='{7}'                     ");
            pQuery.AppendLine(" 	  ,	@PROSTAT='{8}'                    ");

            pQuery.AppendLine(" 	  ,	@SDELVCD=''                       ");
            pQuery.AppendLine(" 	  ,	@SLINEID=''                       ");
            pQuery.AppendLine(" 	  ,	@SPROCOMM=''                      ");
            pQuery.AppendLine(" 	  ,	@SPROCNM='{9}'                    ");
            pQuery.AppendLine(" 	  ,	@SPROCDT=''                       ");
            string sQry = string.Format(pQuery.ToString(), FRRDCD, TORDCD, FRRECDT, TORECDT, FRDELCD, TODELCD, CALLTP, RECVID, PROSTAT, SPROCNM);

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

                string cv_ColumnsUID_s = "CHK,LINEID,U_RECVDT,CODE,NAME,U_DELVCD,U_RDEPT,U_CALLTP,U_TEL,U_PAYNM,U_CENTNM,U_COMMENT,U_PROCOMM,U_RECVNM,U_PROCDT,U_PROCNM,U_MEMO";
                string cv_NoEditable_s = "LINEID,U_RECVDT,CODE,NAME,U_DELVCD,U_RDEPT,U_CALLTP,U_TEL,U_PAYNM,U_CENTNM,U_COMMENT,U_RECVNM,U_PROCDT,U_PROCNM,U_MEMO";
                string cv_ColumnsNAM_s = "체크,라인번호,상담일,독자코드,독자이름,배달코드,구독부서,콜유형,전화번호,요금제,분국,접수내용,처리결과,작업자,처리일자,처리자,U_MEMO";
                string cv_Right_Just_s = " ";
                string cv_No_Visible_s = "U_MEMO ";
                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("LINEID", 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);
                    oGrid.Columns.Item(0).Type = BoGridColumnType.gct_CheckBox;
                    
                    B1Connections.theAppl.StatusBar.SetText("조회완료", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); //조회완료
                    oGrid.RowHeaders.Width = 0;
                    //FN.SetGirdSort(ref oGrid1);
                    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,代码行数:86,代码来源:KIS_SO0080A_HRD.cs

示例7: 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;
            StringBuilder pQuery = new StringBuilder();
            string sQry = string.Empty;

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

                cv_ColumnsUID_s = "U_EMPNM, U_DEPTNM, U_EMPNO, U_JIKCHNM, U_JIKGBNM, Code";
                cv_NoEditable_s = "U_EMPNM, U_DEPTNM, U_EMPNO, U_JIKCHNM, U_JIKGBNM, Code";
                cv_ColumnsNAM_s = "사원명,부서명,사원코드,직책,직급,코드";
                cv_Right_Just_s = " ";
                cv_No_Visible_s = "U_EMPNO,U_JIKCHNM,U_JIKGBNM,Code";

                #region 조회Query
                pQuery.Clear();
                pQuery.Append(" EXEC KIS_SP_HR0060B0_HRD '{0}','{1}','{2}'");

                //pQuery.AppendLine(" SELECT                              ");
                //pQuery.AppendLine("  A.U_EMPNM		AS U_EMPNM          ");
                //pQuery.AppendLine(" ,C.U_DEPTNM		AS U_DEPTNM         ");
                //pQuery.AppendLine(" ,A.U_EMPNO      AS U_EMPNO          ");
                //pQuery.AppendLine(" ,B.U_JIKCHNM	AS U_JIKCHNM        ");
                //pQuery.AppendLine(" ,B.U_JIKGBNM    AS U_JIKGBNM        ");
                //pQuery.AppendLine(" ,A.Code         AS Code             ");
                //pQuery.AppendLine(" FROM [@KIS_HR0020M_HRD] A           ");
                //pQuery.AppendLine(" INNER JOIN [@KIS_HR0120M] B ON A.U_EMPNO = B.U_EMPNO    ");
                //pQuery.AppendLine(" INNER JOIN [@KIS_HR01202] C ON B.Code = C.Code          ");
                //pQuery.AppendLine(" INNER JOIN [@KIS_AD00201] D ON A.U_EXAMCD = D.U_SMLCD AND D.Code = 'HR01' AND D.U_RMK2 = 'U03'    ");
                //pQuery.AppendLine(" WHERE A.U_EXAMCD = '{0}'                    ");
                //pQuery.AppendLine(" AND (A.U_STATUS = 'Y')                      ");
                //pQuery.AppendLine(" AND (A.U_DEPTCD = '{1}' OR '{1}' = '')      ");
                //pQuery.AppendLine(" AND (A.U_EMPNO = '{2}' OR '{2}' = '')       ");
                sQry = string.Format(pQuery.ToString(), EXAMCD, DEPT, EMPNO);
                #endregion

                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_EMPNM", 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);
                    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);

                oGrid1 = null;

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

示例8: FindData


//.........这里部分代码省略.........
                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);
                    FN.SetGridComboDataBind(ref oGrid, "INPUTP", "A:자동,M:수기", BoComboDisplayType.cdt_Description);
                    FN.SetComboBoxValidValues(oGrid, "DTSTAT", " SELECT  U_CD, U_SMLNM FROM [@KIS_AD00101] WHERE Code ='VT14' ", FN.Enum_WholeTp.m_Nothing);
                }
                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid.DataTable.Rows.Count == 1 && (oGrid.DataTable.GetValue("CODE", 0).ToString() == null || oGrid.DataTable.GetValue("CODE", 0).ToString() == ""))
                {
                    FN.SetGridTitle(oGrid
                        , GetGridFieldInfo(oForm, oForm.PaneLevel, SO.SO_COMMON_HRD.GridTitleType.ColumnUid)
                        , GetGridFieldInfo(oForm, oForm.PaneLevel, SO.SO_COMMON_HRD.GridTitleType.ColumnName)
                        , GetGridFieldInfo(oForm, oForm.PaneLevel, SO.SO_COMMON_HRD.GridTitleType.NotVisible)
                        , GetGridFieldInfo(oForm, oForm.PaneLevel, SO.SO_COMMON_HRD.GridTitleType.NotEditable));

                }
                else
                {
                    FN.BindGrid(oGrid
                        , GetGridFieldInfo(oForm, oForm.PaneLevel, SO.SO_COMMON_HRD.GridTitleType.ColumnUid)
                        , GetGridFieldInfo(oForm, oForm.PaneLevel, SO.SO_COMMON_HRD.GridTitleType.ColumnName)
                        , GetGridFieldInfo(oForm, oForm.PaneLevel, SO.SO_COMMON_HRD.GridTitleType.NotEditable)
                        , GetGridFieldInfo(oForm, oForm.PaneLevel, SO.SO_COMMON_HRD.GridTitleType.NotVisible)
                        , ""
                        , GetGridFieldInfo(oForm, oForm.PaneLevel, 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();
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SO0230A_HRD.cs

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

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

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

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

示例13: FindData


//.........这里部分代码省略.........
                    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
                                    oGrid.CommonSetting.SetRowBackColor(Convert.ToInt32(Row), rowBackColor2);
                            }

                        }
                    }
                    #endregion

                    //for (int i = 0; i < oGrid.Rows.Count; i++)
                    //{
                    //    if (oGrid.DataTable.GetValue("CARDNM", i) == "소계")
                    //    {
                    //        oGrid.CommonSetting.SetRowBackColor(i + 1, rowBackColor1);
                    //    }
                    //    else if(oGrid.DataTable.GetValue("CARDNM", i) == "합계")
                    //    {
                    //        oGrid.CommonSetting.SetRowBackColor(i + 1, rowBackColor2);
                    //    }
                    //    else
                    //    {
                    //        oGrid.CommonSetting.SetRowBackColor(i + 1, iDefultBackColor);
                    //    }
                    //}
                    oGrid.CommonSetting.FixedColumnsCount = 3;

                    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,代码行数:101,代码来源:KIS_SD0180F_HRD.cs

示例14: 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;

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

            EXAMCD = oForm.Items.Item("cboYEAR").Specific.Value;

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

                cv_ColumnsUID_s = "U_LINENUM, U_EMPNO, U_EMPNM, U_DEPTCD, U_DEPTNM, U_PASSYNL, U_PASSYNT, U_HEADER, U_LINE,RANK,LASTG";
                cv_NoEditable_s = "U_LINENUM, U_EMPNO, U_EMPNM, U_DEPTCD, U_DEPTNM, U_PASSYNL, U_PASSYNT, U_HEADER, U_LINE,RANK,LASTG";
                cv_ColumnsNAM_s = "#,사번,사원명,부서코드,부서명,본인고과,고과자,헤더정보,라인정보,순위,최종등급";
                cv_Right_Just_s = " ";
                cv_No_Visible_s = "U_HEADER, U_LINE,RANK,LASTG";

                string sQry = "";
                sQry = string.Format(" EXEC [KIS_SP_HR0010B2_HRD] '1','{0}'",EXAMCD);

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

                oForm.Freeze(true);

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

                //조회된 내역이 없어도 1줄이 추가되므로 키값을 체크하여 조회안된 경우 1줄 삭제
                if (oGrid.DataTable.Rows.Count == 1 && oGrid.DataTable.GetValue("U_EMPNO", 0).ToString() == "")
                {
                    FN.SetGridTitle(oGrid, cv_ColumnsUID_s, cv_ColumnsNAM_s, cv_No_Visible_s);
                    oForm.Items.Item("edtCREATE").Specific.Value = oGrid.DataTable.Rows.Count;
                    oForm.Items.Item("edtCOMPL").Specific.Value = 0;
                    oForm.Items.Item("edtINCOMPL").Specific.value = oForm.Items.Item("edtPERSON").Specific.Value;
                    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.SetGridCombo(ref oGrid, "U_PASSYNL", "", " SELECT U_SMLCD,U_SMLNM FROM [@KIS_AD00201] WHERE CODE = 'HR11' AND U_USEYN = 'Y'", "");
                    FN.SetGridCombo(ref oGrid, "U_PASSYNT", "", " 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); //조회완료
                    oGrid.RowHeaders.Width = 0;
                    oGrid.AutoResizeColumns();

                    sQry = string.Format(" EXEC [KIS_SP_HR0010B2_HRD] '2','{0}'",EXAMCD);
                    oRS.DoQuery(sQry);
                    
                    oForm.Items.Item("edtCREATE").Specific.Value = oGrid.DataTable.Rows.Count;
                    oForm.Items.Item("edtCOMPL").Specific.Value = oRS.Fields.Item(0).Value;
                    oForm.Items.Item("edtINCOMPL").Specific.value = Convert.ToInt16(oForm.Items.Item("edtCREATE").Specific.Value) - Convert.ToInt16(oForm.Items.Item("edtCOMPL").Specific.Value);
                }

            }
            catch (Exception ex)
            {

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

            }
            finally
            {
                oForm.Freeze(false);
                oForm.Items.Item("btnSAVE").Enabled = true;
                STATE = true;
                oGrid = null;

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

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


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