private void ListPurcType_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Administration.List.PurchaseList frmPurcList = new Administration.List.PurchaseList(); frmPurcList.StartPosition = FormStartPosition.CenterParent; frmPurcList.ShowDialog(); FillPurchaseTypeInfo(); }
private void ListPurchase_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { Administration.List.PurchaseList frmList = new Administration.List.PurchaseList(); frmList.StartPosition = FormStartPosition.CenterScreen; frmList.ShowDialog(); }
private void btnDelete_Click(object sender, EventArgs e) { bool isDelete = objPurcBL.DeletePurchaseType(PurcId); if (isDelete) { MessageBox.Show("Delete Successfully!"); PurcId = 0; Administration.List.PurchaseList frmPurcList = new Administration.List.PurchaseList(); frmPurcList.StartPosition = FormStartPosition.CenterParent; frmPurcList.ShowDialog(); FillPurchaseTypeInfo(); } }
private void btnUpdate_Click(object sender, EventArgs e) { objPurcModel = new PurchaseTypeModel(); objPurcModel.PurchType = tbxPurcahseType.Text.Trim(); //this GroupBox for sales Account Information of RadioButton objPurcModel.typeSpecifyHereSingleAccount = rbngrpSalesAcInf.SelectedIndex == 0 ? true : false; if (objPurcModel.typeSpecifyHereSingleAccount) { objPurcModel.LedgerAccountBox = cbxLedgerAccount.Text.Trim() == null ? string.Empty : cbxLedgerAccount.Text.Trim(); } objPurcModel.typeDifferentTaxRate = rbngrpSalesAcInf.SelectedIndex == 1 ? true : false; objPurcModel.typeSpecifyINVoucher = rbngrpSalesAcInf.SelectedIndex == 2 ? true : false; //TaxationType: RadioButton Group if (rbngrpTaxation.SelectedIndex == 0) { objPurcModel.typeTaxable = true; } if (rbngrpTaxation.SelectedIndex == 1) { objPurcModel.typeAgainstSTFrom = true; } if (rbngrpTaxation.SelectedIndex == 2) { objPurcModel.typeExempt = true; } if (rbngrpTaxation.SelectedIndex == 3) { objPurcModel.typeLUMSumDealer = true; } if (rbngrpTaxation.SelectedIndex == 4) { objPurcModel.typeMultiTax = true; } if (rbngrpTaxation.SelectedIndex == 5) { objPurcModel.typeTaxpaid = true; } if (rbngrpTaxation.SelectedIndex == 6) { objPurcModel.typeTaxFree = true; } if (rbngrpTaxation.SelectedIndex == 7) { objPurcModel.typeUnRegDealer = true; } //Region Radio Button GroupBox if (rbngrpRegion.SelectedIndex == 0) { objPurcModel.TypeLocal = true; } if (rbngrpRegion.SelectedIndex == 1) { objPurcModel.TypeCentral = true; } //other Information Group if (objPurcModel.typeTaxable) { if (objPurcModel.TypeLocal) { objPurcModel.TaxInvoice = cbxTaxInvoiceyesno.SelectedItem.ToString().Equals("Y") ? true : false; } objPurcModel.VatReturnCategory = cbxVatreturnCategory.SelectedItem.ToString(); objPurcModel.SkipVatorSaleTaxReport = cbxVatorSalesTaxReports.SelectedItem.ToString().Equals("Y") ? true : false; } if (objPurcModel.typeMultiTax) { if (objPurcModel.TypeLocal) { objPurcModel.TaxInvoice = cbxTaxInvoiceyesno.SelectedItem.ToString().Equals("Y") ? true : false; } objPurcModel.CalculateTaxonItemMRP = cbxTaxonItemmrp.SelectedItem.ToString().Equals("Y") ? true : false; objPurcModel.TaxInclusiveItemPrice = cbxTaxInclItemPrice.SelectedItem.ToString().Equals("Y") ? true : false; objPurcModel.CalculatedTax = Convert.ToDecimal(tbxCalculatedtax.Text.Trim() == string.Empty ? "0.00" : tbxCalculatedtax.Text.Trim()); objPurcModel.VatReturnCategory = cbxVatreturnCategory.SelectedItem.ToString(); objPurcModel.SkipVatorSaleTaxReport = cbxVatorSalesTaxReports.SelectedItem.ToString().Equals("Y") ? true : false; objPurcModel.AdjustTaxinSaleAccount = cbxAdTaxinSaleAmt.SelectedItem.ToString().Equals("Y") ? true : false; if (objPurcModel.typeDifferentTaxRate == false) { objPurcModel.TaxAccount = cbxTaxAccount.SelectedItem.ToString(); } } if (objPurcModel.typeAgainstSTFrom) { if (objPurcModel.TypeLocal) { objPurcModel.TaxInvoice = cbxTaxInvoiceyesno.SelectedItem.ToString().Equals("Y") ? true : false; } objPurcModel.VatReturnCategory = cbxVatreturnCategory.SelectedItem.ToString(); objPurcModel.SkipVatorSaleTaxReport = cbxVatorSalesTaxReports.SelectedItem.ToString().Equals("Y") ? true : false; if (objPurcModel.typeAgainstSTFrom) { objPurcModel.IssueSTFrom = cbxIssueSTform.SelectedItem.ToString().Equals("Y") ? true : false; if (objPurcModel.IssueSTFrom) { objPurcModel.FromIssuable = cbxFormIssuable.SelectedItem.ToString(); } objPurcModel.ReceiveSTForm = cbxIssueSTform.SelectedItem.ToString().Equals("Y") ? true : false; if (objPurcModel.IssueSTFrom) { objPurcModel.FromReceivable = cbxFormIssuable.SelectedItem.ToString(); } } objPurcModel.TaxinPercentage = Convert.ToDecimal(tbxTaxPer.Text.Trim() == string.Empty ? "0.00" : tbxTaxPer.Text.Trim()); objPurcModel.SurchargeInPercentage = Convert.ToDecimal(tbxSurchargePer.Text.Trim() == string.Empty ? "0.00" : tbxSurchargePer.Text.Trim()); objPurcModel.freezeTaxinSales = cbxFreezeTaxinsale.SelectedItem.ToString().Equals("Y") ? true : false; objPurcModel.freezeTaxinSalesReturn = cbxFreezeTaxinSaleReturn.SelectedItem.ToString().Equals("Y") ? true : false; } if (objPurcModel.typeTaxpaid || objPurcModel.typeExempt || objPurcModel.typeTaxFree) { objPurcModel.VatReturnCategory = cbxVatreturnCategory.SelectedItem.ToString(); objPurcModel.SkipVatorSaleTaxReport = cbxVatorSalesTaxReports.SelectedItem.ToString().Equals("Y") ? true : false; } //if Enable MultiTax Will Show on other Information Group //Tax Calculation objPurcModel.SingleTaxRate = rbngrpTaxcalculation.SelectedIndex == 0 ? true : false; objPurcModel.MultiTaxRate = rbngrpTaxcalculation.SelectedIndex == 1 ? true : false; if (objPurcModel.SingleTaxRate) { objPurcModel.TaxinPercentage = Convert.ToDecimal(tbxTaxPer.Text.Trim() == string.Empty ? "0.00" : tbxTaxPer.Text.Trim()); objPurcModel.SurchargeInPercentage = Convert.ToDecimal(tbxSurchargePer.Text.Trim() == string.Empty ? "0.00" : tbxSurchargePer.Text.Trim()); objPurcModel.freezeTaxinSales = cbxFreezeTaxinsale.SelectedItem.ToString().Equals("Y") ? true : false; objPurcModel.freezeTaxinSalesReturn = cbxFreezeTaxinSaleReturn.SelectedItem.ToString().Equals("Y") ? true : false; } if (objPurcModel.MultiTaxRate) { if (objPurcModel.typeSpecifyHereSingleAccount) { objPurcModel.servicesLedgerBox = cbxServicesAccLedger.SelectedItem.ToString(); } } //Type of Transaction on Region GrupBox Sub objPurcModel.TypeStockTransfer = rbngrpTranction.SelectedIndex == 0 ? true : false; objPurcModel.ExportNormal = rbngrpTranction.SelectedIndex == 1 ? true : false; objPurcModel.SaleinTransit = rbngrpTranction.SelectedIndex == 2 ? true : false; objPurcModel.TypeOther = rbngrpTranction.SelectedIndex == 3 ? true : false; objPurcModel.ExportHighsea = rbngrpTranction.SelectedIndex == 4 ? true : false; objPurcModel.InvoiceHeading = tbxInvoiceHeading.Text.Trim() == null ? string.Empty : tbxInvoiceHeading.Text.Trim(); objPurcModel.InvoiceDescription = tbxInvoiceDescription.Text.Trim() == null ? string.Empty : tbxInvoiceDescription.Text.Trim(); objPurcModel.Purch_Id = PurcId; bool isSuccess = objPurcBL.UpdatePurchasetype(objPurcModel); if (isSuccess) { MessageBox.Show("Update Successfully!"); PurcId = 0; Administration.List.PurchaseList frmPurcList = new Administration.List.PurchaseList(); frmPurcList.StartPosition = FormStartPosition.CenterParent; frmPurcList.ShowDialog(); FillPurchaseTypeInfo(); } }