private void btnUpdate_Click(object sender, EventArgs e) { CostCentreGroupModel objModel = new CostCentreGroupModel(); objModel.CCG_ID = groupId; objModel.GroupName = tbxGroupName.Text.Trim(); objModel.Alias = tbxAlias.Text.Trim(); objModel.underGroup = cbxUndergroup.SelectedItem.ToString(); objModel.PrimaryGroup = cbxPrimarygroup.SelectedItem.ToString() == "Y" ? true : false; objModel.CreatedBy = "Admin"; bool isSuccess = objCG.UpdateCCGM(objModel); if (isSuccess) { MessageBox.Show("Update Successfully!"); ClearControls(); groupId = 0; Administration.List.CostcentergrpList frmList = new Administration.List.CostcentergrpList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); FillCostCenterGroupInfo(); } }
private void btnDelete_Click(object sender, EventArgs e) { CostCentreMasterModel objmodel = objMasterBl.GetCostNameByGroupname(tbxGroupName.Text.Trim()); if (objmodel.Name != null) { MessageBox.Show("Can Not Delete Name Under Tag With Cost Name.." + objmodel.Name); tbxGroupName.Focus(); } if (objmodel.Name == null) { bool isDelete = objCG.DeleteCostCenterGroupById(groupId); if (isDelete) { MessageBox.Show("Delete Successfully!"); ClearControls(); groupId = 0; Administration.List.CostcentergrpList frmList = new Administration.List.CostcentergrpList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); FillCostCenterGroupInfo(); } } }
private void Listccgroup_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Administration.List.CostcentergrpList frmList = new Administration.List.CostcentergrpList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); }