public List <PurOrder> Get(DateTime startDate, DateTime endDate) { return(Search("dbo.GetPurOrderByOrderDate", delegate(SqlCommand cmd) { SqlHelper.AddParamDatetime(cmd, "@StartDate", startDate); SqlHelper.AddParamDatetime(cmd, "@EndDate", endDate); })); }
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); }
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); }