示例#1
0
        public bool UpdateTaxCategory(eSunSpeedDomain.TaxCategoryModel objTaxCat)
        {
            string Query     = string.Empty;
            bool   isUpdated = true;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();

                paramCollection.Add(new DBParameter("@Name", objTaxCat.Name));
                paramCollection.Add(new DBParameter("@TaxCat_Type", objTaxCat.TaxCat_Type));
                paramCollection.Add(new DBParameter("@Taxation_Type", objTaxCat.Taxation_Type));
                paramCollection.Add(new DBParameter("@RateofTaxLocal", objTaxCat.Local_Tax));
                paramCollection.Add(new DBParameter("@RateofCentral", objTaxCat.CentralTax));
                paramCollection.Add(new DBParameter("@TaxonMRP", objTaxCat.TaxonMRP, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculatedTaxon", objTaxCat.CalculatedTaxon));

                paramCollection.Add(new DBParameter("@TaxonMRPMode", objTaxCat.TaxonMRPMode));
                paramCollection.Add(new DBParameter("@HSNCode", objTaxCat.HSNCode));
                paramCollection.Add(new DBParameter("@Tax_Desc", objTaxCat.Tax_Desc));

                paramCollection.Add(new DBParameter("@ModifiedBy", "Admin"));
                paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now));
                paramCollection.Add(new DBParameter("@Id", objTaxCat.TaxCat_Id));


                Query = "UPDATE TaxCategory SET [Name]=@Name,[TaxCat_Type]=@TaxCat_Type,[Taxation_Type]=@Taxation_Type,[Local_Tax]=@RateofTaxLocal," +
                        "[CentralTax]=@RateofCentral,[TaxonMRP]=@TaxonMRP,[CalculatedTaxon]=@CalculatedTaxon,[TaxonMRPMode]=@TaxonMRPMode," +
                        "[HSNCode]=@HSNCode,[Tax_Desc]=@Tax_Desc,[ModifiedBy]=@ModifiedBy,[ModifiedDate]=@ModifiedDate " +
                        "WHERE TaxCat_Id=@Id;";

                if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
                {
                    isUpdated = true;
                }
            }
            catch (Exception ex)
            {
                isUpdated = false;
                throw ex;
            }

            return(isUpdated);
        }
示例#2
0
        //Save TaxCategory
        public bool SaveTaxCategory(eSunSpeedDomain.TaxCategoryModel objTaxCat)
        {
            string Query   = string.Empty;
            bool   isSaved = true;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();

                paramCollection.Add(new DBParameter("@Name", objTaxCat.Name));
                paramCollection.Add(new DBParameter("@TaxCat_Type", objTaxCat.TaxCat_Type));
                paramCollection.Add(new DBParameter("@ServiceTax", objTaxCat.ServiceTax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@RateofTaxLocal", objTaxCat.Local_Tax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@RateofCentral", objTaxCat.CentralTax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@TaxonMRP", objTaxCat.TaxonMRP, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculatedTaxon", objTaxCat.CalculatedTaxon, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@TaxonMRPMode", objTaxCat.TaxonMRPMode));
                paramCollection.Add(new DBParameter("@Taxation_Type", objTaxCat.Taxation_Type));
                paramCollection.Add(new DBParameter("@HSNCode", objTaxCat.HSNCode));
                paramCollection.Add(new DBParameter("@Tax_Desc", objTaxCat.Tax_Desc));
                paramCollection.Add(new DBParameter("@CreatedBy", objTaxCat.CreatedBy));
                paramCollection.Add(new DBParameter("@CreatedDate", DateTime.Now, System.Data.DbType.DateTime));

                Query = "INSERT INTO taxcategory(`Name`,`TaxCat_Type`,`Service_Tax`,`Local_Tax`,`Central_Tax`,`TaxonMRP`,`CalculatedTaxon`,`TaxonMRPMode`,`Taxation_Type`," +
                        "`HSNCode`,`Tax_Desc`,`CreatedBy`,`CreatedDate`) VALUES " +
                        "(@Name,@TaxCat_Type,@ServiceTax,@RateofTaxLocal,@RateofCentral,@TaxonMRP,@CalculatedTaxon,@TaxonMRPMode,@Taxation_Type,@HSNCode,@Tax_Desc,@CreatedBy,@CreatedDate)";

                if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
                {
                    SaveTaxRates(objTaxCat.TaxRates);
                    isSaved = true;
                }
            }
            catch (Exception ex)
            {
                isSaved = false;
                throw ex;
            }

            return(isSaved);
        }
示例#3
0
        public bool SaveTaxCategory(eSunSpeedDomain.TaxCategoryModel objTaxCat)
        {
            string Query   = string.Empty;
            bool   isSaved = true;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();

                paramCollection.Add(new DBParameter("@Name", objTaxCat.Name));
                paramCollection.Add(new DBParameter("@TaxCat_Type", objTaxCat.TaxCat_Type));
                paramCollection.Add(new DBParameter("@Taxation_Type", objTaxCat.Taxation_Type));
                paramCollection.Add(new DBParameter("@RateofTaxLocal", objTaxCat.Local_Tax));
                paramCollection.Add(new DBParameter("@RateofCentral", objTaxCat.CentralTax));
                paramCollection.Add(new DBParameter("@TaxonMRP", objTaxCat.TaxonMRP, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculatedTaxon", objTaxCat.CalculatedTaxon, System.Data.DbType.Decimal));

                paramCollection.Add(new DBParameter("@TaxonMRPMode", objTaxCat.TaxonMRPMode));
                paramCollection.Add(new DBParameter("@HSNCode", objTaxCat.HSNCode));
                paramCollection.Add(new DBParameter("@Tax_Desc", objTaxCat.Tax_Desc));

                paramCollection.Add(new DBParameter("@CreatedBy", objTaxCat.CreatedBy));

                Query = "INSERT INTO TaxCategory([Name],[TaxCat_Type],[Taxation_Type],[Local_Tax],[CentralTax],[TaxonMRP],[CalculatedTaxon],[TaxonMRPMode]," +
                        "[HSNCode],[Tax_Desc],[CreatedBy]) VALUES " +
                        "(@Name,@TaxCat_Type,@Taxation_Type,@RateofTaxLocal,@RateofCentral,@TaxonMRP,@CalculatedTaxon,@TaxonMRPMode,@HSNCode,@Tax_Desc,@CreatedBy)";

                if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
                {
                    isSaved = true;
                }
            }
            catch (Exception ex)
            {
                isSaved = false;
                throw ex;
            }

            return(isSaved);
        }
示例#4
0
        public bool SaveTaxCategory(eSunSpeedDomain.TaxCategoryModel objTaxCat)
        {
            string Query   = string.Empty;
            bool   isSaved = true;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();

                paramCollection.Add(new DBParameter("@Name", objTaxCat.Name));
                paramCollection.Add(new DBParameter("@Type", objTaxCat.Type));
                paramCollection.Add(new DBParameter("@RateofTaxLocal", objTaxCat.LocalTax));
                paramCollection.Add(new DBParameter("@RateofCentral", objTaxCat.CentralTax));
                paramCollection.Add(new DBParameter("@TaxonMRP", objTaxCat.TaxonMRP, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculatedTaxon", objTaxCat.CalculatedTaxon, System.Data.DbType.Decimal));

                paramCollection.Add(new DBParameter("@TaxonMRPMode", objTaxCat.TaxonMRPMode));
                paramCollection.Add(new DBParameter("@TaxationType", objTaxCat.TaxationType));
                paramCollection.Add(new DBParameter("@HSNCode", objTaxCat.HSNCode));
                paramCollection.Add(new DBParameter("@Description", objTaxCat.Description));

                // paramCollection.Add(new DBParameter("@CreatedBy", objTaxCat.CreatedBy));

                Query = "INSERT INTO TaxCategory(`Name`,`Type`,`LocalTax`,`CentralTax`,`TaxonMRP`,`CalculatedTaxon`,`TaxonMRPMode`,`TaxationType`,`HSNCode`,`Description`)" +
                        "VALUES(@Name,@Type,@RateofTaxlocal,@RateofCentral,@TaxonMRP,@CalculatedTaxon,@TaxonMRPMode,@TaxationType,@HSNCode,@Description)";

                if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
                {
                    isSaved = true;
                }
            }
            catch (Exception ex)
            {
                isSaved = false;
                throw ex;
            }

            return(isSaved);
        }
示例#5
0
        //Save GST Details
        public bool SaveGSTDetails(eSunSpeedDomain.TaxCategoryModel objTaxCat)
        {
            string Query   = string.Empty;
            bool   isSaved = true;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();

                paramCollection.Add(new DBParameter("@GSTName", objTaxCat.GSTName));
                paramCollection.Add(new DBParameter("@TaxCat_Type", objTaxCat.TaxCat_Type));
                paramCollection.Add(new DBParameter("@CGST_Tax", objTaxCat.CGST_Tax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@SGST_Tax", objTaxCat.SGST_Tax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@IGST_Tax", objTaxCat.IGST_Tax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@TaxonMRP", objTaxCat.TaxonMRP, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculatedTaxon", objTaxCat.CalculatedTaxon, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@TaxonMRPMode", objTaxCat.TaxonMRPMode));
                paramCollection.Add(new DBParameter("@CreatedBy", "Admin"));
                paramCollection.Add(new DBParameter("@CreatedDate", DateTime.Now, System.Data.DbType.DateTime));
                paramCollection.Add(new DBParameter("@ModifiedBy", "Admin"));
                paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now, System.Data.DbType.DateTime));

                System.Data.IDataReader dr =
                    _dbHelper.ExecuteDataReader("spInsertGSTDetails", _dbHelper.GetConnObject(), paramCollection, System.Data.CommandType.StoredProcedure);
                long id = 0;
                dr.Read();
                id = Convert.ToInt64(dr[0]);
                SaveGSTTaxRatesDetails(objTaxCat.GSTTaxRates, id);
            }
            catch (Exception ex)
            {
                isSaved = false;
                //throw ex;
            }

            return(isSaved);
        }
示例#6
0
        //Update GST Details
        public bool UpdateGSTDetails(eSunSpeedDomain.TaxCategoryModel objTaxCat)
        {
            string Query   = string.Empty;
            bool   isSaved = true;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();

                paramCollection.Add(new DBParameter("@GSTID", objTaxCat.GST_ID));
                paramCollection.Add(new DBParameter("@GSTName", objTaxCat.GSTName));
                paramCollection.Add(new DBParameter("@TaxCat_Type", objTaxCat.TaxCat_Type));
                paramCollection.Add(new DBParameter("@CGST_Tax", objTaxCat.CGST_Tax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@SGST_Tax", objTaxCat.SGST_Tax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@IGST_Tax", objTaxCat.IGST_Tax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@TaxonMRP", objTaxCat.TaxonMRP, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculatedTaxon", objTaxCat.CalculatedTaxon, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@TaxonMRPMode", objTaxCat.TaxonMRPMode));
                paramCollection.Add(new DBParameter("@CreatedBy", "Admin"));
                paramCollection.Add(new DBParameter("@CreatedDate", DateTime.Now, System.Data.DbType.DateTime));
                paramCollection.Add(new DBParameter("@ModifiedBy", "Admin"));
                paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now, System.Data.DbType.DateTime));

                System.Data.IDataReader dr =
                    _dbHelper.ExecuteDataReader("spUpdateGSTDetails", _dbHelper.GetConnObject(), paramCollection, System.Data.CommandType.StoredProcedure);
                //Update GST Rate Details
                foreach (TaxRatesModel objGTaxRate in objTaxCat.GSTTaxRates)
                {
                    objGTaxRate.GSTID = objTaxCat.GST_ID;
                    if (objGTaxRate.TaxRate_Id > 0)
                    {
                        paramCollection = new DBParameterCollection();

                        paramCollection.Add(new DBParameter("@GSTID", objGTaxRate.GSTID));
                        paramCollection.Add(new DBParameter("@TaxRateId", objGTaxRate.TaxRate_Id));
                        paramCollection.Add(new DBParameter("@wef", objGTaxRate.wef, System.Data.DbType.DateTime));
                        paramCollection.Add(new DBParameter("@CGST_Tax", objGTaxRate.CGST_Tax, System.Data.DbType.Decimal));
                        paramCollection.Add(new DBParameter("@SGST_Tax", objGTaxRate.SGST_Tax, System.Data.DbType.Decimal));
                        paramCollection.Add(new DBParameter("@Tax_Type", objGTaxRate.Tax_Type));
                        paramCollection.Add(new DBParameter("@IGST_Tax", objGTaxRate.IGST_Tax, System.Data.DbType.Decimal));
                        paramCollection.Add(new DBParameter("@Cess", objGTaxRate.Cess, System.Data.DbType.Decimal));
                        paramCollection.Add(new DBParameter("@CreatedBy", "Admin"));
                        paramCollection.Add(new DBParameter("@CreatedDate", DateTime.Now, System.Data.DbType.DateTime));
                        paramCollection.Add(new DBParameter("@ModifiedBy", "Admin"));
                        paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now, System.Data.DbType.DateTime));

                        System.Data.IDataReader drGT =
                            _dbHelper.ExecuteDataReader("spUpdateGSTTaxRateDetails", _dbHelper.GetConnObject(), paramCollection, System.Data.CommandType.StoredProcedure);
                    }
                    else
                    {
                        paramCollection = new DBParameterCollection();

                        paramCollection.Add(new DBParameter("@GSTID", objGTaxRate.GSTID));
                        paramCollection.Add(new DBParameter("@wef", objGTaxRate.wef, System.Data.DbType.DateTime));
                        paramCollection.Add(new DBParameter("@CGST_Tax", objGTaxRate.CGST_Tax, System.Data.DbType.Decimal));
                        paramCollection.Add(new DBParameter("@SGST_Tax", objGTaxRate.SGST_Tax, System.Data.DbType.Decimal));
                        paramCollection.Add(new DBParameter("@Tax_Type", objGTaxRate.Tax_Type));
                        paramCollection.Add(new DBParameter("@IGST_Tax", objGTaxRate.IGST_Tax, System.Data.DbType.Decimal));
                        paramCollection.Add(new DBParameter("@Cess", objGTaxRate.Cess, System.Data.DbType.Decimal));
                        paramCollection.Add(new DBParameter("@CreatedBy", "Admin"));
                        paramCollection.Add(new DBParameter("@CreatedDate", DateTime.Now, System.Data.DbType.DateTime));
                        paramCollection.Add(new DBParameter("@ModifiedBy", "Admin"));
                        paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now, System.Data.DbType.DateTime));

                        System.Data.IDataReader drGT =
                            _dbHelper.ExecuteDataReader("spInsertGSTTaxRateDetails", _dbHelper.GetConnObject(), paramCollection, System.Data.CommandType.StoredProcedure);
                    }
                }
            }
            catch (Exception ex)
            {
                isSaved = false;
                //throw ex;
            }

            return(isSaved);
        }
示例#7
0
        public bool UpdateTaxCategory(eSunSpeedDomain.TaxCategoryModel objTaxCat)
        {
            string Query     = string.Empty;
            bool   isUpdated = true;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();

                paramCollection.Add(new DBParameter("@Name", objTaxCat.Name));
                paramCollection.Add(new DBParameter("@TaxCat_Type", objTaxCat.TaxCat_Type));
                paramCollection.Add(new DBParameter("@ServiceTax", objTaxCat.ServiceTax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@RateofTaxLocal", objTaxCat.Local_Tax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@RateofCentral", objTaxCat.CentralTax, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@TaxonMRP", objTaxCat.TaxonMRP, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculatedTaxon", objTaxCat.CalculatedTaxon, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@TaxonMRPMode", objTaxCat.TaxonMRPMode));
                paramCollection.Add(new DBParameter("@Taxation_Type", objTaxCat.Taxation_Type));
                paramCollection.Add(new DBParameter("@HSNCode", objTaxCat.HSNCode));
                paramCollection.Add(new DBParameter("@Tax_Desc", objTaxCat.Tax_Desc));
                paramCollection.Add(new DBParameter("@ModifiedBy", "Admin"));
                paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now, System.Data.DbType.DateTime));
                paramCollection.Add(new DBParameter("@Id", objTaxCat.TaxCat_Id));

                Query = "UPDATE taxcategory SET `Name`=@Name,`TaxCat_Type`=@TaxCat_Type,`Service_Tax`=@ServiceTax,`Local_Tax`=@RateofTaxLocal," +
                        "`Central_Tax`=@RateofCentral,`TaxonMRP`=@TaxonMRP,`CalculatedTaxon`=@CalculatedTaxon,`TaxonMRPMode`=@TaxonMRPMode," +
                        "`Taxation_Type`=@Taxation_Type,`HSNCode`=@HSNCode,`Tax_Desc`=@Tax_Desc,`ModifiedBy`=@ModifiedBy,`ModifiedDate`=@ModifiedDate " +
                        "WHERE TaxCat_Id=@Id;";

                if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
                {
                    List <TaxRatesModel> lstTaxRates = new List <TaxRatesModel>();

                    //UPDATE Tax Rates Table
                    foreach (TaxRatesModel objTaxRate in objTaxCat.TaxRates)
                    {
                        objTaxRate.TaxCat_Id = objTaxCat.TaxCat_Id;
                        if (objTaxRate.TaxRate_Id > 0)
                        {
                            paramCollection = new DBParameterCollection();

                            paramCollection.Add(new DBParameter("@wef", objTaxRate.wef, System.Data.DbType.DateTime));
                            paramCollection.Add(new DBParameter("@Tax_Local", objTaxRate.Local_Tax, System.Data.DbType.Decimal));
                            paramCollection.Add(new DBParameter("@Tax_Schg", objTaxRate.Local_Schg, System.Data.DbType.Decimal));
                            paramCollection.Add(new DBParameter("@Tax_Type", objTaxRate.Tax_Type));
                            paramCollection.Add(new DBParameter("@Tax_Central", objTaxRate.Tax_Central, System.Data.DbType.Decimal));
                            paramCollection.Add(new DBParameter("@Schg_Central", objTaxRate.Schg_Central, System.Data.DbType.Decimal));

                            paramCollection.Add(new DBParameter("@Entry_Tax", objTaxRate.Entry_Tax, System.Data.DbType.Decimal));
                            paramCollection.Add(new DBParameter("@Serivce_Tax", objTaxRate.Service_Tax, System.Data.DbType.Decimal));

                            paramCollection.Add(new DBParameter("@ModifiedBy", "Admin"));
                            paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now, System.Data.DbType.DateTime));

                            paramCollection.Add(new DBParameter("@TaxRate_Id", objTaxRate.TaxRate_Id));
                            paramCollection.Add(new DBParameter("@TaxCat_Id", objTaxRate.TaxCat_Id));

                            Query = "UPDATE taxrate SET `wef`=@wef,`Tax_Local`=@Tax_Local,`Tax_Schg`=@Tax_Schg,`Tax_Type`=@Tax_Type," +
                                    "`Tax_Central`=@Tax_Central,`Schg_Central`=@Schg_Central,`Entry_Tax`=@Entry_Tax,`Service_Tax`=@Serivce_Tax," +
                                    "`ModifiedBy`=@ModifiedBy,`ModifiedDate`=@ModifiedDate " +
                                    "WHERE  TaxRate_Id=@TaxRate_Id AND TaxCat_Id=@TaxCat_Id";

                            if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
                            {
                                isUpdated = true;
                            }
                        }
                        else
                        {
                            paramCollection = new DBParameterCollection();

                            paramCollection.Add(new DBParameter("@TaxCat_Id", objTaxRate.TaxCat_Id));
                            paramCollection.Add(new DBParameter("@wef", objTaxRate.wef, System.Data.DbType.DateTime));
                            paramCollection.Add(new DBParameter("@Tax_Local", objTaxRate.Local_Tax, System.Data.DbType.Decimal));
                            paramCollection.Add(new DBParameter("@Tax_Schg", objTaxRate.Local_Schg, System.Data.DbType.Decimal));
                            paramCollection.Add(new DBParameter("@Tax_Type", objTaxRate.Tax_Type));
                            paramCollection.Add(new DBParameter("@Tax_Central", objTaxRate.Tax_Central, System.Data.DbType.Decimal));
                            paramCollection.Add(new DBParameter("@Schg_Central", objTaxRate.Schg_Central, System.Data.DbType.Decimal));

                            paramCollection.Add(new DBParameter("@Entry_Tax", objTaxRate.Entry_Tax, System.Data.DbType.Decimal));
                            paramCollection.Add(new DBParameter("@Serivce_Tax", objTaxRate.Service_Tax, System.Data.DbType.Decimal));

                            paramCollection.Add(new DBParameter("@CreatedBy", "Admin"));
                            paramCollection.Add(new DBParameter("@CreatedDate", DateTime.Now, System.Data.DbType.DateTime));

                            Query = "INSERT INTO taxrate(`TaxCat_Id`,`wef`,`Tax_Local`,`Tax_Schg`,`Tax_Type`,`Tax_Central`,`Schg_Central`,`Entry_Tax`," +
                                    "`Service_Tax`,`CreatedBy`,`CreatedDate`) VALUES " +
                                    "(@TaxCat_Id,@wef,@Tax_Local,@Tax_Schg,@Tax_Type,@Tax_Central,@Schg_Central,@Entry_Tax,@Serivce_Tax,@CreatedBy,@CreatedDate)";

                            if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
                            {
                                isUpdated = true;
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                isUpdated = false;
                //throw ex;
            }

            return(isUpdated);
        }
示例#8
0
        public bool UpdateTaxCategory(eSunSpeedDomain.TaxCategoryModel objTaxCat)
        {
            string Query     = string.Empty;
            bool   isUpdated = true;

            //try
            //{
            //        DBParameterCollection paramCollection = new DBParameterCollection();

            //        paramCollection.Add(new DBParameter("@Name", objTaxCat.Name));
            //        paramCollection.Add(new DBParameter("@TaxCat_Type", objTaxCat.TaxCat_Type));
            //        paramCollection.Add(new DBParameter("@Taxation_Type", objTaxCat.Taxation_Type));
            //        paramCollection.Add(new DBParameter("@RateofTaxLocal", objTaxCat.Local_Tax));
            //        paramCollection.Add(new DBParameter("@RateofCentral", objTaxCat.CentralTax));
            //        paramCollection.Add(new DBParameter("@TaxonMRP", objTaxCat.TaxonMRP, System.Data.DbType.Boolean));
            //        paramCollection.Add(new DBParameter("@CalculatedTaxon", objTaxCat.CalculatedTaxon));

            //        paramCollection.Add(new DBParameter("@TaxonMRPMode", objTaxCat.TaxonMRPMode));
            //        paramCollection.Add(new DBParameter("@HSNCode", objTaxCat.HSNCode));
            //        paramCollection.Add(new DBParameter("@Tax_Desc", objTaxCat.Tax_Desc));

            //        paramCollection.Add(new DBParameter("@ModifiedBy", "Admin"));
            //        paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now));
            //        paramCollection.Add(new DBParameter("@Id", objTaxCat.TaxCat_Id));


            //        Query = "UPDATE TaxCategory SET [Name]=@Name,[TaxCat_Type]=@TaxCat_Type,[Taxation_Type]=@Taxation_Type,[Local_Tax]=@RateofTaxLocal," +
            //                "[CentralTax]=@RateofCentral,[TaxonMRP]=@TaxonMRP,[CalculatedTaxon]=@CalculatedTaxon,[TaxonMRPMode]=@TaxonMRPMode," +
            //                "[HSNCode]=@HSNCode,[Tax_Desc]=@Tax_Desc,[ModifiedBy]=@ModifiedBy,[ModifiedDate]=@ModifiedDate " +
            //                "WHERE TaxCat_Id=@Id;";

            //        if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
            //            isUpdated = true;
            //    }
            //    catch (Exception ex)
            //    {
            //        isUpdated = false;
            //        throw ex;
            //    }

            //    return isUpdated;
            //}

            //public List<TaxCategoryModel> GetAllTaxCategories()
            //{
            //    List<TaxCategoryModel> lstTaxCategories = new List<TaxCategoryModel>();
            //    TaxCategoryModel objTax;

            //    string Query = "SELECT * FROM TaxCategory";
            //    System.Data.IDataReader dr = _dbHelper.ExecuteDataReader(Query, _dbHelper.GetConnObject());

            //    while (dr.Read())
            //    {
            //        objTax = new  TaxCategoryModel();

            //        objTax.TaxCat_Id = DataFormat.GetInteger(dr["TaxCat_Id"]);

            //        objTax.Name =  dr["Name"].ToString();
            //        objTax.CentralTax = Convert.ToDecimal(dr["CentralTax"]);
            //        objTax.Local_Tax = Convert.ToDecimal(dr["Local_Tax"]);
            //        objTax.Tax_Desc = dr["Tax_Desc"].ToString();
            //        objTax.Taxation_Type = dr["Taxation_Type"].ToString();
            //        objTax.TaxCat_Type = dr["TaxCat_Type"].ToString();
            //        objTax.TaxonMRP = Convert.ToBoolean(dr["TaxonMRP"]);
            //        objTax.TaxonMRPMode = dr["TaxonMRPMode"].ToString();

            //        objTax.HSNCode = dr["HSNCode"].ToString();
            //        objTax.CalculatedTaxon = Convert.ToDecimal(dr["CalculatedTaxon"]);

            //        lstTaxCategories.Add(objTax);

            //    }
            //    return lstTaxCategories;
            //}
            //public bool DeleteTaxCategory(List<int> TaxCategoryid)
            //{
            //    string Query = string.Empty;
            //    bool isUpdated = true;

            //    try
            //    {
            //        DBParameterCollection paramCollection;

            //        foreach (int taxid in TaxCategoryid)
            //        {
            //            paramCollection = new DBParameterCollection();

            //            paramCollection.Add(new DBParameter("@Tax_id", taxid));
            //            Query = "Delete from TaxCategory WHERE [TaxCat_Id]=@Tax_id";

            //            if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
            //                isUpdated = true;
            //        }

            //    }
            //    catch (Exception ex)
            //    {
            //        isUpdated = false;
            //        throw ex;
            //    }

            return(isUpdated);
        }