Exemplo n.º 1
0
 protected override void AddInsertUpdateParams(SqlCommand cmd, PurLine entity)
 {
     SqlHelper.AddParamInputId(cmd, "@PurOrderId", entity.PurOrderId.Value);
     SqlHelper.AddParamInputId(cmd, "@VendorProductId", entity.VendorProductId.Value);
     SqlHelper.AddParamMoney(cmd, "@CaseCostOverride", entity.CaseCostOverride);
     SqlHelper.AddParamMoney(cmd, "@EachCostOverride", entity.EachCostOverride);
     SqlHelper.AddParamTinyint(cmd, "@OrderedEaches", entity.OrderedEaches);
     SqlHelper.AddParamInt(cmd, "@QtyOrdered", entity.QtyOrdered);
     SqlHelper.AddParamInt(cmd, "@QtyReceived", entity.QtyReceived);
     SqlHelper.AddParamInt(cmd, "@QtyBackordered", entity.QtyBackordered);
     SqlHelper.AddParamInt(cmd, "@QtyDamaged", entity.QtyDamaged);
     SqlHelper.AddParamInt(cmd, "@QtyMissing", entity.QtyMissing);
     SqlHelper.AddParamInt(cmd, "@QtyOnHand", entity.QtyOnHand);
     SqlHelper.AddParamTinyint(cmd, "@SpecialOrder", entity.SpecialOrder);
     SqlHelper.AddParamVarchar(cmd, "@Notes", entity.Notes ?? string.Empty);
     SqlHelper.AddParamVarchar(cmd, "@ProductName", entity.ProductName ?? string.Empty);
     SqlHelper.AddParamInputId(cmd, "@ProductSubCategoryId", entity.ProductSubCategoryId.Value);
     SqlHelper.AddParamVarchar(cmd, "@Size", entity.Size ?? string.Empty);
     SqlHelper.AddParamMoney(cmd, "@RetailPrice", entity.RetailPrice);
     SqlHelper.AddParamInputId(cmd, "@ProductBrandId", entity.ProductBrandId.Value);
     SqlHelper.AddParamVarchar(cmd, "@ManufacturerBarcode", entity.ManufacturerBarcode ?? string.Empty);
     SqlHelper.AddParamVarchar(cmd, "@ManufacturerPartNum", entity.ManufacturerPartNum ?? string.Empty);
     SqlHelper.AddParamVarchar(cmd, "@ShelfOrder", entity.ShelfOrder ?? string.Empty);
     SqlHelper.AddParamMoney(cmd, "@RetailPriceOverride", entity.RetailPriceOverride);
     SqlHelper.AddParamVarchar(cmd, "@VendorPartNum", entity.VendorPartNum ?? string.Empty);
     SqlHelper.AddParamMoney(cmd, "@CaseCost", entity.CaseCost);
     SqlHelper.AddParamInt(cmd, "@CountInCase", entity.CountInCase);
     SqlHelper.AddParamMoney(cmd, "@EachCost", entity.EachCost);
     SqlHelper.AddParamTinyint(cmd, "@PreferredSource", entity.PreferredSource);
     SqlHelper.AddParamTinyint(cmd, "@WholeCasesOnly", entity.WholeCasesOnly);
 }
Exemplo n.º 2
0
 public void AddCategory(PurOrderId orderId, ProductCategoryId categoryId, bool includeInactive)
 {
     ExecuteNonQuery("dbo.PurLineAddCategory",
                     delegate(SqlCommand cmd)
     {
         SqlHelper.AddParamInputId(cmd, "@OrderId", orderId.Value);
         SqlHelper.AddParamInputId(cmd, "@CategoryId", categoryId.Value);
         SqlHelper.AddParamInt(cmd, "@IncludeInactive", includeInactive ? 1 : 0);
     });
 }
Exemplo n.º 3
0
 protected override void AddInsertUpdateParams(SqlCommand cmd, ProductSubCategory entity)
 {
     SqlHelper.AddParamVarchar(cmd, "@SubCategoryName", entity.SubCategoryName ?? string.Empty);
     SqlHelper.AddParamVarchar(cmd, "@SortCode", entity.SortCode ?? string.Empty);
     SqlHelper.AddParamInputId(cmd, "@ProductCategoryId", entity.ProductCategoryId.Value);
     SqlHelper.AddParamInt(cmd, "@DefaultProfitMargin", entity.DefaultProfitMargin);
     SqlHelper.AddParamTinyint(cmd, "@PricingRequiresReview", entity.PricingRequiresReview);
     SqlHelper.AddParamVarchar(cmd, "@Notes", entity.Notes ?? string.Empty);
     SqlHelper.AddParamTinyint(cmd, "@IsActive", entity.IsActive);
 }
Exemplo n.º 4
0
 protected override void AddInsertUpdateParams(SqlCommand cmd, PurOrder entity)
 {
     SqlHelper.AddParamInputId(cmd, "@VendorId", entity.VendorId.Value);
     SqlHelper.AddParamVarchar(cmd, "@OrderNumber", entity.OrderNumber ?? string.Empty);
     SqlHelper.AddParamDatetime(cmd, "@OrderDate", entity.OrderDate);
     SqlHelper.AddParamDatetime(cmd, "@ShipDate", entity.ShipDate);
     SqlHelper.AddParamDatetime(cmd, "@SubmitDate", entity.SubmitDate);
     SqlHelper.AddParamVarchar(cmd, "@CreatedBy", entity.CreatedBy ?? string.Empty);
     SqlHelper.AddParamInt(cmd, "@Discount", entity.Discount);
     SqlHelper.AddParamVarchar(cmd, "@InvoiceNumber", entity.InvoiceNumber ?? string.Empty);
     SqlHelper.AddParamMoney(cmd, "@Freight", entity.Freight);
     SqlHelper.AddParamVarchar(cmd, "@Terms", entity.Terms ?? string.Empty);
     SqlHelper.AddParamVarchar(cmd, "@Notes", entity.Notes ?? string.Empty);
     SqlHelper.AddParamTinyint(cmd, "@Imported", entity.Imported);
 }
Exemplo n.º 5
0
 protected override void AddInsertUpdateParams(SqlCommand cmd, Vendor entity)
 {
     SqlHelper.AddParamVarchar(cmd, "@VendorName", entity.VendorName ?? string.Empty);
     SqlHelper.AddParamVarchar(cmd, "@Terms", entity.Terms ?? string.Empty);
     SqlHelper.AddParamInt(cmd, "@PriceCode", entity.PriceCode);
     SqlHelper.AddParamVarchar(cmd, "@Shipping", entity.Shipping ?? string.Empty);
     SqlHelper.AddParamVarchar(cmd, "@SortCode", entity.SortCode ?? string.Empty);
     SqlHelper.AddParamInputId(cmd, "@RepContactId", entity.RepContactId.Value);
     SqlHelper.AddParamInputId(cmd, "@OrdContactId", entity.OrdContactId.Value);
     SqlHelper.AddParamInputId(cmd, "@ShpContactId", entity.ShpContactId.Value);
     SqlHelper.AddParamInputId(cmd, "@ActContactId", entity.ActContactId.Value);
     SqlHelper.AddParamVarchar(cmd, "@Notes", entity.Notes ?? string.Empty);
     SqlHelper.AddParamTinyint(cmd, "@PreferredVendor", entity.PreferredVendor);
     SqlHelper.AddParamTinyint(cmd, "@IsActive", entity.IsActive);
     SqlHelper.AddParamTinyint(cmd, "@PricingRequiresReview", entity.PricingRequiresReview);
     SqlHelper.AddParamMoney(cmd, "@MinimumOrder", entity.MinimumOrder);
 }
Exemplo n.º 6
0
 protected override void AddInsertUpdateParams(SqlCommand cmd, VendorProduct entity)
 {
     SqlHelper.AddParamInputId(cmd, "@VendorId", entity.VendorId.Value);
     SqlHelper.AddParamInputId(cmd, "@ProductId", entity.ProductId.Value);
     SqlHelper.AddParamMoney(cmd, "@RetailPriceOverride", entity.RetailPriceOverride);
     SqlHelper.AddParamVarchar(cmd, "@VendorPartNum", entity.VendorPartNum ?? string.Empty);
     SqlHelper.AddParamMoney(cmd, "@CaseCost", entity.CaseCost);
     SqlHelper.AddParamInt(cmd, "@CountInCase", entity.CountInCase);
     SqlHelper.AddParamMoney(cmd, "@EachCost", entity.EachCost);
     SqlHelper.AddParamTinyint(cmd, "@PreferredSource", entity.PreferredSource);
     SqlHelper.AddParamTinyint(cmd, "@IsActive", entity.IsActive);
     SqlHelper.AddParamTinyint(cmd, "@PricingRequiresReview", entity.PricingRequiresReview);
     SqlHelper.AddParamTinyint(cmd, "@NumAndCostRequireReview", entity.NumAndCostRequireReview);
     SqlHelper.AddParamDatetime(cmd, "@CostVerifiedDate", entity.CostVerifiedDate);
     SqlHelper.AddParamVarchar(cmd, "@ShelfOrder", entity.ShelfOrder ?? string.Empty);
     SqlHelper.AddParamTinyint(cmd, "@IsProductDeleted", entity.IsProductDeleted);
     SqlHelper.AddParamTinyint(cmd, "@WholeCasesOnly", entity.WholeCasesOnly);
     SqlHelper.AddParamVarchar(cmd, "@Notes", entity.Notes ?? string.Empty);
 }
Exemplo n.º 7
0
 protected override void AddInsertUpdateParams(SqlCommand cmd, Product entity)
 {
     SqlHelper.AddParamVarchar(cmd, "@ProductName", entity.ProductName ?? string.Empty);
     SqlHelper.AddParamInputId(cmd, "@ProductSubCategoryId", entity.ProductSubCategoryId.Value);
     SqlHelper.AddParamVarchar(cmd, "@Size", entity.Size ?? string.Empty);
     SqlHelper.AddParamMoney(cmd, "@RetailPrice", entity.RetailPrice);
     SqlHelper.AddParamInputId(cmd, "@ProductBrandId", entity.ProductBrandId.Value);
     SqlHelper.AddParamVarchar(cmd, "@ManufacturerBarcode", entity.ManufacturerBarcode ?? string.Empty);
     SqlHelper.AddParamVarchar(cmd, "@ManufacturerPartNum", entity.ManufacturerPartNum ?? string.Empty);
     SqlHelper.AddParamTinyint(cmd, "@IsActive", entity.IsActive);
     SqlHelper.AddParamTinyint(cmd, "@PricingRequiresReview", entity.PricingRequiresReview);
     SqlHelper.AddParamTinyint(cmd, "@ExceptionalRetailPrice", entity.ExceptionalRetailPrice);
     SqlHelper.AddParamTinyint(cmd, "@IsProductDeleted", entity.IsProductDeleted);
     SqlHelper.AddParamTinyint(cmd, "@MultipleVendors", entity.MultipleVendors);
     SqlHelper.AddParamInt(cmd, "@QtyBusyMin", entity.QtyBusyMin);
     SqlHelper.AddParamInt(cmd, "@QtyBusyMax", entity.QtyBusyMax);
     SqlHelper.AddParamInt(cmd, "@QtySlowMin", entity.QtySlowMin);
     SqlHelper.AddParamInt(cmd, "@QtySlowMax", entity.QtySlowMax);
     SqlHelper.AddParamVarchar(cmd, "@Notes", entity.Notes ?? string.Empty);
     SqlHelper.AddParamMoney(cmd, "@RetailPrice2", entity.RetailPrice2);
     SqlHelper.AddParamMoney(cmd, "@Price2SizeMultiplier", entity.Price2SizeMultiplier);
 }