当前位置: 首页>>代码示例>>C#>>正文


C# LumexDBPlayer.ClearParameters方法代码示例

本文整理汇总了C#中LumexDBPlayer.ClearParameters方法的典型用法代码示例。如果您正苦于以下问题:C# LumexDBPlayer.ClearParameters方法的具体用法?C# LumexDBPlayer.ClearParameters怎么用?C# LumexDBPlayer.ClearParameters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LumexDBPlayer的用法示例。


在下文中一共展示了LumexDBPlayer.ClearParameters方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SaveJournalVoucher

        public DataTable SaveJournalVoucher(string SalesCenter,DataTable dtJournalList, LumexDBPlayer db)
        {
            try
            {
                decimal amt = -1;
                int transactionNo = 0;

                db.AddParameters("@Flag", "JV");
                DataTable dtJournalNumber = db.ExecuteDataTable("GET_AND_UPDATE_AUTO_SERIAL_NUMBER_BY_FLAG", true);

                string journalNumber = dtJournalNumber.Rows[0][0].ToString();

                for (int i = 0; i < dtJournalList.Rows.Count; i++)
                {
                    db.ClearParameters();
                    db.AddParameters("@JournalNumber", journalNumber.Trim());
                    db.AddParameters("@TransactionNumber", dtJournalList.Rows[i]["SN"].ToString());
                    db.AddParameters("@ManualVoucherNumber", dtJournalList.Rows[i]["VoucherNumber"].ToString());
                    db.AddParameters("@AccountId", dtJournalList.Rows[i]["AccountHead"].ToString());
                    db.AddParameters("@DebitCredit", dtJournalList.Rows[i]["DebitCredit"].ToString());
                    db.AddParameters("@Amount", dtJournalList.Rows[i]["Amount"].ToString());
                    db.AddParameters("@Bank", dtJournalList.Rows[i]["Bank"].ToString());
                    db.AddParameters("@BankBranch", dtJournalList.Rows[i]["BankBranch"].ToString());
                    db.AddParameters("@ChequeNumber", dtJournalList.Rows[i]["ChequeNumber"].ToString());
                    db.AddParameters("@ChequeDate", dtJournalList.Rows[i]["ChequeDate"].ToString());
                    db.AddParameters("@PayToFromCompany", dtJournalList.Rows[i]["PayToFromCompany"].ToString());
                    db.AddParameters("@Narration", dtJournalList.Rows[i]["Narration"].ToString());
                    db.AddParameters("@OfficeBranchId", SalesCenter);
                    db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                    db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                    DataTable dt = db.ExecuteDataTable("INSERT_JOURNAL_VOUCHER", true);

                    if (amt < decimal.Parse(dtJournalList.Rows[i]["Amount"].ToString()))
                    {
                        amt = decimal.Parse(dtJournalList.Rows[i]["Amount"].ToString());
                        transactionNo = int.Parse(dtJournalList.Rows[i]["SN"].ToString());
                    }
                }

                db.ClearParameters();
                db.AddParameters("@JournalNumber", journalNumber.Trim());
                db.AddParameters("@TransactionNumber", transactionNo);
                db.ExecuteNonQuery("INSERT_JOURNAL_VOUCHER_INTO_GENERAL_LEDGER_APPROVAL_BY_JOURNAL", true);

                return dtJournalNumber;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                dtJournalList = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:56,代码来源:JournalVoucherDAL.cs

示例2: SaveProductTransferRecord

        public string SaveProductTransferRecord(ProductTransferRecordBLL productTransferRecord, DataTable dtPrdList, LumexDBPlayer db)
        {
            string transferRecordId = "";

            try
            {
                db.AddParameters("@TransferOrderId", productTransferRecord.TransferOrderId.Trim());
                db.AddParameters("@TransferFrom", productTransferRecord.TransferFrom.Trim());
                db.AddParameters("@TransferTo", productTransferRecord.TransferTo.Trim());
                db.AddParameters("@TransferType", productTransferRecord.TransferType.Trim());
                db.AddParameters("@Description", productTransferRecord.Description.Trim());
                db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                DataTable dt = db.ExecuteDataTable("INSERT_PRODUCT_TRANSFER_RECORD", true);

                if (dt.Rows.Count > 0)
                {
                    transferRecordId = dt.Rows[0][0].ToString();
                }

                for (int i = 0; i < dtPrdList.Rows.Count; i++)
                {
                    db.ClearParameters();
                    db.AddParameters("@TransferRecordId", transferRecordId.Trim());
                    db.AddParameters("@ProductId", dtPrdList.Rows[i]["ProductId"].ToString());
                    db.AddParameters("@ReceivedQuantity", dtPrdList.Rows[i]["ReceivedQuantity"].ToString());
                    db.AddParameters("@DisappearedQuantity", dtPrdList.Rows[i]["DisappearedQuantity"].ToString());
                    db.AddParameters("@Status", dtPrdList.Rows[i]["Status"].ToString());
                    db.AddParameters("@Narration", dtPrdList.Rows[i]["Narration"].ToString());

                    db.ExecuteNonQuery("INSERT_PRODUCT_TRANSFER_RECORD_PRODUCT", true);
                }

                db.ClearParameters();
                db.AddParameters("@TransferOrderId", productTransferRecord.TransferOrderId.Trim());
                db.AddParameters("@Status", productTransferRecord.Status.Trim());
                db.AddParameters("@CanceledBy", "");
                db.AddParameters("@CanceledFrom", "");

                db.ExecuteNonQuery("UPDATE_PRODUCT_TRANSFER_ORDER_STATUS_BY_ID", true);

                return transferRecordId;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                productTransferRecord = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:53,代码来源:ProductTransferRecordDAL.cs

示例3: SaveProductRequisition

        public string SaveProductRequisition(List<ProductRequisitionBLL> productRequisitions, string salesCenterId,string warehouseId,string requisationType, string narration, LumexDBPlayer db)
        {
            string productRequisitionId = string.Empty;

            try
            {
                db.ClearParameters();
                db.AddParameters("@SalesCenterId", salesCenterId.Trim());
                db.AddParameters("@WarehouseId", warehouseId.Trim());
                db.AddParameters("@RequisationType", requisationType.Trim());
                db.AddParameters("@Narration", narration.Trim());
                db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                DataTable dt = db.ExecuteDataTable("INSERT_PRODUCT_REQUISITION", true);

                if (dt.Rows.Count > 0)
                {
                    productRequisitionId = dt.Rows[0][0].ToString();

                    for (int i = 0; i < productRequisitions.Count; i++)
                    {
                        db.ClearParameters();
                        db.AddParameters("@ProductRequisitionId", productRequisitionId.Trim());
                        db.AddParameters("@ProductId", productRequisitions[i].ProductId.Trim());
                        db.AddParameters("@RequisitionQuantity", productRequisitions[i].RequisitionQuantity.Trim());
                        db.AddParameters("@RequiredDate", productRequisitions[i].RequiredDate.Trim());
                        db.AddParameters("@Narration", productRequisitions[i].ProductNarration.Trim());

                        db.ExecuteNonQuery("INSERT_PRODUCT_REQUISITION_PRODUCT", true);
                    }
                }
                else
                {
                   // db.ExecuteDataTable("there_is_no_procedure_to_execute", false);
                }

                return productRequisitionId;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                productRequisitions = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:48,代码来源:ProductRequisitionDAL.cs

示例4: SaveProductVendorsByProductId

        public void SaveProductVendorsByProductId(string productId, List<string> vendors, LumexDBPlayer db)
        {
            try
            {
                db.AddParameters("@ProductId", productId);
                db.ExecuteNonQuery("DELETE_PRODUCT_VENDORS_BY_PRODUCT_ID", true);

                for (int i = 0; i < vendors.Count; i++)
                {
                    db.ClearParameters();
                    db.AddParameters("@ProductId", productId);
                    db.AddParameters("@VendorId", vendors[i].ToString());
                    db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                    db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                    db.ExecuteDataTable("INSERT_PRODUCT_VENDORS_BY_PRODUCT_ID", true);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                vendors = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:27,代码来源:VendorDAL.cs

示例5: SaveUserSalesCentersByUserId

        public void SaveUserSalesCentersByUserId(string userId, List<string> salesCenters, LumexDBPlayer db)
        {
            try
            {
                db.AddParameters("@UserId", userId);
                db.ExecuteNonQuery("DELETE_USER_SALES_CENTERS_BY_USER_ID", true);

                for (int i = 0; i < salesCenters.Count; i++)
                {
                    db.ClearParameters();
                    db.AddParameters("@UserId", userId);
                    db.AddParameters("@SalesCenterId", salesCenters[i].ToString());
                    db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                    db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                    db.ExecuteDataTable("INSERT_USER_SALES_CENTERS_BY_USER_ID", true);
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                salesCenters = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:27,代码来源:SalesCenterDAL.cs

示例6: SavePurchaseOrder

        public string SavePurchaseOrder(List<PurchaseOrderBLL> purchaseOrders, string warehouseId, string narration, LumexDBPlayer db)
        {
            string purchaseOrderId = string.Empty;

            try
            {
                db.ClearParameters();
                //db.AddParameters("@WarehouseId", warehouseId.Trim());
                //db.AddParameters("@Narration", narration.Trim());
                //db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                //db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                DataTable dt = db.ExecuteDataTable("", true);

                if (dt.Rows.Count > 0)
                {
                    purchaseOrderId = dt.Rows[0][0].ToString();

                    for (int i = 0; i < purchaseOrders.Count; i++)
                    {
                        db.ClearParameters();
                        //db.AddParameters("@PurchaseOrderId", purchaseOrderId.Trim());
                        //db.AddParameters("@ProductId", purchaseOrders[i].ProductId.Trim());
                        //db.AddParameters("@OrderQuantity", purchaseOrders[i].OrderQuantity.Trim());
                        //db.AddParameters("@RequiredDate", purchaseOrders[i].RequiredDate.Trim());
                        //db.AddParameters("@Narration", purchaseOrders[i].ProductNarration.Trim());

                        db.ExecuteNonQuery("", true);
                    }
                }
                else
                {
                    db.ExecuteDataTable("there_is_no_procedure_to_execute", false);
                }

                return purchaseOrderId;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                purchaseOrders = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:46,代码来源:PurchaseOrderDAL.cs

示例7: SaveProductionDetails

        public bool SaveProductionDetails(LumexDBPlayer db,newproductionBLL newProduction,DataTable dtRawmetarial)
        {
            DataTable dt = new DataTable();
            bool st = false;
            try
            {
                db.AddParameters("@ProductionId", newProduction.productionId);
                db.AddParameters("@WarehouseId", newProduction.wareHouseID);
                db.AddParameters("@ProductId", newProduction.productID);
                db.AddParameters("@ProduceWight", newProduction.produceWeight);
                db.AddParameters("@ProduceBundle", newProduction.produceBundle);
                db.AddParameters("@ProduceDate", newProduction.produceDate);
                db.AddParameters("@UnitCost", newProduction.unitCost);
                db.AddParameters("@ProductionCost", newProduction.productionCost);
                db.AddParameters("@TotalQualnity", newProduction.totalQuantity);
                db.AddParameters("@RawMaterialCost", newProduction.rawMetarialCost);
                db.AddParameters("@OtherAmount",newProduction.otherAmmount);
                db.AddParameters("@WorkingCost",newProduction.workingCost);
                db.AddParameters("@DecreaseWeight", newProduction.decreaseWeight);
                db.AddParameters("@DecreaseRate", newProduction.decreaseRate);
                db.AddParameters("@DescripTions", newProduction.description);
                db.AddParameters("@CreatedBy", newProduction.createdBy);
                db.AddParameters("@CreatedDate", newProduction.createdDate);
                db.AddParameters("@ForStock",Convert.ToDecimal(newProduction.forStock));

                dt = db.ExecuteDataTable("INSERT_PRODUCTION", true);

                for (int i = 0; i < dtRawmetarial.Rows.Count; i++)
                {
                    db.ClearParameters();
                    db.AddParameters("@ProductionId", newProduction.productionId);
                    db.AddParameters("@ProductId", dtRawmetarial.Rows[i]["productId"].ToString().Trim());
                    db.AddParameters("@ProductQuantity", dtRawmetarial.Rows[i]["quantity"].ToString().Trim());
                    //db.AddParameters("@ProductRate", dtRawmetarial.Rows[i]["rate"].ToString().Trim());
                    //db.AddParameters("@TotalCost", dtRawmetarial.Rows[i]["cost"].ToString().Trim());

                    db.ExecuteNonQuery("INSERT_PRODUCTION_RAW", true);
                }


                st = true;
            }
            catch (Exception)
            {
                throw;
            }
            return st;
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:48,代码来源:newproductionDAL.cs

示例8: UpdateProductPriceList

        public void UpdateProductPriceList(List<ProductPriceBLL> productPrices, LumexDBPlayer db)
        {
            try
            {
                for (int i = 0; i < productPrices.Count; i++)
                {
                    db.ClearParameters();
                    db.AddParameters("@ProductId", productPrices[i].ProductId.Trim());
                    db.AddParameters("@RatePerUnit", productPrices[i].RatePerUnit);
                    db.AddParameters("@NewUnitPrice", productPrices[i].NewUnitPrice);
                    db.AddParameters("@VATPercentage", productPrices[i].VATPercentage);
                    db.AddParameters("@ModifiedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                    db.AddParameters("@ModifiedFrom", LumexLibraryManager.GetTerminal());

                    DataTable dt = db.ExecuteDataTable("UPDATE_PRODUCT_PRICE_BY_ID", true);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:22,代码来源:ProductPriceDAL.cs

示例9: SaveWarehouseDamageProduct

        public string SaveWarehouseDamageProduct(SalesOrderBLL salesOrder, DataTable dtPrdList, LumexDBPlayer db)
        {
            string damageRecordId = "";

            try
            {
                db.AddParameters("@WarehouseId", salesOrder.SalesCenterId.Trim());
                db.AddParameters("@TotalAmount", salesOrder.TotalAmount.Trim());
                db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                DataTable dt = db.ExecuteDataTable("INSERT_WAREHOUSE_PRODUCT_DAMAGE_RECORD", true);

                if (dt.Rows.Count > 0)
                {
                    damageRecordId = dt.Rows[0][0].ToString();
                }

                for (int i = 0; i < dtPrdList.Rows.Count; i++)
                {
                    db.ClearParameters();
                    db.AddParameters("@WarehouseId", salesOrder.SalesCenterId.Trim());
                    db.AddParameters("@DamageRecordId", damageRecordId.Trim());
                    db.AddParameters("@ProductId", dtPrdList.Rows[i]["ProductId"].ToString());
                    db.AddParameters("@RatePerUnit", dtPrdList.Rows[i]["RatePerUnit"].ToString());
                    db.AddParameters("@Quantity", dtPrdList.Rows[i]["Quantity"].ToString());
                    db.AddParameters("@Amount", dtPrdList.Rows[i]["Amount"].ToString());

                    db.ExecuteNonQuery("INSERT_WAREHOUSE_PRODUCT_DAMAGE_RECORD_PRODUCT", true);
                }

                db.ClearParameters();
                db.AddParameters("@DamageRecordId", damageRecordId.Trim());
                db.AddParameters("@WarehouseId", salesOrder.SalesCenterId.Trim());
                db.AddParameters("@ModifiedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                db.AddParameters("@ModifiedFrom", LumexLibraryManager.GetTerminal());

                db.ExecuteNonQuery("UPDATE_WAREHOUSE_PRODUCT_STOCK_FOR_DAMAGE_RECORD", true);

                db.ClearParameters();
                db.AddParameters("@DamageRecordId", damageRecordId.Trim());
                db.AddParameters("@WarehouseId", salesOrder.SalesCenterId.Trim());
                db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                db.ExecuteNonQuery("INSERT_WAREHOUSE_PRODUCT_DAMAGE_LEDGER_TRANSACTION", true);

                return damageRecordId;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                salesOrder = null;
                dtPrdList = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:59,代码来源:SalesOrderDAL.cs

示例10: SaveUserPrivilegeMenu

        public void SaveUserPrivilegeMenu(string userId, string menuForApp, string menuType, string menuGroupId, List<string> userPrivilegeMenus, LumexDBPlayer db)
        {
            try
            {
                db.AddParameters("@UserId", userId);
                db.AddParameters("@MenuForApp", menuForApp);
                db.AddParameters("@MenuType", menuType);
                db.AddParameters("@MenuGroupId", menuGroupId);

                db.ExecuteNonQuery("DELETE_USER_PRIVILEGE_MENU", true);

                for (int i = 0; i < userPrivilegeMenus.Count; i++)
                {
                    db.ClearParameters();
                    db.AddParameters("@UserId", userId);
                    db.AddParameters("@MenuId", userPrivilegeMenus[i].ToString());

                    db.ExecuteNonQuery("INSERT_USER_PRIVILEGE_MENU", true);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:25,代码来源:AppMenuDAL.cs

示例11: UpdateMenuSorting

        public void UpdateMenuSorting(ListBox groupWiseUserMenuListListBox, string parentMenuId, LumexDBPlayer db)
        {
            try
            {
                for (int i = 0; i < groupWiseUserMenuListListBox.Items.Count; i++)
                {
                    db.ClearParameters();
                    db.AddParameters("@MenuId", groupWiseUserMenuListListBox.Items[i].Value.Trim());
                    db.AddParameters("@MenuSorting", parentMenuId + "0" + (i + 1).ToString());

                    db.ExecuteNonQuery("UPDATE_MENU_SORTING_BY_MENU_ID", true);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:18,代码来源:AppMenuDAL.cs

示例12: UpdateUserVarificationCode

        public DataTable UpdateUserVarificationCode(UserBLL userBLL, LumexDBPlayer db)
        {
            bool status = false;

            try
            {
                db.ClearParameters();
                db.AddParameters("@UserId", userBLL.UserId);
                db.AddParameters("@VarifyCode", userBLL.varifycode);
                db.AddParameters("@ActivatedBy", "");
                db.AddParameters("@ActivatedFrom", LumexLibraryManager.GetTerminal());

                DataTable dt = db.ExecuteDataTable("[UPDATE_USER_VARIFICATION_CODE]", true);
                return dt;
            }
            catch (Exception)
            {
                throw;
            }
        }
开发者ID:atiburrahman09,项目名称:globalfxusa,代码行数:20,代码来源:UserDAL.cs

示例13: UpdateMenu

        public void UpdateMenu(AppMenuBLL appMenu, LumexDBPlayer db)
        {
            try
            {
                db.AddParameters("@MenuId", appMenu.MenuId.Trim());
                db.AddParameters("@MenuName", appMenu.MenuName.Trim());
                db.AddParameters("@DisplayName", appMenu.DisplayName.Trim());
                db.AddParameters("@MenuTarget", appMenu.MenuTarget.Trim());
                db.AddParameters("@ImageUrl", appMenu.ImageUrl.Trim());
                db.AddParameters("@ToolTipDescription", appMenu.ToolTipDescription.Trim());
                db.AddParameters("@ParentMenuId", appMenu.ParentMenuId.Trim());
                db.AddParameters("@URL", appMenu.URL.Trim());
                db.AddParameters("@MenuGroupId", appMenu.MenuGroupId.Trim());
                db.AddParameters("@MenuType", appMenu.MenuType.Trim());
                db.AddParameters("@MenuForApp", appMenu.MenuForApp.Trim());
                db.AddParameters("@MenuLevel", appMenu.MenuLevel.Trim());
                db.AddParameters("@IsDefault", appMenu.IsDefault.Trim());
                db.AddParameters("@IsDisplay", appMenu.IsDisplay.Trim());
                db.AddParameters("@IsSubParent", appMenu.IsSubParent.Trim());

                DataTable dtMGL = db.ExecuteDataTable("UPDATE_MENU_BY_ID", true);

                if (dtMGL.Rows.Count > 0 && dtMGL.Rows[0][0].ToString() != "Done")
                {
                    DataTable dt = new DataTable();
                    DataRow dr = null;

                    for (int i = 0; i < dtMGL.Rows.Count; i++)
                    {
                        dt = null;

                        db.ClearParameters();
                        db.AddParameters("@MenuId", dtMGL.Rows[i]["MenuId"].ToString());
                        dt = db.ExecuteDataTable("GET_CHILD_MENUS_BY_MENU_ID", true);

                        if (dt.Rows.Count > 0)
                        {
                            for (int j = 0; j < dt.Rows.Count; j++)
                            {
                                dr = dtMGL.NewRow();
                                dr["MenuId"] = dt.Rows[j]["MenuId"].ToString();
                                dr["MenuLevel"] = (int.Parse(dtMGL.Rows[i]["MenuLevel"].ToString()) + 1).ToString();
                                dr["MenuGroupId"] = dtMGL.Rows[i]["MenuGroupId"].ToString();
                                dtMGL.Rows.Add(dr);
                            }
                        }
                    }

                    for (int i = 0; i < dtMGL.Rows.Count; i++)
                    {
                        db.ClearParameters();
                        db.AddParameters("@MenuId", dtMGL.Rows[i]["MenuId"].ToString());
                        db.AddParameters("@MenuLevel", dtMGL.Rows[i]["MenuLevel"].ToString());
                        db.AddParameters("@MenuGroupId", dtMGL.Rows[i]["MenuGroupId"].ToString());

                        dt = db.ExecuteDataTable("UPDATE_CHILD_MENUS_GROUP_AND_LEVEL_BY_MENU_ID", true);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                appMenu = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:68,代码来源:AppMenuDAL.cs

示例14: SaveSalesOrder

        public string SaveSalesOrder(SalesOrderBLL salesOrder, DataTable dtPrdList, LumexDBPlayer db)
        {
            string salesOrderId = "";

            try
            {
                db.AddParameters("@CustomerId", salesOrder.CustomerId.Trim());
                db.AddParameters("@CustomerName", salesOrder.CustomerName.Trim());
                db.AddParameters("@CustomerContactNumber", salesOrder.CustomerContactNumber.Trim());
                db.AddParameters("@CustomerAddress", salesOrder.CustomerAddress.Trim());
                db.AddParameters("@SalesCenterId", salesOrder.SalesCenterId.Trim());
                db.AddParameters("@SalesPersonId", salesOrder.SalesPersonId.Trim());
                db.AddParameters("@TotalAmount", salesOrder.TotalAmount.Trim());
                db.AddParameters("@VAT", salesOrder.VAT.Trim());
                db.AddParameters("@DiscountAmount", salesOrder.DiscountAmount.Trim());
                db.AddParameters("@TotalVATAmount", salesOrder.TotalVATAmount.Trim());
                db.AddParameters("@TotalReceivable", salesOrder.TotalReceivable.Trim());
                db.AddParameters("@ReceivedAmount", salesOrder.ReceivedAmount.Trim());
                db.AddParameters("@ChangeAmount", salesOrder.ChangeAmount);
                db.AddParameters("@DeliveryDate", salesOrder.DeliveryDate.Trim());
                db.AddParameters("@Narration", salesOrder.Narration.Trim());
                db.AddParameters("@TransportType", salesOrder.TransportType.Trim());
                db.AddParameters("@AccountId", salesOrder.AccountId);
                db.AddParameters("@PaymentMode", salesOrder.PaymentMode.Trim());
                db.AddParameters("@Bank", salesOrder.Bank.Trim());
                db.AddParameters("@BankBranch", salesOrder.BankBranch.Trim());
                db.AddParameters("@ChequeNumber", salesOrder.ChequeNumber.Trim());
                db.AddParameters("@ChequeDate", salesOrder.ChequeDate.Trim());
                db.AddParameters("@LCNumber", salesOrder.LCNumber.Trim());
                db.AddParameters("@ShippingAddress", salesOrder.ShippingAddress.Trim());
                db.AddParameters("@BillingAddress", salesOrder.BillingAddress.Trim());
                db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                DataTable dt = db.ExecuteDataTable("INSERT_SALES_ORDER", true);

                if (dt.Rows.Count > 0)
                {
                    salesOrderId = dt.Rows[0][0].ToString();
                }

                for (int i = 0; i < dtPrdList.Rows.Count; i++)
                {
                    db.ClearParameters();
                    if (dtPrdList.Rows[i]["Quantity"].ToString() == "" || dtPrdList.Rows[i]["Amount"].ToString() == "" || dtPrdList.Rows[i]["Available"].ToString() == "" || dtPrdList.Rows[i]["RatePerUnit"].ToString() == "")
                    {
                        if (dtPrdList.Rows[i]["Quantity"].ToString() == "")
                        {
                            dtPrdList.Rows[i]["Quantity"] = 0;
                        }
                        if (dtPrdList.Rows[i]["Amount"].ToString() == "")
                        {
                            dtPrdList.Rows[i]["Amount"] = 0;
                        }
                        if (dtPrdList.Rows[i]["Available"].ToString() == "")
                        {
                            dtPrdList.Rows[i]["Available"] = 0;
                        }
                        if (dtPrdList.Rows[i]["RatePerUnit"].ToString() == "")
                        {
                            dtPrdList.Rows[i]["RatePerUnit"] = 0;
                        }
                        if (dtPrdList.Rows[i]["VATPercentage"].ToString() == "")
                        {
                            dtPrdList.Rows[i]["VATPercentage"] = 0;
                        }
                    }
                    db.AddParameters("@SalesOrderId", salesOrderId.Trim());
                    db.AddParameters("@ProductId", dtPrdList.Rows[i]["ProductId"].ToString());
                    db.AddParameters("@RatePerUnit", dtPrdList.Rows[i]["RatePerUnit"].ToString());
                    db.AddParameters("@ProductVat", dtPrdList.Rows[i]["VATPercentage"].ToString());
                    db.AddParameters("@Quantity", dtPrdList.Rows[i]["Quantity"].ToString());
                    db.AddParameters("@Amount", dtPrdList.Rows[i]["Amount"].ToString());
                    db.AddParameters("@FreeQuantityWas", dtPrdList.Rows[i]["Available"].ToString());
                    db.AddParameters("@Narration", "");

                    db.ExecuteNonQuery("INSERT_SALES_ORDER_PRODUCT", true);
                }

                //db.ClearParameters();
                //db.AddParameters("@SalesOrderId", salesOrderId.Trim());
                //db.AddParameters("@SalesCenterId", salesOrder.SalesCenterId.Trim());
                //db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                //db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                //db.ExecuteNonQuery("UPDATE_PRODUCT_STOCK_TO_CREATE_SALES_ORDER", true);

                return salesOrderId;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                salesOrder = null;
                dtPrdList = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:99,代码来源:SalesOrderDAL.cs

示例15: UpdateRetailSales

        internal string UpdateRetailSales(SalesOrderBLL salesOrder, DataTable dtPrdList, LumexDBPlayer db)
        {
            string salesRecordId = "";

            try
            {

                db.AddParameters("@TotalAmount", salesOrder.TotalAmount.Trim());
                db.AddParameters("@DiscountAmount", salesOrder.DiscountAmount.Trim());
                db.AddParameters("@VAT", salesOrder.VAT.Trim());
                db.AddParameters("@TotalReceivable", salesOrder.TotalReceivable.Trim());
                db.AddParameters("@ReceivedAmount", salesOrder.ReceivedAmount.Trim());
                db.AddParameters("@ChangeAmount", salesOrder.ChangeAmount.Trim());
                db.AddParameters("@SalesRecordId", salesOrder.SalesRecordId.Trim());
                db.AddParameters("@OthersAmount", salesOrder.OthersAmount.Trim());
                db.AddParameters("@OthersDes", salesOrder.OthersDes.Trim());
                db.AddParameters("@Narration", salesOrder.Narration.Trim());

                DataTable dt = db.ExecuteDataTable("[UPDATE_RETAIL_SALES_RECORD_BY_RECORD_ID]", true);

                if (dt.Rows.Count > 0)
                {
                    salesRecordId = dt.Rows[0][0].ToString();
                }

                for (int i = 0; i < dtPrdList.Rows.Count; i++)
                {
                    db.ClearParameters();

                    db.AddParameters("@SalesRecordId", salesRecordId.Trim());
                    db.AddParameters("@ProductId", dtPrdList.Rows[i]["ProductId"].ToString());
                    db.AddParameters("@RatePerUnit", dtPrdList.Rows[i]["RatePerUnit"].ToString());
                    db.AddParameters("@Quantity", dtPrdList.Rows[i]["Quantity"].ToString());
                    db.AddParameters("@Amount", dtPrdList.Rows[i]["Amount"].ToString());
                    db.AddParameters("@VATPercentage", dtPrdList.Rows[i]["VATPercentage"].ToString());
                    db.AddParameters("@Height", dtPrdList.Rows[i]["Height"].ToString());
                    db.AddParameters("@Width", dtPrdList.Rows[i]["Width"].ToString());
                    db.AddParameters("@OnSale", "Yes");
                    db.AddParameters("@OrderUnit", dtPrdList.Rows[i]["OrderUnit"].ToString());
                    db.AddParameters("@TotalUit", dtPrdList.Rows[i]["TotalUnit"].ToString());
                    db.AddParameters("@Serial", dtPrdList.Rows[i]["Serial"].ToString());
                    db.AddParameters("@Description", "");
                    db.ExecuteNonQuery("UPDATE_RETAIL_SALES_RECORD_PRODUCT", true);

                }


                db.ClearParameters();
                db.AddParameters("@SalesRecordId", salesRecordId.Trim());
                db.AddParameters("@SalesCenterId", salesOrder.SalesCenterId.Trim());
                db.AddParameters("@CreatedBy", LumexSessionManager.Get("ActiveUserId").ToString());
                db.AddParameters("@CreatedFrom", LumexLibraryManager.GetTerminal());

                db.ExecuteNonQuery("[UPDATE_RETAIL_SALES_RECEIVE_PAYMENT_LEDGER_TRANSACTION_FOR_SUB_PRODUCT_APPROVE_BY_JV_RECORD]", true);


                return salesRecordId;
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                salesOrder = null;
                dtPrdList = null;
            }
        }
开发者ID:atiburrahman09,项目名称:Signbd,代码行数:68,代码来源:SalesOrderDAL.cs


注:本文中的LumexDBPlayer.ClearParameters方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。