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


C# SAPbouiCOM.Grid类代码示例

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


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

示例1: OnInitializeComponent

 /// <summary>
 /// Initialize components. Called by framework after form created.
 /// </summary>
 public override void OnInitializeComponent()
 {
     userConfigSQLTemplate = this.GetSQL("addInStartupManagementSQLTemplate.sql");
     this.gridUser = ((SAPbouiCOM.Grid)(this.GetItem("gridUser").Specific));
     this.gridCfg = ((SAPbouiCOM.Grid)(this.GetItem("gridCfg").Specific));
     this.generalGrid = ((SAPbouiCOM.Grid)(this.GetItem("gridGnrl").Specific));
     this.configTemp = this.UIAPIRawForm.DataSources.DataTables.Item("configTemp");
     this.OnCustomInitialize();
 }
开发者ID:THJLI,项目名称:dover,代码行数:12,代码来源:AddInStartupManagement.cs

示例2: SubFormInit

        public void SubFormInit(string KeyValue)
        {
            this.LoadForm();
            oForm = B1Connections.theAppl.Forms.Item(formuid);
            oForm.Freeze(true);
            this.Act1_FormInit();
            if (oForm.Mode != BoFormMode.fm_VIEW_MODE) { oForm.Mode = BoFormMode.fm_OK_MODE; }

            oForm.Freeze(false);
            oForm.Visible = true;

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

            for (int iLooper = 0; iLooper < oGrid.Rows.Count; iLooper++)
            {
                if (oGrid.DataTable.Columns.Item("Code").Cells.Item(oGrid.GetDataTableRowIndex(iLooper)).Value.ToString() == KeyValue)
                {
                    Veiw_Grid_SelectedRow(iLooper);
                    break;
                }
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:22,代码来源:KIS_SD0010A_HRD.cs

示例3: FindData

        /// <summary>
        /// Grid 조회
        /// </summary>
        /// <param name="oForm">폼</param>
        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 edtDOCDTF = pForm.DataSources.UserDataSources.Item("edtDOCDTF").Value;
            string edtDOCDTT = pForm.DataSources.UserDataSources.Item("edtDOCDTT").Value;
            string cboSLPCD = pForm.DataSources.UserDataSources.Item("cboSLPCD").Value;
            string cboBILLTP = pForm.DataSources.UserDataSources.Item("cboBILLTP").Value;
            string edtCARDCDF = pForm.DataSources.UserDataSources.Item("edtCARDCDF").Value;
            string cboPRCCD2 = pForm.DataSources.UserDataSources.Item("cboPRCCD2").Value;
            string edtBPCDF = pForm.DataSources.UserDataSources.Item("edtBPCDF").Value;
            string cboPRCCD = pForm.DataSources.UserDataSources.Item("cboPRCCD").Value;
            string edtDOCDTF2 = pForm.DataSources.UserDataSources.Item("edtDOCDTF2").Value;
            string edtDOCDTT2 = pForm.DataSources.UserDataSources.Item("edtDOCDTT2").Value;
            string cboPUBLICA = pForm.DataSources.UserDataSources.Item("cboPUBLICA").Value;

            string cboPAYTP = pForm.DataSources.UserDataSources.Item("cboPAYTP").Value;
            string edtPAYMTH = pForm.DataSources.UserDataSources.Item("edtPAYMTH").Value;

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

            pQuery.AppendLine(" EXEC [KIS_SP_SD0140F_HRD]                    ");
            pQuery.AppendLine(" 	   @edtDOCDTF = '{0}'                    ");
            pQuery.AppendLine(" 	  ,@edtDOCDTT	= '{1}'	                 ");
            pQuery.AppendLine(" 	  ,@cboSLPCD	= '{2}'	                 ");
            pQuery.AppendLine(" 	  ,@cboBILLTP = '{3}'	                 ");
            pQuery.AppendLine(" 	  ,@edtCARDCDF = '{4}'		             ");
            pQuery.AppendLine(" 	  ,@cboPRCCD2 = '{5}'		             ");
            pQuery.AppendLine(" 	  ,@edtBPCDF = '{6}'		             ");
            pQuery.AppendLine(" 	  ,@cboPRCCD = '{7}'		             ");
            pQuery.AppendLine(" 	  ,@edtDOCDTF2 = '{8}'	                 ");
            pQuery.AppendLine(" 	  ,@edtDOCDTT2 = '{9}'	                 ");
            pQuery.AppendLine(" 	  ,@cboPUBLICA = '{10}'	                 ");

            pQuery.AppendLine(" 	  ,@cboPAYTP = '{11}'	                 ");
            pQuery.AppendLine(" 	  ,@edtPAYMTH = '{12}'	                 ");

            string sQry = string.Format(pQuery.ToString(), edtDOCDTF, edtDOCDTT, cboSLPCD, cboBILLTP, edtCARDCDF, cboPRCCD2, edtBPCDF, cboPRCCD, edtDOCDTF2, edtDOCDTT2, cboPUBLICA, cboPAYTP, edtPAYMTH);

            try
            {
                oGrid.SelectionMode = BoMatrixSelect.ms_Single;

                string cv_ColumnsUID_s = "ORDERBY,U_DOCDT,U_DOCDT2,DocEntry,U_PUBLICA,U_CARDCD,U_CARDNM,U_BILLTP,U_PAYTP,U_PAYMNM,U_DEPAMT,U_DEDUTION,AMTSUM,U_BPCD,U_BPNM,U_DOCTOT,U_PRCNM,U_SLPNM,IDX";
                string cv_NoEditable_s = "ORDERBY,U_DOCDT,U_DOCDT2,DocEntry,U_PUBLICA,U_CARDCD,U_CARDNM,U_BILLTP,U_PAYTP,U_PAYMNM,U_DEPAMT,U_DEDUTION,AMTSUM,U_BPCD,U_BPNM,U_DOCTOT,U_PRCNM,U_SLPNM,IDX";
                string cv_ColumnsNAM_s = "ORDERBY,수금전기일,매출전기일,문서번호,간행물,매출처,매출처명,수금유형,지급유형,지급방법,입금합계,공제금액,총수금액,대행사,대행사명,매출합계,수금부서,영업사원,IDX";
                string cv_Right_Just_s = "U_DEPAMT,U_DEDUTION,AMTSUM,U_DOCTOT";
                string cv_No_Visible_s = "ORDERBY,IDX";

                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(2, 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, "DocEntry", BoLinkedObject.lf_BusinessPartner);
                    FN.SetGirdColumnLinkedObjec(ref oGrid, "U_CARDCD", BoLinkedObject.lf_BusinessPartner);
                    FN.SetGirdColumnLinkedObjec(ref oGrid, "U_BPCD", BoLinkedObject.lf_BusinessPartner);

                    //지급유형
                    SAPbouiCOM.EditTextColumn oEditCol = (SAPbouiCOM.EditTextColumn)oGrid.Columns.Item("U_PAYTP");
                    oEditCol.Type = BoGridColumnType.gct_ComboBox;
                    SAPbouiCOM.ComboBoxColumn oComboCol = (SAPbouiCOM.ComboBoxColumn)oGrid.Columns.Item("U_PAYTP");
                    oComboCol.ValidValues.Add("1", "현금");
                    oComboCol.ValidValues.Add("2", "은행이체");
                    oComboCol.ValidValues.Add("3", "어음");
                    oComboCol.ValidValues.Add("4", "대체");
                    oComboCol.DisplayType = BoComboDisplayType.cdt_Description;

                    //수금유형
                    oEditCol = (SAPbouiCOM.EditTextColumn)oGrid.Columns.Item("U_BILLTP");
                    oEditCol.Type = BoGridColumnType.gct_ComboBox;
                    oComboCol = (SAPbouiCOM.ComboBoxColumn)oGrid.Columns.Item("U_BILLTP");
                    oComboCol.ValidValues.Add("1", "입금");
                    oComboCol.ValidValues.Add("2", "선수입금");
                    oComboCol.ValidValues.Add("3", "대행료 대체입금");
                    oComboCol.ValidValues.Add("4", "지급");
                    oComboCol.ValidValues.Add("5", "기타 대체");
                    oComboCol.DisplayType = BoComboDisplayType.cdt_Description;


                    B1Connections.theAppl.StatusBar.SetText("조회완료", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success); //조회완료
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SD0141F_HRD.cs

示例4: ET_grd_BFClick

        public virtual bool ET_grd_BFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd").Specific));
            // ADD YOUR ACTION CODE HERE ...

            if (pVal.Row == -1)
            {
                oGrid.SelectionMode = BoMatrixSelect.ms_None;
            }
            else { oGrid.SelectionMode = BoMatrixSelect.ms_Single; }

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

示例5: ClearUnManagedObject

 private void ClearUnManagedObject()
 {
     if (oButton != null) { Marshal.ReleaseComObject(oButton); } oButton = null;
     if (oGrid != null) { Marshal.ReleaseComObject(oGrid); } oGrid = null;
     if ((oForm != null)) { Marshal.ReleaseComObject(oForm); } oForm = null;
     // ADD YOUR ACTION CODE HERE ...
     System.GC.Collect();
     System.GC.WaitForPendingFinalizers();
 }
开发者ID:wldyd0210,项目名称:TEST,代码行数:9,代码来源:KIS_SD0141F_HRD.cs

示例6: FindRequestData

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

            StringBuilder sb;
            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();

                sb = new StringBuilder();
                //조회
                /*
                sb.AppendLine(" SELECT M.U_REQYM    AS U_YYYYMM                                                                                             ");
                sb.AppendLine("      , M.U_AMT      AS REQAMT                                                                                               ");
                sb.AppendLine("      , M.U_DATE     AS DEPO_DATE                                                                                            ");
                sb.AppendLine("      , M.U_INAMT    AS DEPO_AMT                                                                                             ");
                sb.AppendLine("      , M.U_SMLNM + ' ' + M.U_SMLNM2    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(" 			 , (SELECT SUM(CASE ISNULL(F.U_TYPE, '') WHEN '110' THEN ISNULL(F.U_DEBIT, 0)                                   ");
                sb.AppendLine(" 												 WHEN '120' THEN (-1) * ISNULL(F.U_CREDIT, 0)                               ");
                sb.AppendLine(" 											     ELSE 0 END)                                                                ");
                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
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SO0030A_HRD.cs

示例7: ClearUnManagedObject

        private void ClearUnManagedObject()
        {
            if (oComboBox != null) { Marshal.ReleaseComObject(oComboBox); } oComboBox = null;
            if (oGrid != null) { Marshal.ReleaseComObject(oGrid); } oGrid = null;
            if (oUDS != null) { Marshal.ReleaseComObject(oUDS); } oUDS = null;
            //if (gDs.Tables[oForm.UniqueID + "_Deliver"] != null) gDs.Tables[oForm.UniqueID + "_Deliver"] = null;
            //if (gDs.Tables[oForm.UniqueID + "_Call"] != null) gDs.Tables[oForm.UniqueID + "_Call"] = null;
            if (gDs != null)
            {
                if(gDs.Tables.Contains(oForm.UniqueID + "_Deliver"))
                {
                    gDs.Tables.Remove(oForm.UniqueID + "_Deliver");
                }

                if (gDs.Tables.Contains(oForm.UniqueID + "_Call"))
                {
                    gDs.Tables.Remove(oForm.UniqueID + "_Call");
                }
            }
            if (oDB_M != null) { Marshal.ReleaseComObject(oDB_M); } oDB_M = null;
            if (oMatrix != null) { Marshal.ReleaseComObject(oMatrix); } oMatrix = null;
            if (oDB1_O != null) { Marshal.ReleaseComObject(oDB1_O); } oDB1_O = null;
            if (oDB1_Z != null) { Marshal.ReleaseComObject(oDB1_Z); } oDB1_Z = null;
            if (oDB2_O != null) { Marshal.ReleaseComObject(oDB2_O); } oDB2_O = null;
            if (oDB2_Z != null) { Marshal.ReleaseComObject(oDB2_Z); } oDB2_Z = null;
            if (oRS != null) { Marshal.ReleaseComObject(oRS); } oRS = null;
            if (oEditText != null) { Marshal.ReleaseComObject(oEditText); } oEditText = null;

            if ((oForm != null))
            {
                Marshal.ReleaseComObject(oForm);
            }
            oForm = null;
            // ADD YOUR ACTION CODE HERE ...
            System.GC.Collect();
            System.GC.WaitForPendingFinalizers();
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:37,代码来源:KIS_SO0030A_HRD.cs

示例8: CancelData

        private bool CancelData(SAPbouiCOM.Form oForm)
        {
            bool rtnValue = true;
            StringBuilder sb = new StringBuilder();

            string strValue = string.Empty;
            string pDocEntry = string.Empty;

            SAPbobsCOM.Recordset oRS = null;

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

                oGrid = oForm.Items.Item("grd").Specific;
                int idx = oGrid.GetDataTableRowIndex(oGrid.Rows.SelectedRows.Item(0, BoOrderType.ot_SelectionOrder));

                pDocEntry = FN.GetGridCellValue(ref oGrid, "DocEntry", idx);

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

                sb.AppendLine(" EXEC KIS_SP_SO0390B_HRD ");
                sb.AppendFormat("      @pDocEntry = '{0}' "     , pDocEntry);
                sb.AppendFormat("    , @pWorkGubun = '{0}' "    , "D");

                oRS.DoQuery(sb.ToString());
                B1Connections.theAppl.StatusBar.SetText("CMS 출금이체신청 내역 삭제를 완료 하였습니다.", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success);

            }
            catch (Exception ex)
            {
                rtnValue = false;
                B1Connections.theAppl.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oGrid = null;
                if (oRS != null) { Marshal.ReleaseComObject(oRS); } oRS = null;
            }
            return rtnValue;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:41,代码来源:KIS_SO0390B_HRD.cs

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

示例10: SetGridCalc_Sum

        /// <summary>
        /// 그리드 컬럼 합계를 계산하고 헤더테이블의 DBDataSource에 갱신합니다.
        /// </summary>
        private void SetGridCalc_Sum()
        {
            try
            {
                oGrid = oForm.Items.Item("grd1").Specific;

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

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


                //금액 집계
                double U_OPENAMT = TR_COMMON_HRD.GetCoumnValue(query, "U_OPENAMT").Sum();//총 입금액
                double U_TRANSAMT = TR_COMMON_HRD.GetCoumnValue(query, "U_TRANSAMT").Sum();//총 지급액
                //double U_DEDUTION = GetCoumnValue(query, "U_DEDUTION").Sum();//공제액

                ///*컬럼 합계*/
                ((SAPbouiCOM.EditTextColumn)oGrid.Columns.Item("U_OPENAMT")).ColumnSetting.SumValue = U_OPENAMT.ToString();
                ((SAPbouiCOM.EditTextColumn)oGrid.Columns.Item("U_TRANSAMT")).ColumnSetting.SumValue = U_TRANSAMT.ToString();

            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:34,代码来源:KIS_TR0021F_HRD.cs

示例11: ET_grd1_BFClick

        public virtual bool ET_grd1_BFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
            // ADD YOUR ACTION CODE HERE ...
            try
            {

                    if (pVal.ColUID == "U_CHK")
                    {
                        #region U_CHK 클릭시 기능 구현
                        if (pVal.Row >= 0)
                        {
                            oForm.Freeze(true);
                            try
                            {
                                #region 문서단위 그룹선택 기능구현
                                int iRowIndex = oGrid.GetDataTableRowIndex(pVal.Row);


                                string U_CHK = oGrid.DataTable.GetValue("U_CHK", iRowIndex).ToString().Trim();

                                if (U_CHK == "N")
                                {
                                    oGrid.DataTable.SetValue("U_CHK", iRowIndex, "Y");
                                    if (oGrid.Rows.IsSelected(pVal.Row) == false)
                                    {
                                        oGrid.Rows.SelectedRows.Add(pVal.Row);
                                    }
                                }
                                else
                                {
                                    oGrid.DataTable.SetValue("U_CHK", iRowIndex, "N");
                                    if (oGrid.Rows.IsSelected(pVal.Row))
                                    {
                                        oGrid.Rows.SelectedRows.Remove(pVal.Row);
                                    }
                                }

                                #endregion
                            }
                            catch (Exception)
                            {
                                throw;
                            }
                            finally
                            {
                                SetGridCalc_Sum();
                                oForm.Freeze(false);
                            }
                            return false;

                        }
                        else
                        {
                            //전체선택
                            SetGridColumn_CheckBox_SelectAll(ref oGrid, "U_CHK");
                            SetGridCalc_Sum();
                            return false;
                        }
                        #endregion

                    }// end (pVal.ColUID == "U_CHK")
            }
            catch (Exception ex)
            {

                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
            return true;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:71,代码来源:KIS_TR0021F_HRD.cs

示例12: ET_grd1_AFValidate

 public virtual void ET_grd1_AFValidate(ItemEvent pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
     // ADD YOUR ACTION CODE HERE ...
     try
     {
         ((SAPbouiCOM.EditTextColumn)oGrid.Columns.Item("U_TRANSAMT")).ColumnSetting.SumValue = TR_COMMON_HRD.GetGridCalc_SumValue(ref oForm, "U_TRANSAMT").ToString();
     }
     catch (Exception ex)
     {
         B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
     }
 }
开发者ID:wldyd0210,项目名称:TEST,代码行数:14,代码来源:KIS_TR0021F_HRD.cs

示例13: ET_grd1_BFValidate

        public virtual bool ET_grd1_BFValidate(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
            // ADD YOUR ACTION CODE HERE ...

            try
            {
                if (pVal.ItemChanged)
                {
                    oForm.Freeze(true);

                    try
                    {
                        switch (oGrid.Columns.Item(pVal.ColUID).UniqueID)
                        {
                            case "U_TRANSAMT":

                                int iRowIndex = oGrid.GetDataTableRowIndex(pVal.Row);

                                string U_CHK = oGrid.DataTable.GetValue("U_CHK", iRowIndex).ToString().Trim();

                                if (U_CHK == "N")
                                {
                                    oGrid.DataTable.SetValue("U_CHK", iRowIndex, "Y");
                                    if (oGrid.Rows.IsSelected(pVal.Row) == false)
                                    {
                                        oGrid.Rows.SelectedRows.Add(pVal.Row);
                                    }
                                }
                                break;
                            default:
                                break;
                        }
                    }
                    catch (Exception)
                    {

                        throw;
                    }
                    finally
                    {
                        oForm.Freeze(false);
                    }

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

示例14: UDO_Add_Data

        private void UDO_Add_Data(string U_FILENM)
        {

            SAPbobsCOM.GeneralService oGeneralService = null;
            SAPbobsCOM.GeneralData oGeneralData = null;
            SAPbobsCOM.GeneralDataCollection oChildren = null;
            SAPbobsCOM.GeneralData oChild = null;
            SAPbobsCOM.GeneralDataParams oGeneralParams = null;
            SAPbobsCOM.CompanyService oCompanyService = (SAPbobsCOM.CompanyService)B1Connections.diCompany.GetCompanyService();


            try
            {
                oGrid = oForm.Items.Item("grd1").Specific;

                oGeneralService = oCompanyService.GetGeneralService("KIS_TR0031_HRD");

                oGeneralData = (SAPbobsCOM.GeneralData)oGeneralService.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralData);

                //헤더 추가
                //FN.SetGeneralDataTHeader(ref oGeneralData, ref oKIS_SD0080T_HRD, BoUDOObjectType.udo_Document);

                string U_BPLID = oForm.DataSources.UserDataSources.Item("cboBPLID").Value;
                string U_VATRNUM = oForm.DataSources.UserDataSources.Item("edtVATRNUM").Value;
                string U_ACCOUNT = oForm.DataSources.UserDataSources.Item("edtACCOUNT").Value;
                string U_ACCTCD = oForm.DataSources.UserDataSources.Item("edtACCTCD").Value;
                string U_ACCTNM = oForm.DataSources.UserDataSources.Item("edtACCTNM").Value;
                string U_PAYDT = FN.SetDateFormatToDB( oForm.DataSources.UserDataSources.Item("edtPAYDT").Value);
                string U_PRCCD = oForm.DataSources.UserDataSources.Item("edtPRCCD").Value;
                string U_PRCNM = oForm.DataSources.UserDataSources.Item("edtPRCNM").Value;
                string U_DOCDT = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyy-MM-dd");

                #region 헤더추가

                oGeneralData.SetProperty("U_BPLID", U_BPLID);//사업장
                oGeneralData.SetProperty("U_VATRNUM", U_VATRNUM);//주민등록번호
                oGeneralData.SetProperty("U_ACCOUNT", U_ACCOUNT);//출금계좌
                oGeneralData.SetProperty("U_ACCTCD", U_ACCTCD);//출금계정
                oGeneralData.SetProperty("U_ACCTNM", U_ACCTNM);//출금계정명
                oGeneralData.SetProperty("U_PAYDT", U_PAYDT);//지급일
                oGeneralData.SetProperty("U_PRCCD", U_PRCCD);//코스트센터
                oGeneralData.SetProperty("U_PRCNM", U_PRCNM);//코스트센터
                oGeneralData.SetProperty("U_FILENM", U_FILENM);//파일이름 

                oGeneralData.SetProperty("U_DOCDT", U_DOCDT);//생성일

                #endregion


                #region 라인추가

                oChildren = oGeneralData.Child("KIS_TR00311_HRD");

                string sXML = oGrid.DataTable.SerializeAsXML(BoDataTableXmlSelect.dxs_DataOnly);

                XDocument root = XDocument.Parse(sXML);

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

                foreach (XElement r in query)
                {
                    oChild = oChildren.Add();
                    //변수 =>  매핑
                    foreach (XElement c in r.Descendants("Cell"))
                    {
                        switch (c.Element("ColumnUid").Value)
                        {
                            case "U_DOCDT"://전기일
                            case "U_DUEDT"://만기일
                                oChild.SetProperty(c.Element("ColumnUid").Value,FN.SetDateFormatToDB(c.Element("Value").Value));
                                break;

                            case "U_CARDCD"://거래처코드
                            case "U_CARDNM"://거래처명
                            case "U_ACCTCD"://계정코드
                            case "U_OBJTP"://원천유형
                            case "U_OBJENTRY"://원천번호
                            case "U_TRANSID"://분개번호
                            case "U_PRCCD"://코스트센터
                            case "U_TRANSAMT"://이체금액
                            case "U_MEMO"://분개비고
                            case "U_OWNER"://예금주
                            case "U_BANKCD"://은행
                            case "U_BANKNM"://은행명
                            case "U_ACCOUNT"://거래처 계좌번호
                                oChild.SetProperty(c.Element("ColumnUid").Value, c.Element("Value").Value);
                                break;
                            default:
                                break;
                        }
                    }
                    oChild = null;
                }

                oChildren = null;
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_TR0021F_HRD.cs

示例15: ET_grd1_BFMatrixLinkPressed

        public virtual bool ET_grd1_BFMatrixLinkPressed(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd1").Specific));
            // ADD YOUR ACTION CODE HERE ...
            //try
            //{
            //    int oRowIndex = oGrid.GetDataTableRowIndex(pVal.Row);
            //    string KeyValue = string.Empty;

            //    switch (pVal.ColUID)
            //    {
            //        case "DOCENTRY":
            //            KeyValue = oGrid.DataTable.GetValue("DOCENTRY", oRowIndex).ToString();
            //            LoadSubForm(oForm, "KIS_SD0030_HRD", KeyValue);
            //            break;
            //        case "U_CARDNM":
            //            KeyValue = oGrid.DataTable.GetValue("U_CARDCD", oRowIndex).ToString();
            //            B1Connections.theAppl.OpenForm(BoFormObjectEnum.fo_BusinessPartner, "", KeyValue);
            //            break;
            //        case "U_BPNM":
            //            KeyValue = oGrid.DataTable.GetValue("U_BPCD", oRowIndex).ToString();
            //            B1Connections.theAppl.OpenForm(BoFormObjectEnum.fo_BusinessPartner, "", KeyValue);
            //            break;
            //        default:
            //            break;
            //    }
            //}
            //catch (Exception ex)
            //{

            //    B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            //}
            //return false;
            return true;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:36,代码来源:KIS_TR0021F_HRD.cs


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