Beispiel #1
0
        //update
        public bool UpdateStype(eSunSpeedDomain.SaleTypeModel objStype)
        {
            string Query    = string.Empty;
            bool   isUpdate = true;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();

                paramCollection.Add(new DBParameter("@SalesType", objStype.SalesType));
                paramCollection.Add(new DBParameter("@typeSpecifyHereSingleAccount", objStype.typeSpecifyHereSingleAccount));
                paramCollection.Add(new DBParameter("@LedgerAccountBox", objStype.LedgerAccountBox));
                paramCollection.Add(new DBParameter("@typeDifferentTaxRate", objStype.typeDifferentTaxRate, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeSpecifyINVoucher", objStype.typeSpecifyINVoucher, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeTaxable", objStype.typeTaxable, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeMultiTax", objStype.typeMultiTax, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeAgainstSTFrom", objStype.typeAgainstSTFrom, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeTaxpaid", objStype.typeTaxpaid, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeExempt", objStype.typeExempt, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeTaxFree", objStype.typeTaxFree, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeLUMSumDealer", objStype.typeLUMSumDealer, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeUnRegDealer", objStype.typeUnRegDealer, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TaxInvoice", objStype.TaxInvoice, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@VatReturnCategory", objStype.VatReturnCategory));
                paramCollection.Add(new DBParameter("@VatSaleTaxReport", objStype.VatSaleTaxReport, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculateTaxonItemMRP", objStype.CalculateTaxonItemMRP, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TaxInclusiveItemPrice", objStype.TaxInclusiveItemPrice, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculateTaxonpercentofAmount", objStype.CalculateTaxonpercentofAmount));
                paramCollection.Add(new DBParameter("@AdjustTaxinSaleAccount", objStype.AdjustTaxinSaleAccount, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TaxAccount", objStype.TaxAccount));
                paramCollection.Add(new DBParameter("@TypeLocal", objStype.TypeLocal, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TypeCentral", objStype.TypeCentral, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TypeStockTransfer", objStype.TypeStockTransfer, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TypeOther", objStype.TypeOther, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@ExportNormal", objStype.ExportNormal, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@SaleinTransit", objStype.SaleinTransit, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@ExportHighsea", objStype.ExportHighsea, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@IssueSTFrom", objStype.IssueSTFrom, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@FromIssuable", objStype.FromIssuable));
                paramCollection.Add(new DBParameter("@ReceiveSTForm", objStype.ReceiveSTForm, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@ST_ID", objStype.Sale_Id));
                Query = "UPDATE SaleType SET [SalesType]=@SalesType,[typeSpecifyHereSingleAccount]=@typeSpecifyHereSingleAccount,[LedgerAccountBox]=@LedgerAccountBox,[typeDifferentTaxRate]=@typeDifferentTaxRate,[typeSpecifyINVoucher]=@typeSpecifyINVoucher,[typeTaxable]=@typeTaxable," +
                        "[tyypeMultiTax]=@typeMultiTax,[typeAgainstSTFrom]=@typeAgainstSTFrom,[typeTaxpaid]=@typeTaxpaid,[typeExempt]=@typeExempt," +
                        "[typeTaxFree]=@typeTaxFree,[typeLUMSumDealer]=@typeLUMSumDealer,[typeUnRegDealer]=@typeUnRegDealer,[TaxInvoice]=@TaxInvoice,[VatReturnCategory]=@VatReturnCategory,[VatSaleTaxReport]=@VatSaleTaxReport,[CalculateTaxonItemMRP]=@CalculateTaxonItemMRP,[TaxInclusiveItemPrice]=@TaxInclusiveItemPrice,[CalculateTaxonpercentofAmount]=@CalculateTaxonpercentofAmount,[AdjustTaxinSaleAccount]=@AdjustTaxinSaleAccount,[TaxAccount]=@TaxAccount,[TypeLocal]=@TypeLocal," +
                        "[TypeCentral]=@TypeCentral,[TypeStockTransfer]=@TypeStockTransfer,[TypeOther]=@TypeOther,[ExportNormal]=@ExportNormal,[SaleinTransit]=@SaleinTransit," +
                        "[ExportHighsea]=@ExportHighsea,[IssueSTFrom]=@IssueSTFrom,[FromIssuable]=@FromIssuable,[ReceiveSTForm]=@ReceiveSTForm " +
                        "WHERE [Id]=@ST_ID";
                if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
                {
                    isUpdate = true;
                }
            }
            catch (Exception ex)
            {
                isUpdate = false;
                throw ex;
            }

            return(isUpdate);
        }
Beispiel #2
0
        //update Sale Type Master
        public bool UpdateSalestype(eSunSpeedDomain.SaleTypeModel objStype)
        {
            string Query    = string.Empty;
            bool   isUpdate = true;

            try
            {
                DBParameterCollection paramCollection = new DBParameterCollection();
                paramCollection.Add(new DBParameter("@SalesType", objStype.SalesType));
                paramCollection.Add(new DBParameter("@typeSpecifyHereSingleAccount", objStype.typeSpecifyHereSingleAccount, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@LedgerAccountBox", objStype.LedgerAccountBox));
                paramCollection.Add(new DBParameter("@typeDifferentTaxRate", objStype.typeDifferentTaxRate, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeSpecifyINVoucher", objStype.typeSpecifyINVoucher, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeTaxable", objStype.typeTaxable, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@tyypeMultiTax", objStype.typeMultiTax, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeAgainstSTFrom", objStype.typeAgainstSTFrom, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeTaxpaid", objStype.typeTaxpaid, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeExempt", objStype.typeExempt, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeTaxFree", objStype.typeTaxFree, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeLUMSumDealer", objStype.typeLUMSumDealer, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@typeUnRegDealer", objStype.typeUnRegDealer, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TaxInvoice", objStype.TaxInvoice, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@VatReturnCategory", objStype.VatReturnCategory));
                paramCollection.Add(new DBParameter("@VatSaleTaxReport", objStype.VatSaleTaxReport, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculateTaxonItemMRP", objStype.CalculateTaxonItemMRP, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TaxInclusiveItemPrice", objStype.TaxInclusiveItemPrice, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@CalculateTaxonpercentofAmount", objStype.CalculatedTax));
                paramCollection.Add(new DBParameter("@AdjustTaxinSaleAccount", objStype.AdjustTaxinSaleAccount, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TaxAccount", objStype.TaxAccount));
                paramCollection.Add(new DBParameter("@SkipVatorSaleTaxReport", objStype.SkipVatorSaleTaxReport, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TypeLocal", objStype.TypeLocal, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TypeCentral", objStype.TypeCentral, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TypeStockTransfer", objStype.TypeStockTransfer, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TypeOther", objStype.TypeOther, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@ExportNormal", objStype.ExportNormal, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@SaleinTransit", objStype.SaleinTransit, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@ExportHighsea", objStype.ExportHighsea, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@SingleTaxRate", objStype.SingleTaxRate, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@MultiTaxRate", objStype.MultiTaxRate, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@TaxinPercentage", objStype.TaxinPercentage, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@SurchargeInPercentage", objStype.SurchargeInPercentage, System.Data.DbType.Decimal));
                paramCollection.Add(new DBParameter("@freezeTaxinSales", objStype.freezeTaxinSales, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@freezeTaxinSalesReturn", objStype.freezeTaxinSalesReturn, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@IssueSTFrom", objStype.IssueSTFrom, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@FromIssuable", objStype.FromIssuable));
                paramCollection.Add(new DBParameter("@ReceiveSTForm", objStype.ReceiveSTForm, System.Data.DbType.Boolean));
                paramCollection.Add(new DBParameter("@FormReceivable", objStype.FromReceivable));
                paramCollection.Add(new DBParameter("@InvoiceHeading", objStype.InvoiceHeading));
                paramCollection.Add(new DBParameter("@InvoiceDescription", objStype.InvoiceDescription));
                paramCollection.Add(new DBParameter("@CreatedBy", "Admin"));
                paramCollection.Add(new DBParameter("@CreatedDate", DateTime.Now, System.Data.DbType.DateTime));
                paramCollection.Add(new DBParameter("@ModifiedBy", ""));
                paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now, System.Data.DbType.DateTime));
                paramCollection.Add(new DBParameter("@SalesTypeId", objStype.Sale_Id));

                System.Data.IDataReader dr =
                    _dbHelper.ExecuteDataReader("spUpdateSaleTypeMaster", _dbHelper.GetConnObject(), paramCollection, System.Data.CommandType.StoredProcedure);
                isUpdate = true;
            }
            catch (Exception ex)
            {
                isUpdate = false;
                throw ex;
            }

            return(isUpdate);
        }