Esempio n. 1
0
        private void manageUserToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmUsers frm = new frmUsers();

            frm.ShowDialog();
            frm.Focus();
        }
Esempio n. 2
0
        private void bNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmUsers frm = new frmUsers();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                sc = new Server2Client();
                u  = new Users();
                User uu = new User();
                uu.Username    = frm.Username;
                uu.Password    = frm.Password;
                uu.AccountType = frm.AccountType;
                uu.Active      = frm.Active;
                sc             = u.AddUser(uu);

                if (sc.Message == null)
                {
                    XtraMessageBox.Show("New user successfully created!");
                    InitUsers();
                }
                else
                {
                    XtraMessageBox.Show(sc.Message);
                }
            }
        }
Esempio n. 3
0
        //领料人选择
        private void txtcPickingPeople_ChooserClick(object sender, EventArgs e)
        {
            frmUsers users = new frmUsers();

            if (users.ShowDialog() == DialogResult.OK)
            {
                txtcPickingPeople.Text = users.User_Name;
            }
        }
Esempio n. 4
0
        private void barButtonItem5_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!User.UserInAction("Users"))
            {
                return;
            }
            frmUsers frmUsers = new frmUsers();

            frmUsers.ShowDialog();
        }
        /// <summary>
        /// 选择负责人
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtWhHead_ChooserClick(object sender, EventArgs e)
        {
            frmUsers     frm    = new frmUsers();
            DialogResult result = frm.ShowDialog();

            if (result == DialogResult.OK)
            {
                txtChooseWhHead.Text = frm.User_Name;
                txtChooseWhHead.Tag  = frm.User_ID;
            }
        }
Esempio n. 6
0
 private void rUsers_ItemClick(object sender, ItemClickEventArgs e)
 {
     try
     {
         frmUsers _frmUsers = new frmUsers();
         _frmUsers.ShowDialog();
     }
     catch (Exception)
     {
     }
 }
 private void btnUsersEdit_Click(object sender, EventArgs e)
 {
     if (isAdmin == true)
     {
         frmUsers _frmUser = new frmUsers();
         _frmUser.ShowDialog();
     }
     else
     {
         MessageBox.Show(this, "Only admins can modify users. Please contact Nick or an admin.", "Authorization Not Allowed", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Esempio n. 8
0
 private void txtcreate_by_ChooserClick(object sender, EventArgs e)
 {
     try
     {
         frmUsers     frm    = new frmUsers();
         DialogResult result = frm.ShowDialog();
         if (result == DialogResult.OK)
         {
             txtcreate_by.Text = frm.User_Name;
             txtcreate_by.Tag  = frm.User_ID;
         }
     }
     catch (Exception ex)
     {
         Utility.Log.Log.writeLineToLog("【字典码表】" + ex.Message, "client");
         MessageBoxEx.ShowWarning("操作失败!");
     }
 }
Esempio n. 9
0
        private void DSUser_Click(object sender, EventArgs e)
        {
            frmUsers frm = new frmUsers();

            frm.ShowDialog();
        }
Esempio n. 10
0
        //初始化
        private void Init()
        {
            #region 设置功能按钮可见性
            UIAssistants.SetUCBaseFuncationVisible(this, new ObservableCollection <ButtonEx_sms>()
            {
                btnSave, btnCancel, btnSet, btnView, btnPrint
            });
            #endregion

            #region 初始化下拉框数据绑定
            CommonCtrl.CmbBindDict(cbo_cb_Callback_type, "sys_callback_type", false); //绑定回访类型
            CommonCtrl.CmbBindDict(cbo_cb_Callback_mode, "sys_callback_mode", false); //绑定回访方式
            CommonCtrl.CmbBindDict(cbo_member_class, "sys_member_grade", false);      //绑定会员等级
            CommonFuncCall.BindProviceComBox(cbo_province, "请选择");                    //绑定省份
            CommonFuncCall.BindCityComBox(cbo_city, "", "请选择");                       //绑定城市
            CommonFuncCall.BindCountryComBox(cbo_county, "", "请选择");                  //绑定县/区
            cbo_province.SelectedIndexChanged += ddlprovince_SelectedIndexChanged;
            cbo_city.SelectedIndexChanged     += ddlcity_SelectedIndexChanged;
            CommonCtrl.CmbBindDict(cbo_cust_type, "sys_customer_category", false);  //客户类别
            #endregion

            lbl_cb_create_by.Text = GlobalStaticObj.CurrUserCom_Name;
            lbl_cb_create_by.Tag  = GlobalStaticObj.UserID;
            if (windowStatus == WindowStatus.Edit || windowStatus == WindowStatus.View)
            {
                SetCustInfo();
                SetContInfo();
                SetCallbackInfo();
            }
            if (windowStatus == WindowStatus.View)
            {
                palQTop.Enabled = false;
            }
            #region 注册功能按钮事件
            #region  择客户信息
            txt_cust_code.ChooserClick += delegate
            {
                var frmCustomer = new frmCustomerInfo();
                var result      = frmCustomer.ShowDialog();
                if (result == DialogResult.OK)
                {
                    CustId             = frmCustomer.strCustomerId;
                    txt_cust_code.Tag  = CustId;
                    txt_cust_code.Text = frmCustomer.strCustomerNo;
                }

                SetCustInfo();
            };
            #endregion

            #region  择被回访人
            txt_cb_Callback_by.ChooserClick += delegate
            {
                var frmContacts = new frmContacts();
                var result      = frmContacts.ShowDialog();
                if (result == DialogResult.OK)
                {
                    ContId = frmContacts.contID;
                    txt_cb_Callback_by.Tag           = ContId;
                    txt_cb_Callback_by.Text          = frmContacts.contName;
                    txt_cb_Callback_by_duty.Caption  = frmContacts.contDuty;
                    txt_cb_Callback_by_phone.Caption = frmContacts.contPhone;
                }
            };
            #endregion

            #region  择经办人
            txt_handle_name.ChooserClick += delegate
            {
                var chooser = new frmUsers();
                var result  = chooser.ShowDialog();
                if (result == DialogResult.OK)
                {
                    txt_handle_name.Text      = chooser.User_Name;
                    txt_handle_name.Tag       = chooser.User_ID;
                    txt_cb_handle_org.Caption = chooser.OrgName;
                }
            };
            #endregion

            CancelEvent += (sender, args) => deleteMenuByTag(Tag.ToString(), UCCallBackManager.Name);

            #region 保存数据
            SaveEvent += delegate
            {
                var check = CheckValue();
                if (!check)
                {
                    return;
                }
                var dicFileds = new Dictionary <String, String>();
                if (windowStatus == WindowStatus.Add)
                {
                    dicFileds.Add("create_by", GlobalStaticObj.UserID);                       //创建人
                    dicFileds.Add("create_time", DBHelper.GetCurrentTime().Ticks.ToString()); //创建时间
                    dicFileds.Add("update_by", GlobalStaticObj.UserID);                       //最后编辑人
                    dicFileds.Add("update_time", DBHelper.GetCurrentTime().Ticks.ToString()); //最后编辑时间
                    dicFileds.Add("Callback_id", Guid.NewGuid().ToString());                  //客户ID
                    dicFileds.Add("status", "58b325d2-0792-4847-8e4a-22b3f25628f3");          //数据状态
                }
                else if (windowStatus == WindowStatus.Edit)
                {
                    dicFileds.Add("update_by", GlobalStaticObj.UserID);                        //最后编辑人
                    dicFileds.Add("update_time", DBHelper.GetCurrentTime().Ticks.ToString());  //最后编辑时间
                }
                dicFileds.Add("Callback_corp", txt_cust_code.Tag.ToString());                  //客户ID
                dicFileds.Add("Callback_time", DBHelper.GetCurrentTime().Ticks.ToString());    //回访时间
                dicFileds.Add("Callback_type", cbo_cb_Callback_type.SelectedValue.ToString()); //回访类型
                dicFileds.Add("Callback_mode", cbo_cb_Callback_mode.SelectedValue.ToString()); //回访方式
                dicFileds.Add("title", txt_cb_title.Caption);                                  //回访标题
                dicFileds.Add("record", rtx_cb_record.Text);                                   //回访内容
                dicFileds.Add("Callback_by", txt_cb_Callback_by.Tag.ToString());               //被回访人员名称
                dicFileds.Add("Callback_by_org", txt_cb_Callback_by_org.Caption);              //被回访人员部门名称
                dicFileds.Add("Callback_by_phone", txt_cb_Callback_by_phone.Caption);          //被回访人电话
                dicFileds.Add("Callback_by_duty", txt_cb_Callback_by_duty.Caption);            //被回访人职务
                dicFileds.Add("handle_name", txt_handle_name.Tag.ToString());                  //经办人
                dicFileds.Add("handle_org", txt_cb_handle_org.Caption);                        //经办人部门名称
                var result = false;
                try
                {
                    result = DBHelper.Submit_AddOrEdit("保存客户回访", "tb_CustomerSer_Callback", "Callback_id", CallBackId, dicFileds);
                }
                catch (Exception ex)
                {
                    result = false;
                }
                MessageBoxEx.Show(result ? "保存成功!" : "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                if (result)
                {
                    UCCallBackManager.BindPageData();
                    _autoClose = false;
                    deleteMenuByTag(Tag.ToString(), UCCallBackManager.Name);
                }
            };
            #endregion
            #endregion
        }
Esempio n. 11
0
        //初始化
        private void Init()
        {
            #region 设置功能按钮可见性
            UIAssistants.SetUCBaseFuncationVisible(this, new ObservableCollection <ButtonEx_sms>()
            {
                btnSave, btnCancel, btnSet, btnView, btnPrint
            });
            #endregion

            #region 初始化下拉框数据绑定
            CommonCtrl.CmbBindDict(cbo_cb_Callback_type, "sys_callback_type", false); //绑定回访类型
            CommonCtrl.CmbBindDict(cbo_cb_Callback_mode, "sys_callback_mode", false); //绑定回访方式
            CommonCtrl.CmbBindDict(cbo_member_class, "sys_member_grade", false);      //绑定会员等级
            CommonFuncCall.BindProviceComBox(cbo_province, "请选择");                    //绑定省份
            CommonFuncCall.BindCityComBox(cbo_city, "", "请选择");                       //绑定城市
            CommonFuncCall.BindCountryComBox(cbo_county, "", "请选择");                  //绑定县/区
            cbo_province.SelectedIndexChanged += ddlprovince_SelectedIndexChanged;
            cbo_city.SelectedIndexChanged     += ddlcity_SelectedIndexChanged;
            CommonCtrl.CmbBindDict(cbo_cust_type, "sys_customer_category", false);  //客户类别
            #endregion

            lbl_cb_create_by.Text = GlobalStaticObj.CurrUserCom_Name;
            lbl_cb_create_by.Tag  = GlobalStaticObj.UserID;
            if (windowStatus == WindowStatus.Edit || windowStatus == WindowStatus.View)
            {
                SetCustInfo();
                SetContInfo();
                SetCallbackInfo();
            }
            if (windowStatus == WindowStatus.View)
            {
                palQTop.Enabled = false;
            }
            #region 注册功能按钮事件
            #region  择客户信息
            txt_cust_code.ChooserClick += delegate
            {
                var frmCustomer = new frmCustomerInfo();
                var result      = frmCustomer.ShowDialog();
                if (result == DialogResult.OK)
                {
                    CustId             = frmCustomer.strCustomerId;
                    txt_cust_code.Tag  = CustId;
                    txt_cust_code.Text = frmCustomer.strCustomerNo;
                    SetCustInfo();
                }
            };
            dataGridViewEx1.CellContentClick += delegate(object sender, DataGridViewCellEventArgs args)
            {
                if (args.ColumnIndex < 0 || args.RowIndex < 0)
                {
                    return;
                }
                if (dataGridViewEx1.Columns[args.ColumnIndex] == drtxt_maintain_no)
                {
                    var ytServiceNo = CommonCtrl.IsNullToString(dataGridViewEx1.Rows[args.RowIndex].Cells[drtxt_maintain_id.Name].Value);
                    if (String.IsNullOrEmpty(CommonCtrl.IsNullToString(ytServiceNo)))
                    {
                        return;
                    }
                    var uc = new RepairQueryView(ytServiceNo);
                    uc.addUserControl(uc, "维修单-详细信息", "RepairQueryView" + ytServiceNo, Tag.ToString(),
                                      Name);
                }
            };
            #endregion

            #region  择被回访人
            txt_cb_Callback_by.ChooserClick += delegate
            {
                var frmContacts = new frmContacts();
                var result      = frmContacts.ShowDialog();
                if (result == DialogResult.OK)
                {
                    ContId = frmContacts.contID;
                    txt_cb_Callback_by.Tag           = ContId;
                    txt_cb_Callback_by.Text          = frmContacts.contName;
                    txt_cb_Callback_by_duty.Caption  = frmContacts.contDuty;
                    txt_cb_Callback_by_phone.Caption = frmContacts.contPhone;
                }
            };
            #endregion

            #region  择经办人
            txt_handle_name.ChooserClick += delegate
            {
                var chooser = new frmUsers();
                var result  = chooser.ShowDialog();
                if (result == DialogResult.OK)
                {
                    txt_handle_name.Text      = chooser.User_Name;
                    txt_handle_name.Tag       = chooser.User_ID;
                    txt_cb_handle_org.Caption = chooser.OrgName;
                }
            };
            #endregion

            //CancelEvent += (sender, args) => deleteMenuByTag(Tag.ToString(), UCCallBackManager.Name);
            CancelEvent += new ClickHandler(UCCallBackAddOrEdit_CancelEvent);

            #region 保存数据
            SaveEvent += delegate
            {
                var check = CheckValue();
                if (!check)
                {
                    return;
                }
                var dicFileds = new Dictionary <String, String>();
                if (windowStatus == WindowStatus.Add)
                {
                    dicFileds.Add("create_by", GlobalStaticObj.UserID);                       //创建人
                    dicFileds.Add("create_time", DBHelper.GetCurrentTime().Ticks.ToString()); //创建时间
                    dicFileds.Add("update_by", GlobalStaticObj.UserID);                       //最后编辑人
                    dicFileds.Add("update_time", DBHelper.GetCurrentTime().Ticks.ToString()); //最后编辑时间
                    dicFileds.Add("Callback_id", Guid.NewGuid().ToString());                  //客户ID
                    dicFileds.Add("status", "58b325d2-0792-4847-8e4a-22b3f25628f3");          //数据状态
                }
                else if (windowStatus == WindowStatus.Edit)
                {
                    DBHelper.BatchDeleteDataByWhere("删除客户与维修单关系", "tr_maintain_customer_callback", String.Format("callback_id = '{0}'", CallBackId));
                    dicFileds.Add("update_by", GlobalStaticObj.UserID);                        //最后编辑人
                    dicFileds.Add("update_time", DBHelper.GetCurrentTime().Ticks.ToString());  //最后编辑时间
                }
                dicFileds.Add("Callback_corp", txt_cust_code.Tag.ToString());                  //客户ID
                dicFileds.Add("Callback_time", DBHelper.GetCurrentTime().Ticks.ToString());    //回访时间
                dicFileds.Add("Callback_type", cbo_cb_Callback_type.SelectedValue.ToString()); //回访类型
                dicFileds.Add("Callback_mode", cbo_cb_Callback_mode.SelectedValue.ToString()); //回访方式
                dicFileds.Add("title", txt_cb_title.Caption);                                  //回访标题
                dicFileds.Add("record", rtx_cb_record.Text);                                   //回访内容
                dicFileds.Add("Callback_by", txt_cb_Callback_by.Tag.ToString());               //被回访人员名称
                dicFileds.Add("Callback_by_org", txt_cb_Callback_by_org.Caption);              //被回访人员部门名称
                dicFileds.Add("Callback_by_phone", txt_cb_Callback_by_phone.Caption);          //被回访人电话
                dicFileds.Add("Callback_by_duty", txt_cb_Callback_by_duty.Caption);            //被回访人职务
                dicFileds.Add("handle_name", txt_handle_name.Tag.ToString());                  //经办人
                dicFileds.Add("handle_org", txt_cb_handle_org.Caption);                        //经办人部门名称
                var result = false;
                try
                {
                    result = DBHelper.Submit_AddOrEdit("保存客户回访", "tb_CustomerSer_Callback", "Callback_id", CallBackId, dicFileds);
                    if (result)
                    {
                        const string sqlStr        = "INSERT INTO tr_maintain_customer_callback(id,maintain_id,customer_id ,callback_id) VALUES(@id,@maintain_id,@customer_id,@callback_id)";
                        var          list          = GetCheckRows();
                        var          sysSqlStrList = list.Select(str => new SysSQLString
                        {
                            cmdType = CommandType.Text, sqlString = sqlStr, Param = new Dictionary <string, string>
                            {
                                { "@id", Guid.NewGuid().ToString() }, { "@maintain_id", str }, { "@customer_id", txt_cust_code.Tag.ToString() }, { "@callback_id", String.IsNullOrEmpty(CallBackId) ? dicFileds["Callback_id"] : CallBackId }
                            }
                        }).ToList();
                        DBHelper.BatchExeSQLStringMultiByTrans("添加客户与维修单关系", sysSqlStrList);
                    }
                }
                catch (Exception ex)
                {
                    result = false;
                }
                MessageBoxEx.Show(result ? "保存成功!" : "保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.None);
                if (result)
                {
                    UCCallBackManager.BindPageData();
                    _autoClose = false;
                    deleteMenuByTag(Tag.ToString(), UCCallBackManager.Name);
                }
            };
            #endregion
            #endregion
        }
Esempio n. 12
0
 private void manageLADUsersToolStripMenuItem_Click(object sender, EventArgs e)
 {
     var tmpUsers = new frmUsers();
     tmpUsers.ShowDialog();
 }
Esempio n. 13
0
        private void btnUserAccounts_Click(object sender, EventArgs e)
        {
            var form = new frmUsers();

            form.ShowDialog();
        }
Esempio n. 14
0
        private void toolStripButton3_Click(object sender, EventArgs e)
        {
            frmUsers frm = new frmUsers();

            frm.ShowDialog();
        }
Esempio n. 15
0
        public void navBar_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            if (this.ValidateRight("View", AppConstant.UserID, e.Link.Caption))
            {
                switch (e.Link.Caption)
                {
                case "Quotations Review":
                    frmPOaward _frmPOaward = new frmPOaward();
                    _frmPOaward.ShowDialog();
                    break;

                case "Purchase Order":
                    frmPO _frmPO = new frmPO();
                    _frmPO.ShowDialog();
                    break;

                case "Purchase Requisition":
                    frmRequisition _frmRequisition = new frmRequisition();
                    _frmRequisition.ShowDialog();
                    break;

                case "Requisition Approval":
                    frmRequisitionReview _frmRequisitionReview = new frmRequisitionReview();
                    _frmRequisitionReview.ShowDialog();
                    break;

                case "Supplier Quotations":
                    frmSupplierQuotations _frmSupplierQuotations = new frmSupplierQuotations();
                    _frmSupplierQuotations.ShowDialog();
                    break;

                case "Requisitions":
                    requisitionslauncher _requisitionslauncher = new requisitionslauncher();
                    _requisitionslauncher.ShowDialog();
                    break;

                case "Department Access":
                    frmDepartmentAccess _frmDepartmentAccess = new frmDepartmentAccess();
                    _frmDepartmentAccess.ShowDialog();
                    break;

                case "Customers":
                    frmCustomers _frmCustomers = new frmCustomers();
                    _frmCustomers.ShowDialog();
                    break;

                case "Return OutWards":
                    frmReturnOutwards _frmReturnOutwards = new frmReturnOutwards();
                    _frmReturnOutwards.ShowDialog();
                    break;

                case "Sales Summary":
                    frmSalesSummary _frmSalesSummary = new frmSalesSummary();
                    _frmSalesSummary.ShowDialog();
                    break;

                case "Stock Sheet Inquiry":
                    frmstockshettinquiry _frmstockshettinquiry = new frmstockshettinquiry();
                    _frmstockshettinquiry.ShowDialog();
                    break;

                case "COA":
                    frmCOA _frmCOA = new frmCOA();
                    _frmCOA.ShowDialog();
                    break;

                case "PO Reprint":
                    frmPoReprint _frmPoReprint = new frmPoReprint();
                    _frmPoReprint.ShowDialog();
                    break;

                case "Customer Invoices":
                    frmCustomerInvoiceReprint _frmCustomerInvoiceReprint = new frmCustomerInvoiceReprint();
                    _frmCustomerInvoiceReprint.ShowDialog();
                    break;

                case "Supplier Balances":
                    frmSupplierBalances _frmSupplierBalances = new frmSupplierBalances();
                    _frmSupplierBalances.ShowDialog();
                    break;

                case "Supplier Balance":
                    frmrptSupplierBalance _frmrptSupplierBalance = new frmrptSupplierBalance();
                    _frmrptSupplierBalance.ShowDialog();
                    break;

                case "Customer Balances":
                    frmCustomerBalanceLauncher _frmCustomerBalanceLauncher = new frmCustomerBalanceLauncher();
                    _frmCustomerBalanceLauncher.ShowDialog();
                    break;

                case "Credit Notes":
                    frmcustomercreditnoteLauncher _frmcustomercreditnoteLauncher = new frmcustomercreditnoteLauncher();
                    _frmcustomercreditnoteLauncher.ShowDialog();
                    break;

                case "Customer Refunds":
                    frmCustomerRefund _frmCustomerRefund = new frmCustomerRefund();
                    _frmCustomerRefund.ShowDialog();
                    break;

                case "Payouts":
                    frmPayOuts _frmPayOuts = new frmPayOuts();
                    _frmPayOuts.ShowDialog();
                    break;

                case "Return Inwards":
                    frmReturnInwards _frmReturnInwards = new frmReturnInwards();
                    _frmReturnInwards.ShowDialog();
                    break;

                case "Supplier Payments":
                    frmSupplierPayment _frmSupplierPayment = new frmSupplierPayment();
                    _frmSupplierPayment.ShowDialog();
                    break;

                case "Bank Accounts":
                    frmBankAccounts _frmBankAccounts = new frmBankAccounts();
                    _frmBankAccounts.ShowDialog();
                    break;

                //case "Supplier Balance":
                //    frmSupplierBalances _frmSupplierBalances = new frmSupplierBalances();
                //    _frmSupplierBalances.ShowDialog();
                //    break;
                case "Direct Invoices":
                    frmDirectSupplierInvoice _frmDirectSupplierInvoice = new frmDirectSupplierInvoice();
                    _frmDirectSupplierInvoice.ShowDialog();
                    break;

                case "Invoice Matching":
                    frmInvoiceMatching _frmInvoiceMatching = new frmInvoiceMatching();
                    _frmInvoiceMatching.ShowDialog();
                    break;

                case "Recruitment Parameters":
                    frmHRRecruitmentParam _frmHRRecruitmentParam = new frmHRRecruitmentParam();
                    _frmHRRecruitmentParam.ShowDialog();
                    break;

                case "Job Applications":
                    frmJobApplications _frmJobApplications = new frmJobApplications();
                    _frmJobApplications.ShowDialog();
                    break;

                case "Job Description":
                    frmJobDescription _frmJobDescription = new frmJobDescription();
                    _frmJobDescription.ShowDialog();
                    break;

                case "Job Requisition":
                    frmJobRequisition _frmJobRequisition = new frmJobRequisition();
                    _frmJobRequisition.ShowDialog();
                    break;

                case "Job Appraisals":
                    frmJobAppraisals _frmJobAppraisals = new frmJobAppraisals();
                    _frmJobAppraisals.ShowDialog();
                    break;

                case "Employeee information":
                    frmEmployeeMaster _frmEmployeeMaster = new frmEmployeeMaster();
                    _frmEmployeeMaster.ShowDialog();
                    break;

                case "Distribution Orders":
                    frmDistributionOders _frmDistributionOders = new frmDistributionOders();
                    _frmDistributionOders.ShowDialog();
                    break;

                case "Inventory Adjustment":
                    frmInventoryAdjustment _frmInventoryAdjustment = new frmInventoryAdjustment();
                    _frmInventoryAdjustment.ShowDialog();
                    break;

                case "Inventory Transfers":
                    frmInventoryTransfer _frmInventoryTransfer = new frmInventoryTransfer();
                    _frmInventoryTransfer.ShowDialog();
                    break;

                case "Inventory Issues":
                    frmInventoryIssues _frmInventoryIssues = new frmInventoryIssues();
                    _frmInventoryIssues.ShowDialog();
                    break;

                case "Inventory Receipts":
                    frmInventoryReceipt _frmInventoryReceipt = new frmInventoryReceipt();
                    _frmInventoryReceipt.ShowDialog();
                    break;

                case "Purchase Orders":
                    frmPurchaseOrder _frmPurchaseOrder = new frmPurchaseOrder();
                    _frmPurchaseOrder.ShowDialog();
                    break;

                case "Ware houses":
                    frmWareHouses _frmWareHouses = new frmWareHouses();
                    _frmWareHouses.ShowDialog();
                    break;

                case "Sales Order":
                    frmSalesOrder _frmSalesOrder = new frmSalesOrder();
                    _frmSalesOrder.ShowDialog();
                    break;

                case "PO Receipts":
                    frmPOReceipt _frmPOReceipt = new frmPOReceipt();
                    _frmPOReceipt.ShowDialog();
                    break;

                case "Opening Stock":
                    frmOpeningStock _frmOpeningStock = new frmOpeningStock();
                    _frmOpeningStock.ShowDialog();
                    break;

                case "Exchange Rates":
                    frmExchangeRates _frmExchangeRates = new frmExchangeRates();
                    _frmExchangeRates.ShowDialog();
                    break;

                case "Payroll Review":
                    frmPayrollReview _frmPayrollReview = new frmPayrollReview();
                    _frmPayrollReview.ShowDialog();
                    break;

                case "Bank Branches":
                    frmBankBranches _frmBankBranches = new frmBankBranches();
                    _frmBankBranches.ShowDialog();
                    break;

                case "Banks":
                    frmbanks _frmbanks = new frmbanks();
                    _frmbanks.ShowDialog();
                    break;

                case "Payroll Processing":
                    frmPayroll _frmPayroll = new frmPayroll();
                    _frmPayroll.ShowDialog();
                    break;

                case "Posting Periods":
                    frmPostingPeriods _frmPostingPeriods = new frmPostingPeriods();
                    _frmPostingPeriods.ShowDialog();
                    break;

                case "Tax Rates":
                    frmTaxRates _frmTaxRates = new frmTaxRates();
                    _frmTaxRates.ShowDialog();
                    break;

                case "Benefits & Deductions":
                    frmDBAs _frmDBAs = new frmDBAs();
                    _frmDBAs.ShowDialog();
                    break;

                case "Approvers":
                    frmApprovers _frmApprovers = new frmApprovers();
                    _frmApprovers.ShowDialog();
                    break;

                case "Commission Entry":
                    frmCommisionEntry _frmCommisionEntry = new frmCommisionEntry();
                    _frmCommisionEntry.ShowDialog();
                    break;

                case "Commission Tax Rates":
                    frmCommisionRates _frmCommisionRates = new frmCommisionRates();
                    _frmCommisionRates.ShowDialog();
                    break;

                case "Leave Management":
                    frmLeaveManagent _frmLeaveManagent = new frmLeaveManagent();
                    _frmLeaveManagent.ShowDialog();
                    break;

                case "Leave Types":
                    frmLeaveTypes _frmLeaveTypes = new frmLeaveTypes();
                    _frmLeaveTypes.ShowDialog();
                    break;

                case "NHIF Rates":
                    frmNHIFRates _frmNHIFRates = new frmNHIFRates();
                    _frmNHIFRates.ShowDialog();
                    break;

                case "NSSF Rates":
                    frmNSSFRates _frmNSSFRates = new frmNSSFRates();
                    _frmNSSFRates.ShowDialog();
                    break;

                case "Over Time":
                    frmOverTime _frmOverTime = new frmOverTime();
                    _frmOverTime.ShowDialog();
                    break;

                case "Over Time Rates":
                    frmOverTimeRates _frmOverTimeRates = new frmOverTimeRates();
                    _frmOverTimeRates.ShowDialog();
                    break;

                case "Salary Advance":
                    frmSalaryAdvance _frmSalaryAdvance = new frmSalaryAdvance();
                    _frmSalaryAdvance.ShowDialog();
                    break;

                case "Tax Tables":
                    frmTaxTables _frmTaxTables = new frmTaxTables();
                    _frmTaxTables.ShowDialog();
                    break;

                case "User Codes":
                    frmUserCodes _frmUserCodes = new frmUserCodes();
                    _frmUserCodes.ShowDialog();
                    break;

                case "Companies":
                    frmCompanies _frmCompanies = new frmCompanies();
                    _frmCompanies.ShowDialog();
                    break;

                case "User Code Categories":
                    frmUserCodeCategories _frmUserCodeCategories = new frmUserCodeCategories();
                    _frmUserCodeCategories.ShowDialog();
                    break;

                case "CostCenters":
                    frmCostCenter _frmCostCenter = new frmCostCenter();
                    _frmCostCenter.ShowDialog();
                    break;

                case "CostCenter Access":
                    frmCompanyCostCenterAccess _frmCompanyCostCenterAccess = new frmCompanyCostCenterAccess();
                    _frmCompanyCostCenterAccess.ShowDialog();
                    break;

                case "Security Groups":
                    frmSecurityGroups _frmSecurityGroups = new frmSecurityGroups();
                    _frmSecurityGroups.ShowDialog();
                    break;

                case "Roles":
                    frmRoles _frmRoles = new frmRoles();
                    _frmRoles.ShowDialog();
                    break;

                case "User Roles":
                    frmUserRoles _frmUserRoles = new frmUserRoles();
                    _frmUserRoles.ShowDialog();
                    break;

                case "Users":
                    frmUsers _frmUsers = new frmUsers();
                    _frmUsers.ShowDialog();
                    break;

                case "User Groups":
                    frmUserGroups _frmUserGroups = new frmUserGroups();
                    _frmUserGroups.ShowDialog();
                    break;

                case "Currencies":
                    frmCurrencies _frmCurrencies = new frmCurrencies();
                    _frmCurrencies.ShowDialog();
                    break;

                case "Countries":
                    frmCountry _frmCountry = new frmCountry();
                    _frmCountry.ShowDialog();
                    break;

                case "UOM Convertions":
                    frmUOMConversions _frmUOMConversions = new frmUOMConversions();
                    _frmUOMConversions.ShowDialog();
                    break;

                case "Counties":
                    frmCounties _frmCounties = new frmCounties();
                    _frmCounties.ShowDialog();
                    break;

                case "Beneficiaries":
                    frmBeneficiaries _frmBeneficiaries = new frmBeneficiaries();
                    _frmBeneficiaries.ShowDialog();
                    break;

                case "Payroll Reversal":
                    frmPayrollReverse _frmPayrollReverse = new frmPayrollReverse();
                    _frmPayrollReverse.ShowDialog();
                    break;

                case "KPIs":
                    frmKPIs _frmKPIs = new frmKPIs();
                    _frmKPIs.ShowDialog();
                    break;

                case "KPIs Entry":
                    frmKPIEntry _frmKPIEntry = new frmKPIEntry();
                    _frmKPIEntry.ShowDialog();
                    break;

                case "Absence Registration":
                    frmAbsenceRegistration _frmAbsenceRegistration = new frmAbsenceRegistration();
                    _frmAbsenceRegistration.ShowDialog();
                    break;

                case "UOM":
                    frmUOM _frmUOM = new frmUOM();
                    _frmUOM.ShowDialog();
                    break;

                case "Categories":
                    frmItemCategories _frmItemCategories = new frmItemCategories();
                    _frmItemCategories.ShowDialog();
                    break;

                case "Suppliers":
                    Suppliers _Suppliers = new Suppliers();
                    _Suppliers.ShowDialog();
                    break;

                case "Journal Entry":
                    frmJournalEntry _frmJournalEntry = new frmJournalEntry();
                    _frmJournalEntry.ShowDialog();
                    break;

                case "Ledgers":
                    frmLedger1 _frmLedger1 = new frmLedger1();
                    _frmLedger1.ShowDialog();
                    break;

                case "Item Master":
                    frmItems _frmItems = new frmItems();
                    _frmItems.ShowDialog();
                    break;

                case "Petty Cash":
                    frmPettyCash _frmPettyCash = new frmPettyCash();
                    _frmPettyCash.ShowDialog();
                    break;

                case "Cheque Books":
                    frmChequeBooks _frmChequeBooks = new frmChequeBooks();
                    _frmChequeBooks.ShowDialog();
                    break;

                case "Cashier Checkin":
                    frmCashierCheckin _frmCashierCheckin = new frmCashierCheckin();
                    _frmCashierCheckin.ShowDialog();
                    break;

                case "Price Bands":
                    frmPriceBands _frmPriceBands = new frmPriceBands();
                    _frmPriceBands.ShowDialog();
                    break;

                case "Cost/Price Revision":
                    frmCostPriceRevisions _frmCostPriceRevisions = new frmCostPriceRevisions();
                    _frmCostPriceRevisions.ShowDialog();
                    break;

                default:
                    break;
                }
            }
            else
            {
                e.Link.Item.Dispose();
                MessageBox.Show("You have insufficient rights to access this page", "Privilege Violation", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }