コード例 #1
0
        public void ToolbarAccess(string ObjectName, String eventID)
        {

            //objProBindMenu._constP = profile.DBConnection._constr;
            objProBindMenu.CompanyCode = profile.Personal.CompanyID;
            objProBindMenu.UserCode = profile.Personal.UserID;
            List<ProBindMenu> objLstProBindMenu = new List<ProBindMenu> { };
            objProBindMenu.ObjectCode = ObjectName;
            objLstProBindMenu = objiBindMenuClient.CheckOperaction(objProBindMenu).ToList();
            if (objLstProBindMenu.Count > 0)
            {
                objProBindMenu = objLstProBindMenu[0];
                objProBindMenu.ActiveButton = eventID;
                objProBindMenu = objiBindMenuClient.ActiveButtonClickEvent(objProBindMenu);
                btnAddNew.Enabled = objProBindMenu.BtnAdd;
                btnEdit.Disabled = !(objProBindMenu.BtnEdit);
                //btnExport.Enabled = objProBindMenu.BtnExport;
                //btnImport.Enabled = objProBindMenu.BtnImport;
                //btmMail.Enabled = objProBindMenu.BtnMail;
                //btnPrint.Enabled = objProBindMenu.BtnPrint;
                btnSave.Enabled = objProBindMenu.BtnSave;
                btnClear.Enabled = objProBindMenu.BtnClear;
                ButtonOffOn(btnAddNew); ButtonOffOn(btnEdit); 
                //ButtonOffOn(btnExport); 
                //ButtonOffOn(btnImport);
                //ButtonOffOn(btmMail); ButtonOffOn(btnPrint); 
                ButtonOffOn(btnSave); ButtonOffOn(btnClear);
               // tdConvertTo.Visible = false;
               // FlybtnConvertTo.AttachTo = "";
                if (objProBindMenu.ObjectCode == "Lead" || objProBindMenu.ObjectCode == "Opportunity" || objProBindMenu.ObjectCode == "Quotation" || objProBindMenu.ObjectCode == "SalesOrder" || objProBindMenu.ObjectCode == "AddNew")
                {
                    //FlybtnConvertTo.AttachTo = "tdConvertTo";
                   // tdConvertTo.Visible = true;
                    btnSave.Visible = false;
                    btnEdit.Visible = false;
                }
            }

        }
コード例 #2
0
 public ProBindMenu ToolbarAccess1(string ObjectName, String eventID)
 {
     BrilliantWMS.BindMenuService.iBindMenuClient objiBindMenuClient = new BrilliantWMS.BindMenuService.iBindMenuClient();
     try
     {
         CustomProfile profile = CustomProfile.GetProfile();
         //objProBindMenu._constP = profile.DBConnection._constr;
         objProBindMenu.CompanyCode = profile.Personal.CompanyID;
         objProBindMenu.UserCode    = profile.Personal.UserID;
         List <ProBindMenu> objLstProBindMenu = new List <ProBindMenu> {
         };
         objProBindMenu.ObjectCode = ObjectName;
         objLstProBindMenu         = objiBindMenuClient.CheckOperaction(objProBindMenu).ToList();
         if (objLstProBindMenu.Count > 0)
         {
             objProBindMenu = objLstProBindMenu[0];
             objProBindMenu.ActiveButton = eventID;
             objProBindMenu = objiBindMenuClient.ActiveButtonClickEvent(objProBindMenu);
         }
         return(objProBindMenu);
     }
     catch (Exception ex) { Login.Profile.ErrorHandling(ex, "UCToolbarHTML", "ToolbarAccess1"); return(objProBindMenu); }
     finally { objiBindMenuClient.Close(); }
 }