private void ListMaterialcenter_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { MCId = 0; Administration.List.MaterialcenterList frmList = new Administration.List.MaterialcenterList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); FillMaterialCenterInfo(); }
private void btnDelete_Click(object sender, EventArgs e) { bool isDelete = objmatcenbl.DeleteMaterialCenterById(MCId); if (isDelete) { MessageBox.Show("Delete Successfully!"); MCId = 0; ClearControls(); Administration.List.MaterialcenterList frmList = new Administration.List.MaterialcenterList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); FillMaterialCenterInfo(); } }
private void btnUpdate_Click(object sender, EventArgs e) { MaterialCentreMasterModel objGroup = new MaterialCentreMasterModel(); objGroup.GroupName = tbxGroupName.Text.Trim(); objGroup.Alias = tbxAliasname.Text.Trim() == null ? string.Empty : tbxAliasname.Text.Trim(); objGroup.PrintName = tbxPrintname.Text.Trim() == null ? string.Empty : tbxAliasname.Text.Trim();; objGroup.Group = cbxGroup.SelectedItem.ToString(); objGroup.StockAccount = cbxStockaccount.SelectedItem.ToString(); objGroup.EnableStockinBal = cbxreflectstockinbalancesheet.SelectedItem.ToString() == "Y" ? true : false; //In Settings Check Check box This fiels Are Enable //objGroup.SalesAccount = cbxSaleAccount.SelectedItem.ToString(); //objGroup.PurchaseAccount = cbxPurchaseAccount.SelectedItem.ToString(); //objGroup.EnableAccinTransfer = tbxAccStocktransfer.Text.Trim() == "Y" ? true : false; objGroup.Address = tbxAddress.Text == null ? string.Empty : tbxAddress.Text.Trim(); objGroup.Address1 = tbxAddress1.Text == null ? string.Empty : tbxAddress1.Text.Trim(); objGroup.Address2 = tbxAddress2.Text == null ? string.Empty : tbxAddress2.Text.Trim(); objGroup.Address3 = tbxAddress3.Text == null ? string.Empty : tbxAddress3.Text.Trim(); objGroup.MC_Id = MCId; objGroup.CreatedBy = "Admin"; bool isSuccess = objmatcenbl.UpdateMaterialMaster(objGroup); if (isSuccess) { MessageBox.Show("Update Successfully!"); MCId = 0; ClearControls(); Administration.List.MaterialcenterList frmList = new Administration.List.MaterialcenterList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); FillMaterialCenterInfo(); } }