/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static PresentEntity GetEntityFromrdr(NullableDataReader rdr) { PresentEntity info = new PresentEntity(); info.PresentID = rdr.GetInt32("PresentID"); info.PresentName = rdr.GetString("PresentName"); info.PresentPic = rdr.GetString("PresentPic"); info.Unit = rdr.GetString("Unit"); info.PresentNum = rdr.GetString("PresentNum"); info.ServiceTermUnit = rdr.GetInt32("ServiceTermUnit"); info.ServiceTerm = rdr.GetInt32("ServiceTerm"); info.Price = rdr.GetDecimal("Price"); info.Price_Market = rdr.GetDecimal("Price_Market"); info.Weight = rdr.GetDouble("Weight"); info.Stocks = rdr.GetInt32("Stocks"); info.StocksProject = rdr.GetInt32("StocksProject"); info.OrderNum = rdr.GetInt32("OrderNum"); info.AlarmNum = rdr.GetInt32("AlarmNum"); info.ProductCharacter = rdr.GetInt32("ProductCharacter"); info.DownloadUrl = rdr.GetString("DownloadUrl"); info.Remark = rdr.GetString("Remark"); info.PresentThumb = rdr.GetString("PresentThumb"); info.PresentIntro = rdr.GetString("PresentIntro"); info.PresentExplain = rdr.GetString("PresentExplain"); return(info); }
private static OrderItemInfo OrderItemFromrdr(NullableDataReader rdr) { OrderItemInfo info = new OrderItemInfo(); info.ItemId = rdr.GetInt32("ItemID"); info.OrderId = rdr.GetInt32("OrderID"); info.ProductId = rdr.GetInt32("ProductID"); info.TableName = rdr.GetString("TableName"); info.Property = rdr.GetString("Property"); info.SaleType = rdr.GetInt32("SaleType"); info.PriceMarket = rdr.GetDecimal("Price_Market"); info.Price = rdr.GetDecimal("Price"); info.TruePrice = rdr.GetDecimal("TruePrice"); info.Amount = rdr.GetInt32("Amount"); info.SubTotal = rdr.GetDecimal("SubTotal"); info.BeginDate = rdr.GetDateTime("BeginDate"); info.ServiceTerm = rdr.GetInt32("ServiceTerm"); info.Remark = rdr.GetString("Remark"); info.PresentMoney = rdr.GetDecimal("PresentMoney"); info.PresentPoint = rdr.GetInt32("PresentPoint"); info.PresentExp = rdr.GetInt32("PresentExp"); info.ServiceTermUnit = (ServiceTermUnit)rdr.GetInt32("ServiceTermUnit"); info.ProductCharacter = (ProductCharacter)rdr.GetInt32("ProductCharacter"); info.ProductName = rdr.GetString("ProductName"); info.Unit = rdr.GetString("Unit"); info.Weight = rdr.GetDouble("Weight"); return(info); }
private static void DeliverChargeInfoFromrdr(DeliverChargeInfo deliverChargeInfo, NullableDataReader rdr) { deliverChargeInfo.ChargeMin = rdr.GetDecimal("Charge_Min"); deliverChargeInfo.WeightMin = rdr.GetDouble("Weight_Min"); deliverChargeInfo.ChargePerUnit = rdr.GetDecimal("ChargePerUnit"); deliverChargeInfo.WeightPerUnit = rdr.GetDouble("WeightPerUnit"); deliverChargeInfo.ChargeMax = rdr.GetDecimal("Charge_Max"); deliverChargeInfo.ArrArea = rdr.GetString("arrArea"); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static ProductDataEntity GetEntityFromrdr(NullableDataReader rdr) { ProductDataEntity info = new ProductDataEntity(); info.ID = rdr.GetInt32("ID"); info.ProductID = rdr.GetInt32("ProductID"); info.TableName = rdr.GetString("TableName"); info.PropertyValue = rdr.GetString("PropertyValue"); info.Stocks = rdr.GetInt32("Stocks"); info.OrderNum = rdr.GetInt32("OrderNum"); info.AlarmNum = rdr.GetInt32("AlarmNum"); info.BuyTimes = rdr.GetInt32("BuyTimes"); info.Weight = rdr.GetDouble("Weight"); info.Volume = rdr.GetDouble("Volume"); info.Price = rdr.GetDecimal("Price"); info.Price_Market = rdr.GetDecimal("Price_Market"); info.Price_Activity = rdr.GetDecimal("Price_Activity"); info.Price_Settlement = rdr.GetDecimal("Price_Settlement"); info.Price_Member = rdr.GetDecimal("Price_Member"); info.Price_Agent = rdr.GetDecimal("Price_Agent"); info.Price_Wholesale1 = rdr.GetDecimal("Price_Wholesale1"); info.Price_Wholesale2 = rdr.GetDecimal("Price_Wholesale2"); info.Price_Wholesale3 = rdr.GetDecimal("Price_Wholesale3"); info.Number_Wholesale1 = rdr.GetInt32("Number_Wholesale1"); info.Number_Wholesale2 = rdr.GetInt32("Number_Wholesale2"); info.Number_Wholesale3 = rdr.GetInt32("Number_Wholesale3"); info.IsValid = rdr.GetBoolean("IsValid"); return(info); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static RepaymentEntity GetEntityFromrdr(NullableDataReader rdr) { RepaymentEntity info = new RepaymentEntity(); info.ID = rdr.GetInt32("ID"); info.OrderID = rdr.GetInt32("OrderID"); info.OrderItemID = rdr.GetInt32("OrderItemID"); info.UserID = rdr.GetInt32("UserID"); info.Deadline = rdr.GetInt32("Deadline"); info.CurrentDeadline = rdr.GetInt32("CurrentDeadline"); info.RePayDate = rdr.GetNullableDateTime("RePayDate"); info.RePayMoney = rdr.GetDecimal("RePayMoney"); info.Principal = rdr.GetDecimal("Principal"); info.Interest = rdr.GetDecimal("Interest"); info.MonthFeeMoney = rdr.GetDecimal("MonthFeeMoney"); info.VIPMoney = rdr.GetDecimal("VIPMoney"); info.InsuranceMoney = rdr.GetDecimal("InsuranceMoney"); info.RePayMoneySub = rdr.GetDecimal("RePayMoneySub"); info.RepaymentType = rdr.GetInt32("RepaymentType"); info.RepaymentStatus = rdr.GetInt32("RepaymentStatus"); info.TrueRePayDate = rdr.GetNullableDateTime("TrueRePayDate"); info.TrueRePayMoney = rdr.GetDecimal("TrueRePayMoney"); info.OverdueDays = rdr.GetInt32("OverdueDays"); info.LateFee = rdr.GetDecimal("LateFee"); info.PressMoneyStatus = rdr.GetInt32("PressMoneyStatus"); info.PressMoneyStaff = rdr.GetString("PressMoneyStaff"); info.Remark = rdr.GetString("Remark"); info.Remark1 = rdr.GetString("Remark1"); info.Remark2 = rdr.GetString("Remark2"); return(info); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static DeliverChargeEntity GetEntityFromrdr(NullableDataReader rdr) { DeliverChargeEntity info = new DeliverChargeEntity(); info.ID = rdr.GetInt32("ID"); info.DeliverTypeID = rdr.GetInt32("DeliverTypeID"); info.AreaType = rdr.GetInt32("AreaType"); info.ArrArea = rdr.GetString("arrArea"); info.Charge_Min = rdr.GetDecimal("Charge_Min"); info.Weight_Min = rdr.GetDouble("Weight_Min"); info.ChargePerUnit = rdr.GetDecimal("ChargePerUnit"); info.WeightPerUnit = rdr.GetDouble("WeightPerUnit"); info.Charge_Max = rdr.GetDecimal("Charge_Max"); return(info); }
private static DeliverChargeInfo CreateInfo(NullableDataReader rdr) { DeliverChargeInfo info = new DeliverChargeInfo(); info.Id = rdr.GetInt32("Id"); info.DeliverTypeId = rdr.GetInt32("DeliverTypeId"); info.AreaType = rdr.GetInt32("AreaType"); info.ArrArea = rdr["arrArea"].ToString(); info.ChargeMin = rdr.GetDecimal("Charge_Min"); info.WeightMin = rdr.GetDouble("Weight_Min"); info.ChargePerUnit = rdr.GetDecimal("ChargePerUnit"); info.WeightPerUnit = rdr.GetDouble("WeightPerUnit"); info.ChargeMax = rdr.GetDecimal("Charge_Max"); return(info); }
private static ClientInfo ClientFromrdr(NullableDataReader rdr) { ClientInfo info = new ClientInfo(); info.ClientId = rdr.GetInt32("ClientID"); info.ParentId = rdr.GetInt32("ParentID"); info.ClientNum = rdr.GetString("ClientNum"); info.ClientType = rdr.GetInt32("ClientType"); info.ClientName = rdr.GetString("ClientName"); info.ShortedForm = rdr.GetString("ShortedForm"); info.Area = rdr.GetInt32("Area"); info.ClientField = rdr.GetInt32("ClientField"); info.ValueLevel = rdr.GetInt32("ValueLevel"); info.CreditLevel = rdr.GetInt32("CreditLevel"); info.Importance = rdr.GetInt32("Importance"); info.ConnectionLevel = rdr.GetInt32("ConnectionLevel"); info.GroupId = rdr.GetInt32("GroupID"); info.SourceType = rdr.GetInt32("SourceType"); info.PhaseType = rdr.GetInt32("PhaseType"); info.Remark = rdr.GetString("Remark"); info.VisitTimes = rdr.GetInt32("VisitTimes"); info.ServiceTimes = rdr.GetInt32("ServiceTimes"); info.ComplainTimes = rdr.GetInt32("ComplainTimes"); info.LastVisitTime = rdr.GetDateTime("LastVisitTime"); info.LastServiceTime = rdr.GetDateTime("LastServiceTime"); info.LastComplainTime = rdr.GetDateTime("LastComplainTime"); info.CreateTime = rdr.GetDateTime("CreateTime"); info.UpdateTime = rdr.GetDateTime("UpdateTime"); info.Owner = rdr.GetString("Owner"); info.Balance = rdr.GetDecimal("Balance"); return(info); }
public DataTable GetBillOfAgent(int startRowIndexId, int maxNumberRows, string userName) { Database database = DatabaseFactory.CreateDatabase(); DbCommand storedProcCommand = database.GetStoredProcCommand("PR_Accessories_BankroolItem_GetBill"); database.AddInParameter(storedProcCommand, "@StartRows", DbType.Int32, startRowIndexId); database.AddInParameter(storedProcCommand, "@PageSize", DbType.Int32, maxNumberRows); database.AddInParameter(storedProcCommand, "@SortColumn", DbType.String, "B.OrderID"); database.AddInParameter(storedProcCommand, "@StrColumn", DbType.String, "Max(O.OrderNum) AS tOrderNum, SUM(B.Money) AS tMoney, Max(B.DateAndTime) AS tDateAndTime, Max(B.Remark) AS tRemark"); database.AddInParameter(storedProcCommand, "@Sorts", DbType.String, "DESC"); database.AddInParameter(storedProcCommand, "@Filter", DbType.String, "B.UserName = '******' AND B.Status=1 "); database.AddInParameter(storedProcCommand, "@TableName", DbType.String, "PE_BankrollItem B LEFT JOIN PE_Orders O On B.OrderID = O.OrderID"); database.AddOutParameter(storedProcCommand, "@Total", DbType.Int32, maxNumberRows); DataTable table = new DataTable(); table.Columns.Add("DateAndTime", typeof(DateTime)); table.Columns.Add("OrderNum", typeof(string)); table.Columns.Add("Money", typeof(decimal)); table.Columns.Add("Remark", typeof(string)); using (NullableDataReader reader = new NullableDataReader(database.ExecuteReader(storedProcCommand))) { while (reader.Read()) { DataRow row = table.NewRow(); row["DateAndTime"] = reader.GetDateTime("tDateAndTime"); row["OrderNum"] = reader.GetString("tOrderNum"); row["Money"] = reader.GetDecimal("tMoney"); row["Remark"] = reader.GetString("tRemark"); table.Rows.Add(row); } } this.m_TotalOfBill = (int)database.GetParameterValue(storedProcCommand, "@Total"); return(table); }
public IList <MemberExpenditureInfo> GetMemberExpenditureList(int startRowIndexId, int maxNumberRows) { Database database = DatabaseFactory.CreateDatabase(); DbCommand storedProcCommand = database.GetStoredProcCommand("PR_Shop_Statistics_GetList"); database.AddInParameter(storedProcCommand, "@StartRows", DbType.Int32, startRowIndexId); database.AddInParameter(storedProcCommand, "@PageSize", DbType.Int32, maxNumberRows); database.AddInParameter(storedProcCommand, "@SortColumn", DbType.String, "SUM(O.MoneyReceipt)"); database.AddInParameter(storedProcCommand, "@StrColumn", DbType.String, " Max(U.UserName) AS UserName, SUM(O.MoneyReceipt) AS totalMoneyReceip"); database.AddInParameter(storedProcCommand, "@Sorts", DbType.String, "DESC"); database.AddInParameter(storedProcCommand, "@TableName", DbType.String, "PE_Users AS U INNER JOIN PE_Orders AS O ON O.UserName = U.UserName"); database.AddInParameter(storedProcCommand, "@Filter", DbType.String, "O.MoneyReceipt > 0"); database.AddInParameter(storedProcCommand, "@ID", DbType.String, "U.UserID"); database.AddInParameter(storedProcCommand, "@Group", DbType.String, "GROUP BY U.UserID"); database.AddOutParameter(storedProcCommand, "@Total", DbType.Int32, maxNumberRows); IList <MemberExpenditureInfo> list = new List <MemberExpenditureInfo>(); using (NullableDataReader reader = new NullableDataReader(database.ExecuteReader(storedProcCommand))) { while (reader.Read()) { MemberExpenditureInfo item = new MemberExpenditureInfo(); item.UserName = reader.GetString("UserName"); item.MoneyReceipt = reader.GetDecimal("totalMoneyReceip"); list.Add(item); } } this.m_TotalOfMemberExpenditure = (int)database.GetParameterValue(storedProcCommand, "@Total"); return(list); }
private static ShoppingCartInfo ShoppingCartFromrdr(NullableDataReader rdr, bool isDetail) { ShoppingCartInfo info = new ShoppingCartInfo(); info.UserName = rdr.GetString("UserName"); info.CartId = rdr.GetString("CartID"); info.ProductId = rdr.GetInt32("ProductID"); info.Quantity = rdr.GetInt32("Quantity"); info.IsPresent = rdr.GetBoolean("IsPresent"); info.UpdateTime = rdr.GetDateTime("UpdateTime"); info.TableName = rdr.GetString("TableName"); info.Property = rdr.GetString("Property"); info.InformResult = rdr.GetInt32("InformResult"); if (isDetail) { info.ProductInfomation.ProductName = rdr.GetString("ProductName"); info.ProductInfomation.ProductType = (ProductType)rdr.GetInt32("ProductType"); info.ProductInfomation.ProductPic = rdr.GetString("ProductPic"); info.ProductInfomation.ProductThumb = rdr.GetString("ProductThumb"); info.ProductInfomation.Unit = rdr.GetString("Unit"); info.ProductInfomation.ServiceTermUnit = (ServiceTermUnit)rdr.GetInt32("ServiceTermUnit"); info.ProductInfomation.ServiceTerm = rdr.GetInt32("ServiceTerm"); info.ProductInfomation.PriceInfo.Price = rdr.GetDecimal("Price"); info.ProductInfomation.PriceMarket = rdr.GetDecimal("Price_Market"); info.ProductInfomation.PriceInfo.PriceMember = rdr.GetDecimal("Price_Member"); info.ProductInfomation.PriceInfo.PriceAgent = rdr.GetDecimal("Price_Agent"); info.ProductInfomation.EnableWholesale = rdr.GetBoolean("EnableWholesale"); info.ProductInfomation.PriceInfo.PriceWholesale1 = rdr.GetDecimal("Price_Wholesale1"); info.ProductInfomation.PriceInfo.PriceWholesale2 = rdr.GetDecimal("Price_Wholesale2"); info.ProductInfomation.PriceInfo.PriceWholesale3 = rdr.GetDecimal("Price_Wholesale3"); info.ProductInfomation.PriceInfo.NumberWholesale1 = rdr.GetInt32("Number_Wholesale1"); info.ProductInfomation.PriceInfo.NumberWholesale2 = rdr.GetInt32("Number_Wholesale2"); info.ProductInfomation.PriceInfo.NumberWholesale3 = rdr.GetInt32("Number_Wholesale3"); info.ProductInfomation.PresentId = rdr.GetInt32("PresentID"); info.ProductInfomation.PresentNumber = rdr.GetInt32("PresentNumber"); info.ProductInfomation.PresentPoint = rdr.GetInt32("PresentPoint"); info.ProductInfomation.PresentExp = rdr.GetInt32("PresentExp"); info.ProductInfomation.PresentMoney = rdr.GetDecimal("PresentMoney"); info.ProductInfomation.StocksProject = (StocksProject)rdr.GetInt32("StocksProject"); info.ProductInfomation.SalePromotionType = rdr.GetInt32("SalePromotionType"); info.ProductInfomation.MinNumber = rdr.GetInt32("MinNumber"); info.ProductInfomation.Discount = rdr.GetDouble("Discount"); info.ProductInfomation.IncludeTax = (TaxRateType)rdr.GetInt32("IncludeTax"); info.ProductInfomation.TaxRate = rdr.GetDouble("TaxRate"); info.ProductInfomation.Properties = rdr.GetString("Properties"); info.ProductInfomation.Weight = rdr.GetDouble("Weight"); info.ProductInfomation.LimitNum = rdr.GetInt32("LimitNum"); info.ProductInfomation.EnableSingleSell = rdr.GetBoolean("EnableSingleSell"); info.ProductInfomation.DependentProducts = rdr.GetString("DependentProducts"); info.ProductInfomation.ProductKind = (ProductKind)rdr.GetInt32("ProductKind"); info.ProductInfomation.TableName = rdr.GetString("TableName"); info.ProductInfomation.ProductId = rdr.GetInt32("ProductID"); info.ProductInfomation.Stocks = rdr.GetInt32("Stocks"); info.ProductInfomation.OrderNum = rdr.GetInt32("OrderNum"); } return(info); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static MentionLogEntity GetEntityFromrdr(NullableDataReader rdr) { MentionLogEntity info = new MentionLogEntity(); info.ID = rdr.GetInt32("ID"); info.Applicant = rdr.GetString("Applicant"); info.ApplicationTime = rdr.GetNullableDateTime("ApplicationTime"); info.ApplicationAmount = rdr.GetDecimal("ApplicationAmount"); info.HandlingCharge = rdr.GetDecimal("HandlingCharge"); info.BankAccount = rdr.GetString("BankAccount"); info.MentionStatus = rdr.GetInt32("MentionStatus"); info.Operator = rdr.GetString("Operator"); info.OperatingTime = rdr.GetNullableDateTime("OperatingTime"); info.Remark = rdr.GetString("Remark"); info.LogTime = rdr.GetNullableDateTime("LogTime"); return(info); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static DeliverTypeEntity GetEntityFromrdr(NullableDataReader rdr) { DeliverTypeEntity info = new DeliverTypeEntity(); info.TypeID = rdr.GetInt32("TypeID"); info.TypeName = rdr.GetString("TypeName"); info.Intro = rdr.GetString("Intro"); info.ChargeType = rdr.GetInt32("ChargeType"); info.IsDefault = rdr.GetBoolean("IsDefault"); info.IsDisabled = rdr.GetBoolean("IsDisabled"); info.OrderSort = rdr.GetInt32("OrderSort"); info.ReleaseType = rdr.GetInt32("ReleaseType"); info.MinMoney1 = rdr.GetDecimal("MinMoney1"); info.ReleaseCharge = rdr.GetDecimal("ReleaseCharge"); info.Minmoney2 = rdr.GetDecimal("Minmoney2"); info.MaxCharge = rdr.GetDecimal("MaxCharge"); info.MinMoney3 = rdr.GetDecimal("MinMoney3"); info.Charge_Min = rdr.GetDecimal("Charge_Min"); info.Charge_Max = rdr.GetDecimal("Charge_Max"); info.Charge_Percent = rdr.GetInt16("Charge_Percent"); info.IncludeTax = rdr.GetInt32("IncludeTax"); info.TaxRate = rdr.GetDouble("TaxRate"); info.StoreID = rdr.GetInt32("StoreID"); return(info); }
private static OrderInfo OrderFromrdr(NullableDataReader rdr, string action) { OrderInfo info = new OrderInfo(); info.OrderId = rdr.GetInt32("OrderID"); info.OrderNum = rdr.GetString("OrderNum"); info.UserName = rdr.GetString("UserName"); info.ClientId = rdr.GetInt32("ClientID"); info.ClientName = rdr.GetString("ClientName"); info.MoneyTotal = rdr.GetDecimal("MoneyTotal"); info.NeedInvoice = rdr.GetBoolean("NeedInvoice"); info.Invoiced = rdr.GetBoolean("Invoiced"); info.Remark = rdr.GetString("Remark"); info.MoneyReceipt = rdr.GetDecimal("MoneyReceipt"); info.InputTime = rdr.GetDateTime("InputTime"); info.Status = (OrderStatus)rdr.GetInt32("Status"); info.DeliverStatus = (DeliverStatus)rdr.GetInt32("DeliverStatus"); if (string.IsNullOrEmpty(action)) { info.EnableDownload = rdr.GetBoolean("EnableDownload"); info.PresentMoney = rdr.GetDecimal("PresentMoney"); info.PresentPoint = rdr.GetInt32("PresentPoint"); info.PresentExp = rdr.GetInt32("PresentExp"); info.DiscountPayment = rdr.GetDouble("Discount_Payment"); info.ChargeDeliver = rdr.GetDecimal("Charge_Deliver"); } info.AgentName = rdr.GetString("AgentName"); info.Functionary = rdr.GetString("Functionary"); info.InvoiceContent = rdr.GetString("InvoiceContent"); info.BeginDate = rdr.GetDateTime("BeginDate"); info.ContacterName = rdr.GetString("ContacterName"); info.Address = rdr.GetString("Address"); info.ZipCode = rdr.GetString("ZipCode"); info.Mobile = rdr.GetString("Mobile"); info.Phone = rdr.GetString("Phone"); info.Email = rdr.GetString("Email"); info.PaymentType = rdr.GetInt32("PaymentType"); info.DeliverType = rdr.GetInt32("DeliverType"); info.Memo = rdr.GetString("Memo"); info.OutOfStockProject = (OutOfStockProject)rdr.GetInt32("OutOfStockProject"); info.OrderType = rdr.GetInt32("OrderType"); info.CouponId = rdr.GetInt32("CouponID"); info.DeliveryTime = rdr.GetString("DeliveryTime"); return(info); }
private static UserOrderCommonInfo GetUserOrderCommonInfo(NullableDataReader rdr) { UserOrderCommonInfo info = new UserOrderCommonInfo(); info.ProductId = rdr.GetInt32("ProductId"); info.TableName = rdr.GetString("TableName"); info.ProductName = rdr.GetString("ProductName"); info.Unit = rdr.GetString("Unit"); info.Amount = rdr.GetInt32("Amount"); info.BeginDate = rdr.GetDateTime("BeginDate"); info.Price = rdr.GetDecimal("Price"); info.TruePrice = rdr.GetDecimal("TruePrice"); info.ServiceTerm = rdr.GetInt32("ServiceTerm"); info.Remark = rdr.GetString("Remark"); info.ServiceTermUnit = (ServiceTermUnit)rdr.GetInt32("ServiceTermUnit"); info.OrderItemId = rdr.GetInt32("ItemId"); return(info); }
public InvoiceInfo GetInvoiceInfoById(int invoiceId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("@InvoiceId", DbType.Int32, invoiceId); using (NullableDataReader reader = new NullableDataReader(DBHelper.ExecuteReaderProc("PR_Shop_Invoice_GetById", cmdParams))) { if (reader.Read()) { InvoiceInfo info = InvoiceItemFromrdr(reader); info.MoneyTotal = reader.GetDecimal("MoneyTotal"); info.MoneyReceipt = reader.GetDecimal("MoneyReceipt"); info.Memo = reader.GetString("Memo"); return(info); } return(new InvoiceInfo(true)); } }
private static PresentProjectInfo PresentProjectFromrdr(NullableDataReader rdr) { PresentProjectInfo info = new PresentProjectInfo(); info.ProjectId = rdr.GetInt32("ProjectID"); info.ProjectName = rdr.GetString("ProjectName"); info.BeginDate = rdr.GetDateTime("BeginDate"); info.EndDate = rdr.GetDateTime("EndDate"); info.MinMoney = rdr.GetDecimal("MinMoney"); info.MaxMoney = rdr.GetDecimal("MaxMoney"); info.PresentContent = rdr.GetString("PresentContent"); info.Price = rdr.GetDecimal("Price"); info.PresentId = rdr.GetString("PresentID"); info.Cash = rdr.GetDecimal("Cash"); info.PresentExp = rdr.GetInt32("PresentExp"); info.PresentPoint = rdr.GetInt32("PresentPoint"); info.Disabled = rdr.GetBoolean("Disabled"); return(info); }
private static PaymentLogInfo PaymentLogFromrdr(NullableDataReader rdr) { PaymentLogInfo info = new PaymentLogInfo(); info.PaymentLogId = rdr.GetInt32("PaymentLogId"); info.UserName = rdr.GetString("UserName"); info.OrderId = rdr.GetInt32("OrderId"); info.PaymentNum = rdr.GetString("PaymentNum"); info.PlatformId = rdr.GetInt32("PlatformId"); info.MoneyPay = rdr.GetDecimal("MoneyPay"); info.MoneyTrue = rdr.GetDecimal("MoneyTrue"); info.PayTime = rdr.GetNullableDateTime("PayTime"); info.SuccessTime = rdr.GetNullableDateTime("SuccessTime"); info.Status = rdr.GetInt32("Status"); info.PlatformInfo = rdr.GetString("PlatformInfo"); info.Remark = rdr.GetString("Remark"); info.Point = rdr.GetInt32("Point"); return(info); }
private static ProductPriceInfo ProductPriceFromrdr(NullableDataReader rdr) { ProductPriceInfo info = new ProductPriceInfo(); info.Id = rdr.GetInt32("ID"); info.GroupId = rdr.GetInt32("GroupID"); info.Price = rdr.GetDecimal("Price"); info.PropertyValue = rdr.GetString("PropertyValue"); return(info); }
private static UserInfo UsersFromrdr(NullableDataReader rdr) { UserInfo info = new UserInfo(); info.UserId = rdr.GetInt32("UserID"); info.GroupId = rdr.GetInt32("GroupID"); info.CompanyId = rdr.GetInt32("CompanyID"); info.ClientId = rdr.GetInt32("ClientID"); info.UserType = (UserType)rdr.GetInt32("UserType"); info.UserName = rdr.GetString("UserName"); info.UserPassword = rdr.GetString("UserPassword"); info.LastPassword = rdr.GetString("LastPassword"); info.PayPassword = rdr.GetString("PayPassword"); info.Question = rdr.GetString("Question"); info.Answer = rdr.GetString("Answer"); info.Email = rdr.GetString("Email"); info.Sex = (UserSexType)rdr.GetInt32("Sex"); info.RegTime = rdr.GetDateTime("RegTime"); info.JoinTime = rdr.GetDateTime("JoinTime"); info.LogOnTimes = rdr.GetInt32("LoginTimes"); info.LastLogOnTime = rdr.GetNullableDateTime("LastLoginTime"); info.LastPresentTime = rdr.GetNullableDateTime("LastPresentTime"); info.LastLogOnIP = rdr.GetString("LastLoginIP"); info.LastPasswordChangedTime = rdr.GetNullableDateTime("LastPasswordChangedTime"); info.LastLockoutTime = rdr.GetNullableDateTime("LastLockoutTime"); info.FailedPasswordAttemptCount = rdr.GetInt32("FailedPasswordAttemptCount"); info.FirstFailedPasswordAttempTime = rdr.GetNullableDateTime("FirstFailedPasswordAttempTime"); info.FailedPasswordAnswerAttempCount = rdr.GetInt32("FailedPasswordAnswerAttempCount"); info.FirstFailedPasswordAnswerAttempTime = rdr.GetNullableDateTime("FirstFailedPasswordAnswerAttempTime"); info.Status = (UserStatus)rdr.GetInt32("Status"); info.CheckNum = rdr.GetString("CheckNum"); info.EnableResetPassword = rdr.GetBoolean("EnableResetPassword"); info.UserFace = rdr.GetString("UserFace"); info.FaceWidth = rdr.GetInt32("FaceWidth"); info.FaceHeight = rdr.GetInt32("FaceHeight"); info.Sign = rdr.GetString("Sign"); info.PrivacySetting = rdr.GetInt32("PrivacySetting"); info.Balance = rdr.GetDecimal("Balance"); info.UserPoint = rdr.GetInt32("UserPoint"); info.UserExp = rdr.GetInt32("UserExp"); info.ConsumeMoney = rdr.GetInt32("ConsumeMoney"); info.ConsumePoint = rdr.GetInt32("ConsumePoint"); info.ConsumeExp = rdr.GetInt32("ConsumeExp"); info.PostItems = rdr.GetInt32("PostItems"); info.PassedItems = rdr.GetInt32("PassedItems"); info.RejectItems = rdr.GetInt32("RejectItems"); info.DelItems = rdr.GetInt32("DelItems"); info.EndTime = rdr.GetNullableDateTime("EndTime"); info.IsInheritGroupRole = rdr.GetBoolean("IsInheritGroupRole"); info.UserSetting = rdr.GetString("UserSetting"); info.UserFriendGroup = rdr.GetString("UserFriendGroup"); info.UserTrueName = rdr.GetString("TrueName"); return(info); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static ProductPriceEntity GetEntityFromrdr(NullableDataReader rdr) { ProductPriceEntity info = new ProductPriceEntity(); info.ID = rdr.GetInt32("ID"); info.ProductID = rdr.GetInt32("ProductID"); info.PropertyValue = rdr.GetString("PropertyValue"); info.TableName = rdr.GetString("TableName"); info.GroupID = rdr.GetInt32("GroupID"); info.Price = rdr.GetDecimal("Price"); return(info); }
private static CouponInfo GetCouponInfoFromrdataReader(NullableDataReader dataReader) { CouponInfo info = new CouponInfo(); info.BeginDate = dataReader.GetDateTime("BeginDate"); info.CouponCreateContent = dataReader.GetString("CouponCreateContent"); info.CouponCreateType = (CouponCreateType)dataReader.GetInt32("CouponCreateType"); info.CouponId = dataReader.GetInt32("CouponId"); info.CouponName = dataReader.GetString("CouponName"); info.EndDate = dataReader.GetDateTime("EndDate"); info.LimitNum = dataReader.GetInt32("LimitNum"); info.Money = dataReader.GetDecimal("Money"); info.OrderTotalMoney = dataReader.GetDecimal("OrderTotalMoney"); info.CouponNumPattern = dataReader.GetString("CouponNumPattern"); info.ProductLimitContent = dataReader.GetString("ProductLimitContent"); info.ProductLimitType = (ProductLimitType)dataReader.GetInt32("ProductLimitType"); info.State = dataReader.GetInt32("State"); info.UserGroup = dataReader.GetString("UserGroup"); info.UseEndDate = dataReader.GetDateTime("UseEndDate"); return(info); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static PaymentLogEntity GetEntityFromrdr(NullableDataReader rdr) { PaymentLogEntity info = new PaymentLogEntity(); info.PaymentLogID = rdr.GetInt32("PaymentLogID"); info.UserName = rdr.GetString("UserName"); info.OrderID = rdr.GetInt32("OrderID"); info.PaymentNum = rdr.GetString("PaymentNum"); info.PlatformID = rdr.GetInt32("PlatformID"); info.MoneyPay = rdr.GetDecimal("MoneyPay"); info.MoneyTrue = rdr.GetDecimal("MoneyTrue"); info.PayTime = rdr.GetNullableDateTime("PayTime"); info.SuccessTime = rdr.GetNullableDateTime("SuccessTime"); info.Status = rdr.GetInt32("Status"); info.PlatformInfo = rdr.GetString("PlatformInfo"); info.Remark = rdr.GetString("Remark"); info.Exp = rdr.GetInt32("Exp"); info.Point = rdr.GetInt32("Point"); info.ValidDate = rdr.GetInt32("ValidDate"); info.GroupID = rdr.GetInt32("GroupID"); return(info); }
public RefundInfo GetByOrderId(int orderId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("OrderId", DbType.Int32, orderId); using (NullableDataReader reader = new NullableDataReader(DBHelper.ExecuteReaderProc("PR_Shop_Refund_GetByOrderId", cmdParams))) { if (reader.Read()) { RefundInfo info = new RefundInfo(); info.UserName = reader.GetString("UserName"); info.ClientId = reader.GetInt32("ClientID"); info.OrderNum = reader.GetString("OrderNum"); info.ClientName = reader.GetString("ClientName"); info.MoneyTotal = reader.GetDecimal("MoneyTotal"); info.MoneyReceipt = reader.GetDecimal("MoneyReceipt"); info.Email = reader.GetString("Email"); return(info); } return(new RefundInfo(true)); } }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static StockItemEntity GetEntityFromrdr(NullableDataReader rdr) { StockItemEntity info = new StockItemEntity(); info.ItemID = rdr.GetInt32("ItemID"); info.StockID = rdr.GetInt32("StockID"); info.ProductID = rdr.GetInt32("ProductID"); info.Property = rdr.GetString("Property"); info.Amount = rdr.GetInt32("Amount"); info.Price = rdr.GetDecimal("Price"); info.TableName = rdr.GetString("TableName"); return(info); }
public DeliverItemInfo GetDeliverItemByOrderId(int orderId) { Parameters cmdParams = new Parameters(); cmdParams.AddInParameter("OrderId", DbType.Int32, orderId); using (NullableDataReader reader = DBHelper.ExecuteReaderProc("PR_Shop_DeliverItem_GetByOrderId", cmdParams)) { if (reader.Read()) { DeliverItemInfo info = new DeliverItemInfo(); info.UserName = reader.GetString("UserName"); info.OrderNum = reader.GetString("OrderNum"); info.ClientName = reader.GetString("ClientName"); info.MoneyTotal = reader.GetDecimal("MoneyTotal"); info.MoneyReceipt = reader.GetDecimal("MoneyReceipt"); info.DeliverTypeName = reader.GetString("DeliverTypeName"); info.ContacterName = reader.GetString("ContacterName"); info.Email = reader.GetString("Email"); return(info); } return(new DeliverItemInfo(true)); } }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static CreditLinesLogEntity GetEntityFromrdr(NullableDataReader rdr) { CreditLinesLogEntity info = new CreditLinesLogEntity(); info.LogID = rdr.GetInt32("LogID"); info.UserName = rdr.GetString("UserName"); info.CreditLines = rdr.GetDecimal("CreditLines"); info.IncomePayout = rdr.GetInt32("IncomePayout"); info.LogTime = rdr.GetNullableDateTime("LogTime"); info.Remark = rdr.GetString("Remark"); info.IP = rdr.GetString("IP"); info.Inputer = rdr.GetString("Inputer"); return(info); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static CouponEntity GetEntityFromrdr(NullableDataReader rdr) { CouponEntity info = new CouponEntity(); info.CouponID = rdr.GetInt32("CouponID"); info.CouponName = rdr.GetString("CouponName"); info.CouponNumPattern = rdr.GetString("CouponNumPattern"); info.Money = rdr.GetDecimal("Money"); info.State = rdr.GetInt32("State"); info.UserGroup = rdr.GetString("UserGroup"); info.BeginDate = rdr.GetNullableDateTime("BeginDate"); info.EndDate = rdr.GetNullableDateTime("EndDate"); info.LimitNum = rdr.GetInt32("LimitNum"); info.ProductLimitType = rdr.GetInt32("ProductLimitType"); info.ProductLimitContent = rdr.GetString("ProductLimitContent"); info.CouponCreateType = rdr.GetInt32("CouponCreateType"); info.CouponCreateContent = rdr.GetString("CouponCreateContent"); info.OrderTotalMoney = rdr.GetDecimal("OrderTotalMoney"); info.UseBeginDate = rdr.GetNullableDateTime("UseBeginDate"); info.UseEndDate = rdr.GetNullableDateTime("UseEndDate"); info.CouponItemNum = rdr.GetInt32("CouponItemNum"); return(info); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static TransferLogEntity GetEntityFromrdr(NullableDataReader rdr) { TransferLogEntity info = new TransferLogEntity(); info.TransferLogID = rdr.GetInt32("TransferLogID"); info.OrderID = rdr.GetInt32("OrderID"); info.TransferTime = rdr.GetNullableDateTime("TransferTime"); info.OwnerUserName = rdr.GetString("OwnerUserName"); info.PayerUserName = rdr.GetString("PayerUserName"); info.TargetUserName = rdr.GetString("TargetUserName"); info.Poundage = rdr.GetDecimal("Poundage"); info.Inputer = rdr.GetString("Inputer"); info.Remark = rdr.GetString("Remark"); return(info); }
/// <summary> /// 通过数据读取器生成实体类 /// </summary> /// <param name="rdr"></param> /// <returns></returns> private static SortingLogEntity GetEntityFromrdr(NullableDataReader rdr) { SortingLogEntity info = new SortingLogEntity(); info.ID = rdr.GetInt32("ID"); info.Payer = rdr.GetString("Payer"); info.PaymentTime = rdr.GetNullableDateTime("PaymentTime"); info.MoneyPay = rdr.GetDecimal("MoneyPay"); info.Status = rdr.GetInt32("Status"); info.Operator = rdr.GetString("Operator"); info.OperatingTime = rdr.GetNullableDateTime("OperatingTime"); info.Remark = rdr.GetString("Remark"); info.LogTime = rdr.GetNullableDateTime("LogTime"); return(info); }