/// <summary> /// 获得数据列表 /// </summary> public List <MobileSoft.Model.HSPR.Tb_HSPR_CommunityCircle> DataTableToList(DataTable dt) { List <MobileSoft.Model.HSPR.Tb_HSPR_CommunityCircle> modelList = new List <MobileSoft.Model.HSPR.Tb_HSPR_CommunityCircle>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { MobileSoft.Model.HSPR.Tb_HSPR_CommunityCircle model; for (int n = 0; n < rowsCount; n++) { model = new MobileSoft.Model.HSPR.Tb_HSPR_CommunityCircle(); model.CircleID = dt.Rows[n]["CircleID"].ToString(); model.CircleName = dt.Rows[n]["CircleName"].ToString(); model.CircleMemo = dt.Rows[n]["CircleMemo"].ToString(); if (dt.Rows[n]["CircleIndex"].ToString() != "") { model.CircleIndex = int.Parse(dt.Rows[n]["CircleIndex"].ToString()); } model.BussName = dt.Rows[n]["BussName"].ToString(); //model.BussID=dt.Rows[n]["BussID"].ToString(); //model.CommID=dt.Rows[n]["CommID"].ToString(); if (dt.Rows[n]["IsDelete"].ToString() != "") { model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public void Update(MobileSoft.Model.HSPR.Tb_HSPR_CommunityCircle model) { dal.Update(model); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(MobileSoft.Model.HSPR.Tb_HSPR_CommunityCircle model) { dal.Add(model); }