private void LoadFromRow(DataRow row) { Id = DBTool.GetIntFromRow(row, "Id", 0); ThirdPartyOrderId = DBTool.GetStringFromRow(row, "ThirdPartyOrderId", ""); ProjectId = DBTool.GetIntFromRow(row, "ProjectId", 0); RealName = DBTool.GetStringFromRow(row, "RealName", ""); Province = DBTool.GetStringFromRow(row, "Province", ""); City = DBTool.GetStringFromRow(row, "City", ""); County = DBTool.GetStringFromRow(row, "County", ""); Town = DBTool.GetStringFromRow(row, "Town", ""); Address = DBTool.GetStringFromRow(row, "Address", ""); Zip = DBTool.GetStringFromRow(row, "Zip", ""); Phone = DBTool.GetStringFromRow(row, "Phone", ""); Mobile = DBTool.GetStringFromRow(row, "Mobile", ""); Email = DBTool.GetStringFromRow(row, "Email", ""); Remark = DBTool.GetStringFromRow(row, "Remark", ""); InvoiceTitle = DBTool.GetStringFromRow(row, "InvoiceTitle", ""); InvoiceState = DBTool.GetIntFromRow(row, "InvoiceState", 0); InvoiceType = DBTool.GetIntFromRow(row, "InvoiceType", 0); InvoiceContent = DBTool.GetIntFromRow(row, "InvoiceContent", 0); Amount = DBTool.GetDecimalFromRow(row, "Amount", 0); Freight = DBTool.GetIntFromRow(row, "Freight", 0); Payment = DBTool.GetStringFromRow(row, "Payment", ""); ReviewId = DBTool.GetIntFromRow(row, "ReviewId", 0); OrderStatus = DBTool.GetStringFromRow(row, "OrderStatus", ""); IsTransformation = DBTool.GetIntFromRow(row, "IsTransformation", 0); OrderTime = DBTool.GetDateTimeFromRow(row, "OrderTime"); ItemDeliveryId = DBTool.GetStringFromRow(row, "ItemDeliveryId", ""); DeliveryCode = DBTool.GetStringFromRow(row, "DeliveryCode", ""); PrId = DBTool.GetStringFromRow(row, "PrId", ""); }
public bool LoadFromComId(int ComId) { string sql = string.Format(" select * from VIPCounterCompany where ComId={0} order by Id desc", ComId);//如果不小心为一个公司插入了多个专柜,读取最新的一个专柜 quxiaoshan 2015-5-21 DataSet ds = m_dbo.GetDataSet(sql); if (ds.Tables[0].Rows.Count > 0) { DataRow row = ds.Tables[0].Rows[0]; Id = DBTool.GetIntFromRow(row, "Id", 0); ComId = DBTool.GetIntFromRow(row, "ComId", 0); CounterId = DBTool.GetIntFromRow(row, "CounterId", 0); UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime"); Discount = DBTool.GetDecimalFromRow(row, "Discount", 1); return(true); } return(false); }
private void LoadFromRow(DataRow row) { Id = DBTool.GetIntFromRow(row, "Id", 0); GoodsId = DBTool.GetIntFromRow(row, "GoodsId", 0); BranchId = DBTool.GetIntFromRow(row, "BranchId", 0); IsVisible = DBTool.GetIntFromRow(row, "IsVisible", 0); IsAllow = DBTool.GetIntFromRow(row, "IsAllow", 0); IsPublic = DBTool.GetIntFromRow(row, "IsPublic", 0); UserId = DBTool.GetIntFromRow(row, "UserId", 0); UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime"); IsWeb = DBTool.GetIntFromRow(row, "IsWeb", 0); Price = DBTool.GetDecimalFromRow(row, "Price", 0); PriceRate = DBTool.GetDecimalFromRow(row, "PriceRate", 0); IsChangePrice = DBTool.GetIntFromRow(row, "IsChangePrice", 0); IsChangeRecommend = DBTool.GetIntFromRow(row, "IsChangeRecommend", 0); Recommend = DBTool.GetIntFromRow(row, "Recommend", 0); }
public bool Load() { string sql = string.Format("select * from TPI_GoodsCompare where 1=1"); if (GoodsId > 0) { sql += string.Format(" and GoodsId={0}", GoodsId); } if (Id > 0) { sql += string.Format(" and Id={0}", Id); } if (XHMC != "" && XHMC != null) { sql += string.Format("and XHMC='{0}'", XHMC); } DataSet ds = m_dbo.GetDataSet(sql); if (ds.Tables[0].Rows.Count > 0) { DataRow row = ds.Tables[0].Rows[0]; Id = DBTool.GetIntFromRow(row, "Id", 0); HNSCGoodsId = DBTool.GetIntFromRow(row, "HNSCGoodsId", 0); LBBH = DBTool.GetStringFromRow(row, "LBBH", ""); LBMC = DBTool.GetStringFromRow(row, "LBMC", ""); PMBH = DBTool.GetStringFromRow(row, "PMBH", ""); PMMC = DBTool.GetStringFromRow(row, "PMMC", ""); PPBH = DBTool.GetStringFromRow(row, "PPBH", ""); PPMC = DBTool.GetStringFromRow(row, "PPMC", ""); XHBH = DBTool.GetStringFromRow(row, "XHBH", ""); XHMC = DBTool.GetStringFromRow(row, "XHMC", ""); Xyghbh = DBTool.GetStringFromRow(row, "Xyghbh", ""); GoodsId = DBTool.GetIntFromRow(row, "GoodsId", 0); IsInStore = DBTool.GetIntFromRow(row, "IsInStore", 0); State = DBTool.GetIntFromRow(row, "State", 0); IsShelves = DBTool.GetIntFromRow(row, "IsShelves", 0); Note = DBTool.GetStringFromRow(row, "Note", ""); UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime"); Price = DBTool.GetDecimalFromRow(row, "Price", 0); sjjg = DBTool.GetDecimalFromRow(row, "sjjg", 0); Reason = DBTool.GetStringFromRow(row, "Reason", ""); return(true); } return(false); }
public bool Load() { string sql = string.Format("select * from VIPCounterCompany where id={0}", Id); DataSet ds = m_dbo.GetDataSet(sql); if (ds.Tables[0].Rows.Count > 0) { DataRow row = ds.Tables[0].Rows[0]; Id = DBTool.GetIntFromRow(row, "Id", 0); ComId = DBTool.GetIntFromRow(row, "ComId", 0); CounterId = DBTool.GetIntFromRow(row, "CounterId", 0); UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime"); Discount = DBTool.GetDecimalFromRow(row, "Discount", 1); UserId = DBTool.GetIntFromRow(row, "UserId", 0); return(true); } return(false); }
public bool Load() { string sql = string.Format("select * from OrderPayState where OrderId={0}", OrderId); DataSet ds = m_dbo.GetDataSet(sql); if (ds.Tables[0].Rows.Count > 0) { DataRow row = ds.Tables[0].Rows[0]; Id = DBTool.GetIntFromRow(row, "Id", 0); OrderId = DBTool.GetIntFromRow(row, "OrderId", 0); MemberId = DBTool.GetIntFromRow(row, "MemberId", 0); OrderSumMoney = DBTool.GetDecimalFromRow(row, "OrderSumMoney", 0); OrderTime = DBTool.GetDateTimeFromRow(row, "OrderTime"); PayState = DBTool.GetIntFromRow(row, "PayState", 0); IsInner = DBTool.GetIntFromRow(row, "IsInner", 0); PayRemarks = DBTool.GetStringFromRow(row, "PayRemarks", ""); UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime"); return(true); } return(false); }
public bool Load() { string sql = string.Format("select * from TPI_OrderDetail where id={0}", Id); DataSet ds = m_dbo.GetDataSet(sql); if (ds.Tables[0].Rows.Count > 0) { DataRow row = ds.Tables[0].Rows[0]; Id = DBTool.GetIntFromRow(row, "Id", 0); TPI_OrderId = DBTool.GetIntFromRow(row, "TPI_OrderId", 0); GoodsId = DBTool.GetIntFromRow(row, "GoodsId", 0); SkuName = DBTool.GetStringFromRow(row, "SkuName", ""); prDetailId = DBTool.GetStringFromRow(row, "prDetailId", ""); Num = DBTool.GetIntFromRow(row, "Num", 0); AgreementPrice = DBTool.GetDecimalFromRow(row, "AgreementPrice", 0); Price = DBTool.GetDecimalFromRow(row, "Price", 0); Amount = DBTool.GetDecimalFromRow(row, "Amount", 0); status = DBTool.GetIntFromRow(row, "status", 0); InvoiceRequireId = DBTool.GetIntFromRow(row, "InvoiceRequireId", 0); return(true); } return(false); }
public bool Load() { string sql = string.Format("select * from TPI_Category where id={0}", Id); DataSet ds = m_dbo.GetDataSet(sql); if (ds.Tables[0].Rows.Count > 0) { DataRow row = ds.Tables[0].Rows[0]; Id = DBTool.GetIntFromRow(row, "Id", 0); ProjectId = DBTool.GetIntFromRow(row, "ProjectId", 0); Category1 = DBTool.GetStringFromRow(row, "Category1", ""); Category2 = DBTool.GetStringFromRow(row, "Category2", ""); Category = DBTool.GetStringFromRow(row, "Category", ""); CategoryId = DBTool.GetIntFromRow(row, "CategoryId", 0); TypeName = DBTool.GetStringFromRow(row, "TypeName", ""); TypeId = DBTool.GetIntFromRow(row, "TypeId", 0); UpdateTime = DBTool.GetDateTimeFromRow(row, "UpdateTime"); CategoryCode = DBTool.GetStringFromRow(row, "CategoryCode", ""); Discount = DBTool.GetDecimalFromRow(row, "Discount", 0); UserId = DBTool.GetIntFromRow(row, "UserId", 0); return(true); } return(false); }