private void btnUpdate_Click(object sender, EventArgs e) { CostCentreMasterModel objModel = new CostCentreMasterModel(); objModel.Name = tbxName.Text.Trim(); objModel.Alias = tbxAliasname.Text.Trim(); objModel.Group = cbxPrimarygroup.SelectedItem.ToString(); objModel.opBal = Convert.ToDecimal(tbxOpbal.Text.Trim()); objModel.DrCr = cbxDrCr.SelectedItem.ToString(); objModel.ModifiedBy = "Admin"; objModel.CCM_ID = costId; bool isSuccess = objccm.UpdateCCM(objModel); if (isSuccess) { MessageBox.Show("Update Successfully!"); ClearControls(); costId = 0; Administration.List.CostcenterList frmList = new Administration.List.CostcenterList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); FillCostCenterInfo(); } }
private void ListCostcenter_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Administration.List.CostcenterList frmList = new Administration.List.CostcenterList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); }
private void btnDelete_Click(object sender, EventArgs e) { bool isDelete = objccm.DeleteCostCenterMasterById(costId); if (isDelete) { MessageBox.Show("Delete Successfully!"); ClearControls(); Administration.List.CostcenterList frmList = new Administration.List.CostcenterList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); FillCostCenterInfo(); //tbxName.Focus(); //lblUpdate.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.OnlyInCustomization; //lblDelete.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.OnlyInCustomization; //lblSave.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; } }