public M_OrderList GetModelFromReader(System.Data.DataRow rdr) { M_OrderList model = new M_OrderList(); model.id = Convert.ToInt32(rdr["id"]); model.AddUser = rdr["AddUser"].ToString(); model.OrderNo = rdr["OrderNo"].ToString(); model.Reuser = ConverToStr(rdr["Reuser"]); model.Receiver = ConverToStr(rdr["Receiver"]); model.Rename = ConverToStr(rdr["Rename"]); model.Guojia = ConverToStr(rdr["Guojia"]); model.Shengfen = ConverToStr(rdr["Shengfen"]); model.Chengshi = ConverToStr(rdr["Chengshi"]); model.Diqu = ConverToStr(rdr["Diqu"]); model.Jiedao = ConverToStr(rdr["Jiedao"]); model.ZipCode = ConverToStr(rdr["ZipCode"]); model.Phone = ConverToStr(rdr["Phone"]); model.Email = ConverToStr(rdr["Email"]); model.Mobile = ConvertToInt(rdr["Mobile"]); model.Delivery = ConvertToInt(rdr["Delivery"]); model.Outstock = ConvertToInt(rdr["Outstock"]); model.Deliverytime = ConvertToInt(rdr["Deliverytime"]); model.Payment = ConvertToInt(rdr["Payment"]); model.Invoice = ConverToStr(rdr["Invoice"]); model.Ordermessage = ConverToStr(rdr["Ordermessage"]); model.Merchandiser = ConverToStr(rdr["Merchandiser"]); model.Internalrecords = ConverToStr(rdr["Internalrecords"]); model.Ordersamount = ConverToDouble(rdr["Ordersamount"]); model.Receivablesamount = ConverToDouble(rdr["Receivablesamount"]); model.Specifiedprice = ConverToDouble(rdr["Specifiedprice"]); model.Freight = ConverToDouble(rdr["Freight"]); model.Invoiceneeds = ConvertToInt(rdr["Invoiceneeds"]); model.Developedvotes = ConvertToInt(rdr["Developedvotes"]); model.OrderStatus = ConvertToInt(rdr["OrderStatus"]); model.Paymentstatus = ConvertToInt(rdr["Paymentstatus"]); model.StateLogistics = ConvertToInt(rdr["StateLogistics"]); model.Signed = ConvertToInt(rdr["Signed"]); model.Settle = ConvertToInt(rdr["Settle"]); model.Aside = ConvertToInt(rdr["Aside"]); model.Suspended = ConvertToInt(rdr["Suspended"]); model.Ordertype = ConvertToInt(rdr["Ordertype"]); model.AddTime = Convert.ToDateTime(rdr["AddTime"]); model.Userid = ConvertToInt(rdr["Userid"]); model.city = ConverToStr(rdr["city"]); model.IsCount = ConverToBool(rdr["IsCount"]); model.Integral = ConvertToInt(rdr["Integral"]); //model.ParentID = ConvertToInt(rdr["parentID"]); model.Service_charge = ConverToDouble(rdr["service_charge"]); model.Balance_price = ConverToDouble(rdr["Balance_price"]); model.Freight_remark = ConverToStr(rdr["Freight_remark"]); model.Balance_remark = ConverToStr(rdr["Balance_remark"]); model.Money_rate = ConverToDouble(rdr["Money_rate"]); model.Money_code = ConverToStr(rdr["Money_code"]); model.MobileNum = ConverToStr(rdr["MobileNum"]); model.ExpressDelivery = ConverToStr(rdr["ExpressDelivery"]); model.InvoType = ConvertToInt(rdr["InvoType"]); model.Promoter = ConvertToInt(rdr["Promoter"]); model.ExpressNum = ConverToStr(rdr["ExpressNum"]); model.Company = ConverToStr(rdr["Company"]); model.SendPointStatus = ConvertToInt(rdr["SendPointStatus"]); model.province = ConverToStr(rdr["Province"]); model.Extend = ConverToStr(rdr["Extend"]); model.StoreID = ConvertToInt(rdr["StoreID"]); model.AllMoney_Json = ConverToStr(rdr["AllMoney_Json"]); model.PaymentNo = ConverToStr(rdr["PaymentNo"]); model.ExpTime = ConverToStr(rdr["ExpTime"]); model.IsSure = ConvertToInt(rdr["IsSure"]); model.BackID = ConvertToInt(rdr["BackID"]); return(model); }
public override SqlParameter[] GetParameters() { M_OrderList model = this; if (model.AddTime <= DateTime.MinValue) { model.AddTime = DateTime.Now; } if (model.Balance_price == 0) { model.Balance_price = model.Ordersamount; } SqlParameter[] sp = GetSP(); sp[0].Value = model.id; sp[1].Value = model.OrderNo; sp[2].Value = model.Reuser; sp[3].Value = model.Receiver; sp[4].Value = model.Rename; sp[5].Value = model.Guojia; sp[6].Value = model.Shengfen; sp[7].Value = model.Chengshi; sp[8].Value = model.Diqu; sp[9].Value = model.Jiedao; sp[10].Value = model.ZipCode; sp[11].Value = model.Phone; sp[12].Value = model.Email; sp[13].Value = model.Mobile; sp[14].Value = model.Delivery; sp[15].Value = model.Outstock; sp[16].Value = model.Deliverytime; sp[17].Value = model.Payment; sp[18].Value = model.Invoice; sp[19].Value = model.Ordermessage; sp[20].Value = model.Merchandiser; sp[21].Value = model.Internalrecords; sp[22].Value = model.Ordersamount; sp[23].Value = model.Receivablesamount; sp[24].Value = model.Specifiedprice; sp[25].Value = model.Freight; sp[26].Value = model.Invoiceneeds; sp[27].Value = model.Developedvotes; sp[28].Value = model.OrderStatus; sp[29].Value = model.Paymentstatus; sp[30].Value = model.StateLogistics; sp[31].Value = model.Signed; sp[32].Value = model.Settle; sp[33].Value = model.Aside; sp[34].Value = model.Suspended; sp[35].Value = model.Ordertype; sp[36].Value = model.AddTime; sp[37].Value = model.AddUser; sp[38].Value = model.Userid; sp[39].Value = model.city; sp[40].Value = model.IsCount; sp[41].Value = model.Integral; sp[42].Value = 0; sp[43].Value = model.Service_charge; sp[44].Value = model.Balance_price; sp[45].Value = model.Freight_remark; sp[46].Value = model.Balance_remark; sp[47].Value = model.Money_rate; sp[48].Value = model.Money_code; sp[49].Value = model.MobileNum; sp[50].Value = model.ExpressDelivery; sp[51].Value = model.InvoType; sp[52].Value = model.Promoter; sp[53].Value = model.ExpressNum; sp[54].Value = model.Company; sp[55].Value = model.SendPointStatus; sp[56].Value = model.province; sp[57].Value = model.Extend; sp[58].Value = model.StoreID; sp[59].Value = model.AllMoney_Json; sp[60].Value = model.PaymentNo; sp[61].Value = model.ExpTime; sp[62].Value = model.IsSure; sp[63].Value = model.BackID; return(sp); }