/// <summary> /// 获得数据列表 /// </summary> public List <NoName.NetShop.Model.SuitSchemeModel> GetModelList(string strWhere) { DataSet ds = dal.GetList(strWhere); List <NoName.NetShop.Model.SuitSchemeModel> modelList = new List <NoName.NetShop.Model.SuitSchemeModel>(); int rowsCount = ds.Tables[0].Rows.Count; if (rowsCount > 0) { NoName.NetShop.Model.SuitSchemeModel model; for (int n = 0; n < rowsCount; n++) { model = new NoName.NetShop.Model.SuitSchemeModel(); if (ds.Tables[0].Rows[n]["SchemeId"].ToString() != "") { model.SchemeId = int.Parse(ds.Tables[0].Rows[n]["SchemeId"].ToString()); } model.SchemeName = ds.Tables[0].Rows[n]["SchemeName"].ToString(); if (ds.Tables[0].Rows[n]["CreateTime"].ToString() != "") { model.CreateTime = DateTime.Parse(ds.Tables[0].Rows[n]["CreateTime"].ToString()); } if (ds.Tables[0].Rows[n]["Status"].ToString() != "") { model.Status = int.Parse(ds.Tables[0].Rows[n]["Status"].ToString()); } model.SchemeDesc = ds.Tables[0].Rows[n]["SchemeDesc"].ToString(); modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(NoName.NetShop.Model.SuitSchemeModel model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(NoName.NetShop.Model.SuitSchemeModel model) { dal.Add(model); }
/// <summary> /// ��������б� /// </summary> public List<NoName.NetShop.Model.SuitSchemeModel> GetModelList(string strWhere) { DataSet ds = dal.GetList(strWhere); List<NoName.NetShop.Model.SuitSchemeModel> modelList = new List<NoName.NetShop.Model.SuitSchemeModel>(); int rowsCount = ds.Tables[0].Rows.Count; if (rowsCount > 0) { NoName.NetShop.Model.SuitSchemeModel model; for (int n = 0; n < rowsCount; n++) { model = new NoName.NetShop.Model.SuitSchemeModel(); if(ds.Tables[0].Rows[n]["SchemeId"].ToString()!="") { model.SchemeId=int.Parse(ds.Tables[0].Rows[n]["SchemeId"].ToString()); } model.SchemeName=ds.Tables[0].Rows[n]["SchemeName"].ToString(); if(ds.Tables[0].Rows[n]["CreateTime"].ToString()!="") { model.CreateTime=DateTime.Parse(ds.Tables[0].Rows[n]["CreateTime"].ToString()); } if(ds.Tables[0].Rows[n]["Status"].ToString()!="") { model.Status=int.Parse(ds.Tables[0].Rows[n]["Status"].ToString()); } model.SchemeDesc=ds.Tables[0].Rows[n]["SchemeDesc"].ToString(); modelList.Add(model); } } return modelList; }