private void ListBillSundry_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Administration.List.BillsundaryList frmBSList = new Administration.List.BillsundaryList(); frmBSList.StartPosition = FormStartPosition.CenterScreen; frmBSList.ShowDialog(); FillBillSundryInfo(); }
private void btnDelete_Click(object sender, EventArgs e) { bool isDelete = objbsBL.DeleteBillSundryById(BillsId); if (isDelete) { MessageBox.Show("Delete Successfully!"); Administration.List.BillsundaryList frmBSList = new Administration.List.BillsundaryList(); frmBSList.StartPosition = FormStartPosition.CenterScreen; frmBSList.ShowDialog(); FillBillSundryInfo(); } }
private void ListBillsundary_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Administration.List.BillsundaryList frmList = new Administration.List.BillsundaryList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); lblUpdate.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; lblDelete.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; lblSave.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.OnlyInCustomization; tbxName.Focus(); FillBillSundryInfo(); }
private void btnUpdate_Click(object sender, EventArgs e) { objbsmod = new BillSundryMasterModel(); objbsmod.Name = tbxName.Text; objbsmod.Alias = tbxAlias.Text == null ? string.Empty : tbxAlias.Text.Trim(); objbsmod.PrintName = tbxPrintName.Text == null ? string.Empty : tbxPrintName.Text.Trim(); objbsmod.BillSundryType = cbxBillsundrytype.SelectedItem.ToString(); objbsmod.BillSundryNature = cbxBillsundrynature.SelectedItem.ToString(); objbsmod.DefaultValue = Convert.ToDecimal(tbxdefaultvalue.Text == string.Empty ? "0.00" : tbxdefaultvalue.Text); objbsmod.subtotalheading = cbxSubtotalheading.SelectedItem.ToString(); objbsmod.AffectstheCostofGoodsinSale = Convert.ToBoolean(cbxAffectsthecostofgoodsinsale.Text.ToString() == "Y" ? true : false); objbsmod.AffectstheCostofGoodsinPurchase = Convert.ToBoolean(cbxaffectsthecostofgoodsinpurchase.Text.ToString() == "Y" ? true : false); objbsmod.AffectstheCostofGoodsinMaterialIssue = Convert.ToBoolean(cbxAffecsthecostofgoodsinMaterialissue.Text.ToString() == "Y" ? true : false); objbsmod.AffectstheCostofGoodsinMaterialReceipt = Convert.ToBoolean(cbxAffectsthecostofgoodsinmaterialreceipt.Text.ToString() == "Y" ? true : false); objbsmod.AffectstheCostofGoodsinStockTransfer = Convert.ToBoolean(cbxAffectsthecostofgoodsinstockTransfer.Text.ToString() == "Y" ? true : false); //Accounting In Sales objbsmod.SaleAffectsAccounting = Convert.ToBoolean(cbxSaleaffectsAcc.Text.ToString() == "Y" ? true : false); objbsmod.SaleAdjustInSaleAmount = Convert.ToBoolean(cbxSaleAdjustsaleamount.Text.ToString() == "Y" ? true : false); objbsmod.SaleSpecifyAccountHere = cbxSaleAccountLedgerSpecify.Text.ToString(); objbsmod.SaleAccounttoHeadPost = cbxSaleAccHeadpost.Text.ToString(); objbsmod.SaleAdjustInPartyAmount = Convert.ToBoolean(cbxSaleAdjustinpartyAmount.Text.ToString() == "Y" ? true : false); objbsmod.SalePartSpecifyAccountHere = cbxPartysaleAccountLedgerSpecify.Text.ToString(); objbsmod.SaleAccounttoHeadPostParty = cbxSaleAccHeadpostParty.Text.ToString(); if (objbsmod.SaleAdjustInSaleAmount) { objbsmod.SalePostOverandAbove = cbxSalePostoverandAbove.SelectedItem.ToString() == "Y" ? true : false; } //Accounting In Purchase objbsmod.PurcAffectsAccounting = Convert.ToBoolean(cbxPurcAftAccount.Text.ToString() == "Y" ? true : false); objbsmod.PurcAdjustInPurcAmount = Convert.ToBoolean(cbxPurcPurchaseAmount.Text.ToString() == "Y" ? true : false); objbsmod.PurcSpecifyAccountHere = cbxPurcAccountLedgerSpecify.SelectedItem.ToString(); objbsmod.PurcAccounttoHeadPost = cbxPurcHeadPost.Text.ToString(); objbsmod.PurcAdjustInPartyAmount = Convert.ToBoolean(cbxPurcPartyAmount.Text.ToString() == "Y" ? true : false); objbsmod.PurcParySpecifyAccountHere = cbxPartyPurcAccountLedgerSpecify.SelectedItem.ToString(); objbsmod.PurcAccounttoHeadPostParty = cbxPurcAccountHeadPostParty.SelectedItem.ToString(); if (objbsmod.PurcAdjustInPurcAmount) { objbsmod.PurcPostOverandAbove = cbxPurcPostOverAbove.SelectedItem.ToString() == "Y" ? true : false; } objbsmod.typeMaterialIssue = false; objbsmod.typeMaterialReceipt = false; objbsmod.StockTransfer = false; if (rbnMaterial.SelectedIndex == 0) { objbsmod.typeMaterialIssue = true; } if (rbnMaterial.SelectedIndex == 1) { objbsmod.typeMaterialReceipt = true; } if (rbnMaterial.SelectedIndex == 2) { objbsmod.StockTransfer = true; } objbsmod.AffectAccounting = Convert.ToBoolean(cbxAffectAccounting.Text.ToString() == "Y" ? true : false); objbsmod.OtherSide = cbxotherside.SelectedItem == null ? string.Empty : cbxotherside.SelectedItem.ToString(); objbsmod.Accountheadtopost = cbxAccountHeadPost.Text.Trim(); objbsmod.AdjustinMC = cbxAdjustinmc.SelectedItem.ToString().Equals("Y") ? true : false; objbsmod.AdjustSpecifyAccountLedger = cbxAccountAdjustinParty.SelectedItem.ToString(); objbsmod.AccountheadtopostParty = cbxAccountPost.SelectedItem.ToString() == null ? string.Empty : cbxAccountPost.SelectedItem.ToString(); objbsmod.postoverandabove = Convert.ToBoolean(cbxPostoverabove.Text.ToString() == "Y" ? true : false); //Amount Of Bill Sundary objbsmod.typeAbsoluteAmount = false; objbsmod.typePercentage = false; objbsmod.typePerMainQty = false; objbsmod.PerAltQty = false; if (rbnAmtBillsundary.SelectedIndex == 0) { objbsmod.typeAbsoluteAmount = true; } if (rbnAmtBillsundary.SelectedIndex == 1) { objbsmod.typePercentage = true; } if (rbnAmtBillsundary.SelectedIndex == 2) { objbsmod.typePerMainQty = true; } if (rbnAmtBillsundary.SelectedIndex == 3) { objbsmod.PerAltQty = true; } objbsmod.typeNetBillAmount = false; objbsmod.tyeItemsBasicAmt = false; objbsmod.typeTotalMRPofItems = false; objbsmod.typeTaxableAmount = false; objbsmod.typePreviousBillSundryAmount = false; objbsmod.typeOtherBillsundry = false; if (rbnbillsOf.SelectedIndex == 0) { objbsmod.typeNetBillAmount = true; } if (rbnbillsOf.SelectedIndex == 1) { objbsmod.tyeItemsBasicAmt = true; } if (rbnbillsOf.SelectedIndex == 2) { objbsmod.typeTotalMRPofItems = true; } if (rbnbillsOf.SelectedIndex == 3) { objbsmod.typeTaxableAmount = true; } if (rbnbillsOf.SelectedIndex == 4) { objbsmod.typePreviousBillSundryAmount = true; } if (rbnbillsOf.SelectedIndex == 5) { objbsmod.typeOtherBillsundry = true; } objbsmod.Percentoff = Convert.ToDecimal(tbxPersentage.Text.ToString()); objbsmod.SelectiveCalculation = Convert.ToBoolean(cbxselectivecalculation.SelectedItem.ToString() == "Y" ? true : false); objbsmod.IncludeFreeQty = Convert.ToBoolean(chkIncludefreequantity.Checked ? true : false); objbsmod.NoOfBillSundry = Convert.ToInt32(tbxNofbillsundrys.Text == null ? "0" : tbxNofbillsundrys.Text.Trim()); objbsmod.ConsolidateBillSundriesAmount = Convert.ToBoolean(cbxConsoilatedbillsundariesamt.SelectedItem.ToString() == "Y" ? true : false); objbsmod.BillSundaryName = cbxBillSundary.SelectedItem.ToString(); objbsmod.BSAmt = false; objbsmod.BSAppOn = false; if (rbnBillsundaryCal.SelectedIndex == 0) { objbsmod.BSAmt = true; } if (rbnBillsundaryCal.SelectedIndex == 1) { objbsmod.BSAppOn = true; } objbsmod.roundoffBillsundry = Convert.ToBoolean(cbxRoundoffBillsundryamount.SelectedItem.ToString() == "Y" ? true : false); if (objbsmod.roundoffBillsundry) { objbsmod.RoundoffValues = cbxRoundofValues.SelectedItem.ToString(); } objbsmod.BS_Id = BillsId; bool isSuccess = objbsBL.UpdateBSM(objbsmod); if (isSuccess) { MessageBox.Show("Update Successfully!"); Administration.List.BillsundaryList frmBSList = new Administration.List.BillsundaryList(); frmBSList.StartPosition = FormStartPosition.CenterScreen; frmBSList.ShowDialog(); FillBillSundryInfo(); } }