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


C# Form.EnableMenu方法代码示例

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


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

示例1: ET_mtx_BFRightClick

        public virtual bool ET_mtx_BFRightClick(ContextMenuInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific));
            // ADD YOUR ACTION CODE HERE ...

            if (oForm.Mode == BoFormMode.fm_ADD_MODE)
            {
                oForm.EnableMenu("1292", true);//행추가
                oForm.EnableMenu("1293", true);//행삭제                
            }
            else if (oForm.Mode == BoFormMode.fm_UPDATE_MODE || oForm.Mode == BoFormMode.fm_OK_MODE)
            {
                oForm.EnableMenu("1292", true);//행추가
                if (pVal.Row > 0)
                {
                    //string strNowDate = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
                    //string strInDate = FN.GetMatirxCellValue(ref oMatrix, "U_DATE", pVal.Row);

                    //// 현재일자보다 이전 일자는 행삭제 하지 못한다.
                    //if (string.IsNullOrEmpty(strInDate) == false && strInDate.Replace(".", "").CompareTo(strNowDate.Replace("-", "")) < 0)
                    //    return false;
                    //else
                    //    oForm.EnableMenu("1293", true);//행삭제
                }
            }
            return true;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:28,代码来源:KIS_FI0010A_HRD.cs

示例2: ET_mtx_AFRightClick

 public virtual void ET_mtx_AFRightClick(ContextMenuInfo pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific));
     // ADD YOUR ACTION CODE HERE ...
     oForm.EnableMenu(SO.MenuProperty.DeleteRow, false);
 }
开发者ID:wldyd0210,项目名称:TEST,代码行数:7,代码来源:KIS_SO0311A_HRD.cs

示例3: ET_BFRightClick

        public virtual bool ET_BFRightClick(ContextMenuInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...

            if ((oForm.Mode == BoFormMode.fm_OK_MODE) && ((oForm.Items.Item("edtJDTDOC").Specific.value == "") || (oForm.Items.Item("edtRJDTDOC").Specific.value != "")))
                oForm.EnableMenu("1283", true); //제거
            else
                oForm.EnableMenu("1283", false); //제거

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

示例4: ET_mtx2_BFClick

        public virtual bool ET_mtx2_BFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2").Specific));
            // ADD YOUR ACTION CODE HERE ...

            if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE || oForm.Mode == BoFormMode.fm_OK_MODE)
            {
                oForm.EnableMenu("1292", true);//행추가
                oForm.EnableMenu("1293", true);//행삭제                
                gSelMtx = pVal.ItemUID;
            }
            return true;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:14,代码来源:KIS_SO0380A_HRD.cs

示例5: ET_mtx1_AFRightClick

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

            iRightRowIndex = -1;

            try
            {

                if (B1Connections.theAppl.Menus.Item("1293").Enabled == true)
                {
                    oForm.EnableMenu("1293", false);//행삭제 비활성
                }
                if (B1Connections.theAppl.Menus.Exists("SUB_BASEDOC"))
                {
                    B1Connections.theAppl.Menus.RemoveEx("SUB_BASEDOC");//기준전표 메뉴 삭제
                }
                if (B1Connections.theAppl.Menus.Exists("SUB_TARGETDOC"))
                {
                    B1Connections.theAppl.Menus.RemoveEx("SUB_TARGETDOC");//대상전표 메뉴 삭제
                }

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

示例6: ET_mtx2_DUMY_BFClick

        public virtual bool ET_mtx2_DUMY_BFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...

            string USERID = string.Empty;

            if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE || oForm.Mode == BoFormMode.fm_OK_MODE)
            {
                USERID = B1Connections.diCompany.UserName.ToString();
                if ((oMatrix.VisualRowCount > 0) && (pVal.Row > 0))
                {
                    if (oMatrix.GetCellSpecific("U_RECVID", pVal.Row).Value.Trim() != USERID)
                    {
                        oForm.EnableMenu("1293", false); //행삭제
                    }
                    else
                    {
                        oForm.EnableMenu("1293", true); //행삭제
                    }
                }
                else
                    oForm.EnableMenu("1293", false); //행삭제
          
                oForm.EnableMenu("1292", true);//행추가
                gRowIdx = pVal.Row;
                gSelMtx = pVal.ItemUID;
            }
            return true;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:31,代码来源:KIS_SO0030A_HRD.cs

示例7: ET_grd_BFRightClick

        public virtual bool ET_grd_BFRightClick(ContextMenuInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd").Specific));
            // ADD YOUR ACTION CODE HERE ...
            if (BeforModifyData_CheckDocumentStatus(oForm))
            {
                oForm.EnableMenu(SO.MenuProperty.AddRow, true);

            }

            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0150T_HRD");
            if (pVal.Row > -1)
            {
                string strCloseYymm = oDB_M.GetValue("U_YYYYMM", 0).Trim();
                string strSaleYyMm = FN.GetGridCellValue(ref oGrid, "U_SALYM", pVal.Row);
                string strStatus = FN.GetGridCellValue(ref oGrid, "ROWSTAT", pVal.Row);

                //메뉴추가
                SAPbouiCOM.MenuItem oMenuItem;
                SAPbouiCOM.Menus oMenus;
                SAPbouiCOM.MenuCreationParams oCreationPackage = (SAPbouiCOM.MenuCreationParams)B1Connections.theAppl.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_MenuCreationParams);

                if (strStatus == "R" && strCloseYymm == strSaleYyMm && !B1Connections.theAppl.Menus.Exists("SUB_RECALC"))
                {
                    oCreationPackage.Type = SAPbouiCOM.BoMenuType.mt_STRING;
                    oCreationPackage.UniqueID = "SUB_RECALC"; // ID에 무조건 SUB 를 붙여야 이벤트 작동
                    oCreationPackage.String = "청구 재실행(&Q)";
                    oCreationPackage.Enabled = true;
                    oMenuItem = B1Connections.theAppl.Menus.Item("1280"); //'Data'
                    oMenus = oMenuItem.SubMenus;
                    oMenus.AddEx(oCreationPackage);
                }
                oCreationPackage = null;
            }

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

示例8: ET_mtx_BFRightClick

 public virtual bool ET_mtx_BFRightClick(ContextMenuInfo pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific));
     // ADD YOUR ACTION CODE HERE ...
     if (pVal.Row > 0)
     {
         //oForm.EnableMenu("1293", true); //행삭제
     }
     else
     {
         oForm.EnableMenu("1293", false); //행삭제
     }
     return true;
 }
开发者ID:wldyd0210,项目名称:TEST,代码行数:15,代码来源:KIS_SO0280A_HRD.cs

示例9: ET_BFRightClick

        public virtual bool ET_BFRightClick(ContextMenuInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_OK_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE)
                {
                    string edtJDTDOC = FN.GetItemValue(ref oForm, "edtJDTDOC");
                    string edtRJDTDOC = FN.GetItemValue(ref oForm, "edtRJDTDOC");

                    if (string.IsNullOrEmpty(edtJDTDOC) || (!string.IsNullOrEmpty(edtJDTDOC) && !string.IsNullOrEmpty(edtRJDTDOC)))
                    {
                        oForm.EnableMenu("1283", true);//제거
                    }
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
            return true;
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:23,代码来源:KIS_SO0182A_HRD.cs

示例10: ET_AFRightClick

 public virtual void ET_AFRightClick(ContextMenuInfo pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     // ADD YOUR ACTION CODE HERE ...
     try
     {
         if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_OK_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE)
         {
             if (B1Connections.theAppl.Menus.Item("1283").Enabled == true)
             {
                 oForm.EnableMenu("1283", false);//제거
             }
         }
     }
     catch (Exception ex)
     {
         B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
     }
 }
开发者ID:wldyd0210,项目名称:TEST,代码行数:19,代码来源:KIS_SO0182A_HRD.cs

示例11: ET_BFRightClick

        public virtual bool ET_BFRightClick(ContextMenuInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                SAPbouiCOM.DBDataSource oKIS_TR0041T_HRD = oForm.DataSources.DBDataSources.Item("@KIS_TR0041T_HRD");

                if (oKIS_TR0041T_HRD.GetValue("U_ISTRANS", 0).Trim() != "Y")
                {
                    oForm.EnableMenu("1283", true);
                }

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

示例12: ET_mtx1_AFRightClick

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

            iRightRowIndex = -1;

            try
            {
                if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_OK_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE)
                {
                    if (B1Connections.theAppl.Menus.Item("1293").Enabled == true)
                    {
                        oForm.EnableMenu("1293", false);//행삭제
                    }
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:23,代码来源:KIS_SO0040A_HRD.cs

示例13: ET_mtx1_BFRightClick

        public virtual bool ET_mtx1_BFRightClick(ContextMenuInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1").Specific));
            // ADD YOUR ACTION CODE HERE ...

            iRightRowIndex = pVal.Row;

            try
            {
                if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_OK_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE)
                {
                    if (pVal.Row > 0 && pVal.Row <= oMatrix.VisualRowCount)
                    {
                        oForm.EnableMenu("1293", true);//행삭제
                    }


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

示例14: ET_BFRowDataMenu_Delete

        public virtual bool ET_BFRowDataMenu_Delete(MenuEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.ActiveForm;
            // ADD YOUR ACTION CODE HERE ...

            //oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0420T_HRD");
            string strSTATUS = oForm.DataSources.UserDataSources.Item("U_STATUS").Value;
            if (strSTATUS == "R")
                return false;
            else
            {
                oForm.EnableMenu(SO.MenuProperty.DeleteRow, false);
                return true;
            }            
        }       
开发者ID:wldyd0210,项目名称:TEST,代码行数:15,代码来源:KIS_SO0311A_HRD.cs

示例15: ET_grd_AFRightClick

        public virtual void ET_grd_AFRightClick(ContextMenuInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd").Specific));
            // ADD YOUR ACTION CODE HERE ...
            oForm.EnableMenu(SO.MenuProperty.AddRow, false);

            if (B1Connections.theAppl.Menus.Exists("SUB_RECALC"))
            {
                B1Connections.theAppl.Menus.RemoveEx("SUB_RECALC");//기준전표 메뉴 삭제
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:12,代码来源:KIS_SO0150A_HRD.cs


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