/// <summary>
 /// Function to insert values to SalesReturnBillTax Table
 /// </summary>
 /// <param name="salesreturnbilltaxinfo"></param>
 public void SalesReturnBillTaxAdd(SalesReturnBillTaxInfo salesreturnbilltaxinfo)
 {
     try
     {
         if (sqlcon.State == ConnectionState.Closed)
         {
             sqlcon.Open();
         }
         SqlCommand sccmd = new SqlCommand("SalesReturnBillTaxAdd", sqlcon);
         sccmd.CommandType = CommandType.StoredProcedure;
         SqlParameter sprmparam = new SqlParameter();
         sprmparam = sccmd.Parameters.Add("@salesReturnMasterId", SqlDbType.Decimal);
         sprmparam.Value = salesreturnbilltaxinfo.SalesReturnMasterId;
         sprmparam = sccmd.Parameters.Add("@taxId", SqlDbType.Decimal);
         sprmparam.Value = salesreturnbilltaxinfo.TaxId;
         sprmparam = sccmd.Parameters.Add("@taxAmount", SqlDbType.Decimal);
         sprmparam.Value = salesreturnbilltaxinfo.TaxAmount;
         sprmparam = sccmd.Parameters.Add("@extra1", SqlDbType.VarChar);
         sprmparam.Value = salesreturnbilltaxinfo.Extra1;
         sprmparam = sccmd.Parameters.Add("@extra2", SqlDbType.VarChar);
         sprmparam.Value = salesreturnbilltaxinfo.Extra2;
         sccmd.ExecuteNonQuery();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         sqlcon.Close();
     }
 }
        public void SalesReturnBillTaxAdd(SalesReturnBillTaxInfo infoSalesReturnBiill)
        {
            try
             {
                 spSalesReturnBillTax.SalesReturnBillTaxAdd(infoSalesReturnBiill);
             }
             catch (Exception ex)
             {
                 MessageBox.Show("AG1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);

             }
        }
 /// <summary>
 /// Function to get particular values from SalesReturnBillTax Table based on the parameter
 /// </summary>
 /// <param name="salesReturnBillTaxId"></param>
 /// <returns></returns>
 public SalesReturnBillTaxInfo SalesReturnBillTaxView(decimal salesReturnBillTaxId)
 {
     SalesReturnBillTaxInfo salesreturnbilltaxinfo = new SalesReturnBillTaxInfo();
     SqlDataReader sdrreader = null;
     try
     {
         if (sqlcon.State == ConnectionState.Closed)
         {
             sqlcon.Open();
         }
         SqlCommand sccmd = new SqlCommand("SalesReturnBillTaxView", sqlcon);
         sccmd.CommandType = CommandType.StoredProcedure;
         SqlParameter sprmparam = new SqlParameter();
         sprmparam = sccmd.Parameters.Add("@salesReturnBillTaxId", SqlDbType.Decimal);
         sprmparam.Value = salesReturnBillTaxId;
         sdrreader = sccmd.ExecuteReader();
         while (sdrreader.Read())
         {
             salesreturnbilltaxinfo.SalesReturnBillTaxId = decimal.Parse(sdrreader[0].ToString());
             salesreturnbilltaxinfo.SalesReturnMasterId = decimal.Parse(sdrreader[1].ToString());
             salesreturnbilltaxinfo.TaxId = decimal.Parse(sdrreader[2].ToString());
             salesreturnbilltaxinfo.TaxAmount = decimal.Parse(sdrreader[3].ToString());
             salesreturnbilltaxinfo.ExtraDate = DateTime.Parse(sdrreader[4].ToString());
             salesreturnbilltaxinfo.Extra1 = sdrreader[5].ToString();
             salesreturnbilltaxinfo.Extra2 = sdrreader[6].ToString();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         sdrreader.Close();
         sqlcon.Close();
     }
     return salesreturnbilltaxinfo;
 }