Exemplo n.º 1
0
 private void btnEditAdminCategoryValue_Click(object sender, EventArgs e)
 {
     try
     {
         frmADMINUserList frm = new frmADMINUserList(_SelectedAdminCategoryValueID);
         frm.ADMINCategoryID     = _SelectedAdminCategoryID;
         frm.SHORT_CODE_REQUIRED = (new ServiceMASTERS()).IsShortCodeRequiredForAdminCategory(this._SelectedAdminCategoryID);
         frm.Text = string.Format("Modify {0} Value", _SelectedAdminCategoryName);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateAdminCategorieValuesGrid();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "PageUserLists::btnEditAdminCategoryValue_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
 private void btnAddNewItemType_Click(object sender, EventArgs e)
 {
     try
     {
         frmADMINUserList frm = new frmADMINUserList();
         frm.Text            = "Add new Item Type";
         frm.ADMINCategoryID = (int)APP_ADMIN_CATEGORIES.ITEM_TYPE;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateItemTypeDropdown();
             cboItemType.SelectedItem = ((List <SelectListItem>)cboItemType.DataSource).Where(x => x.ID == frm.UserListID).FirstOrDefault();
         }
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(ex.Message, "frmAddEditInventoryItem::btnAddNewItemType_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 3
0
 private void btnAddNewSalaryHead_Click(object sender, EventArgs e)
 {
     try
     {
         frmADMINUserList frm = new frmADMINUserList();
         frm.Text            = "Add new Salary Head";
         frm.ADMINCategoryID = Program.LIST_DEFAULTS.Where(x => x.ID == (int)APP_DEFAULT_VALUES.SalaryHeadAdminCategoryID).FirstOrDefault().DEFAULT_VALUE;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             this.SelectSalaryHeadID = frm.UserListID;
             txtSalaryHead.Text      = frm.txtCategoryName.Text;
         }
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "frmAddEditSalaryHead::btnAddNewSalaryHead_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 4
0
 private void btnEditCategory_Click(object sender, EventArgs e)
 {
     try
     {
         int tncAdminCategoryID = Program.LIST_DEFAULTS[(int)APP_DEFAULT_VALUES.TermAndConditionCategory].DEFAULT_VALUE;
         frmADMINUserList frm   = new frmADMINUserList(SelectedCategoryID);
         frm.ADMINCategoryID     = tncAdminCategoryID;
         frm.SHORT_CODE_REQUIRED = (new ServiceMASTERS()).IsShortCodeRequiredForAdminCategory(tncAdminCategoryID);
         frm.Text = string.Format("EDIT TERM & CONDITION CATEGORY");
         if (frm.ShowDialog() == DialogResult.OK)
         {
             PopulateAllTnCCategories();
         }
     }
     catch (Exception ex)
     {
         string errMessage = ex.Message;
         if (ex.InnerException != null)
         {
             errMessage += string.Format("\n{0}", ex.InnerException.Message);
         }
         MessageBox.Show(errMessage, "PageTermsAndConditions::btnEditCategory_Click", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }