Esempio n. 1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     Tax tax = new Tax();
     tax.TaxId = TaxId;
     tax.TaxName = txtTaxName.Text.Trim();
     tax.TaxPercentage = Convert.ToDecimal(txtTaxPercentage.Text);
     masterService.UpdateTax(tax);
     CustomMessageBox.Show(string.Format(Constants.SUCCESSFULL_TAX_SAVE_MESSAGE, txtTaxName.Text),
                                                       Constants.CONSTANT_INFORMATION,
                                                       Sleek_Bill.Controls.CustomMessageBox.eDialogButtons.OK,
                                                       CustomImages.GetDialogImage(Sleek_Bill.Controls.CustomImages.eCustomDialogImages.Success));
     this.Close();
 }
Esempio n. 2
0
        public void UpdateTax(Tax tax)
        {
            using (TransactionScope scope = new TransactionScope())
            {
                Db.ExecuteNonQuery("usp_Tax_UpdateTax", CommandType.StoredProcedure,
                    new DbParameter[] {
                               Db.CreateParameter("TaxId", tax.TaxId),
                               Db.CreateParameter("TaxName", tax.TaxName),
                               Db.CreateParameter("TaxPercentage", tax.TaxPercentage)

                 });
                scope.Complete();
            }
        }
Esempio n. 3
0
        public int AddTax(Tax tax)
        {
            using (TransactionScope scope = new TransactionScope())
            {
                DbParameter parameter = null;
                parameter = Db.CreateParameter("TaxId", DbType.Int32, 8);
                parameter.Direction = ParameterDirection.Output;
                Db.ExecuteNonQuery("usp_Tax_InsertTaxDetails", CommandType.StoredProcedure,
                    new DbParameter[] {
                               parameter,
                               Db.CreateParameter("TaxName", tax.TaxName),
                               Db.CreateParameter("TaxPercentage", tax.TaxPercentage),
                               Db.CreateParameter("Status", tax.Status),

                 });
                scope.Complete();
                return (int)parameter.Value;
            }
        }
Esempio n. 4
0
 public void UpdateTax(Tax tax)
 {
     this.masterDBObj.UpdateTax(tax);
 }
Esempio n. 5
0
 public int AddTax(Tax tax)
 {
     return this.masterDBObj.AddTax(tax);
 }
Esempio n. 6
0
 private void btnAddTax_Click(object sender, EventArgs e)
 {
     Tax tax = new Tax();
     tax.TaxName = txtTaxName.Text.Trim();
     tax.TaxPercentage = Math.Round(Convert.ToDecimal(txtTaxPercentage.Text),2);
     tax.IsDefault = false;
     tax.Status = true;
     int taxId = masterService.AddTax(tax);
     CustomMessageBox.Show(Constants.SUCCESSFULL_TAX_ADD_MESSAGE,
                                                       Constants.CONSTANT_INFORMATION,
                                                       Sleek_Bill.Controls.CustomMessageBox.eDialogButtons.OK,
                                                       CustomImages.GetDialogImage(Sleek_Bill.Controls.CustomImages.eCustomDialogImages.Success));
     BindTaxDetailsDataGrid();
 }