Ejemplo n.º 1
0
        public static DataTable Service_Tax_ByFeesHead_Report(Entity.Accounts.Tax tax)
        {
            using (DataManager oDm = new DataManager())
            {
                oDm.Add("@FeesHeadId", SqlDbType.Int, tax.FeesHeadId);
                oDm.Add("@FromDate", SqlDbType.DateTime, tax.FromDate);
                oDm.Add("@ToDate", SqlDbType.DateTime, tax.ToDate);
                oDm.Add("@CompanyId", SqlDbType.Int, tax.CompanyId);

                oDm.CommandType = CommandType.StoredProcedure;
                return(oDm.ExecuteDataTable("usp_Service_Tax_ByFeesHead_Report"));
            }
        }
Ejemplo n.º 2
0
        public static int Save(Entity.Accounts.Tax tax)
        {
            using (DataManager oDm = new DataManager())
            {
                oDm.Add("@TaxId", SqlDbType.Int, tax.TaxId);
                oDm.Add("@TaxHead", SqlDbType.VarChar, 50, tax.TaxHead);
                oDm.Add("@TaxPercent", SqlDbType.Decimal, tax.TaxPercent);
                oDm.Add("@MessageCode", SqlDbType.Int, ParameterDirection.InputOutput, 0);
                oDm.CommandType = CommandType.StoredProcedure;

                oDm.ExecuteNonQuery("Tax_Save");
                return((int)oDm["@MessageCode"].Value);
            }
        }
Ejemplo n.º 3
0
        protected void PopulateTax()
        {
            BusinessLayer.Accounts.Tax objTax = new BusinessLayer.Accounts.Tax();
            tax = objTax.GetTaxById(TaxId);

            if (tax != null)
            {
                TaxId              = tax.TaxId;
                txtTaxHead.Text    = tax.TaxHead.ToString();
                txtTaxPercent.Text = tax.TaxPercent.ToString();
                Message.Show       = false;
                btnSave.Text       = "Update";
            }
        }
Ejemplo n.º 4
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            BusinessLayer.Accounts.Tax objTax = new BusinessLayer.Accounts.Tax();
            Entity.Accounts.Tax        tax    = new Entity.Accounts.Tax();
            tax.FeesHeadId = int.Parse(ddlFeesHead.SelectedValue);
            tax.FromDate   = DateTime.Parse(txtFromDate.Text);
            tax.ToDate     = DateTime.Parse(txtToDate.Text);
            tax.CompanyId  = int.Parse(Session["CompanyId"].ToString());

            DataTable dt = new DataTable();

            dt = objTax.Service_Tax_ByFeesHead_Report(tax);
            gvServiceTax.DataSource = dt;
            gvServiceTax.DataBind();
        }
Ejemplo n.º 5
0
        protected void btnSearch2_Click(object sender, EventArgs e)
        {
            BusinessLayer.Accounts.Tax objTax = new BusinessLayer.Accounts.Tax();
            Entity.Accounts.Tax        tax    = new Entity.Accounts.Tax();
            tax.LedgerId       = int.Parse(ddlLedger.SelectedValue);
            tax.ParentLedgerId = int.Parse(ddlCashBankLedger.SelectedValue);
            tax.FromDate       = DateTime.Parse(txtFromDate2.Text);
            tax.ToDate         = DateTime.Parse(txtToDate2.Text);
            tax.BranchId       = int.Parse(Session["BranchID"].ToString());
            tax.CompanyId      = int.Parse(Session["CompanyId"].ToString());

            DataTable dt = new DataTable();

            dt = objTax.Service_Tax_ByLedgerId_Report(tax);
            gvServiceTax2.DataSource = dt;
            gvServiceTax2.DataBind();
        }
Ejemplo n.º 6
0
        public static DataTable Service_Tax_ByLedgerId_Report(Entity.Accounts.Tax tax)
        {
            using (DataManager oDm = new DataManager())
            {
                oDm.Add("@LedgerId", SqlDbType.Int, tax.LedgerId);
                if (tax.ParentLedgerId == 0)
                {
                    oDm.Add("@ParentLedgerID", SqlDbType.Int, DBNull.Value);
                }
                else
                {
                    oDm.Add("@ParentLedgerID", SqlDbType.Int, tax.ParentLedgerId);
                }
                oDm.Add("@FromDate", SqlDbType.DateTime, tax.FromDate);
                oDm.Add("@ToDate", SqlDbType.DateTime, tax.ToDate);
                oDm.Add("@BranchId", SqlDbType.Int, tax.BranchId);
                oDm.Add("@CompanyId", SqlDbType.Int, tax.CompanyId);

                oDm.CommandType = CommandType.StoredProcedure;
                return(oDm.ExecuteDataTable("usp_Service_Tax_ByLedgerId_Report"));
            }
        }
Ejemplo n.º 7
0
        public static Entity.Accounts.Tax GetTaxById(int taxid)
        {
            using (DataManager oDm = new DataManager())
            {
                oDm.CommandType = CommandType.StoredProcedure;

                oDm.Add("@TaxId", SqlDbType.Int, ParameterDirection.Input, taxid);

                SqlDataReader dr = oDm.ExecuteReader("Tax_GetById");

                Entity.Accounts.Tax tax = new Entity.Accounts.Tax();
                if (dr.HasRows)
                {
                    while (dr.Read())
                    {
                        tax.TaxId      = taxid;
                        tax.TaxHead    = (dr["TaxHead"] == DBNull.Value) ? "" : dr["TaxHead"].ToString();
                        tax.TaxPercent = (dr["TaxPercent"] == DBNull.Value) ? 0 : decimal.Parse(dr["TaxPercent"].ToString());
                    }
                }
                return(tax);
            }
        }
Ejemplo n.º 8
0
 public DataTable Service_Tax_ByLedgerId_Report(Entity.Accounts.Tax tax)
 {
     return(DataAccess.Accounts.Tax.Service_Tax_ByLedgerId_Report(tax));
 }
Ejemplo n.º 9
0
 public int Save(Entity.Accounts.Tax tax)
 {
     return(DataAccess.Accounts.Tax.Save(tax));
 }