예제 #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Dianda.Model.NEWS_USERID_COLUMNSID> GetModelList(string strWhere)
        {
            DataSet ds = dal.GetList(strWhere);
            List <Dianda.Model.NEWS_USERID_COLUMNSID> modelList = new List <Dianda.Model.NEWS_USERID_COLUMNSID>();
            int rowsCount = ds.Tables[0].Rows.Count;

            if (rowsCount > 0)
            {
                Dianda.Model.NEWS_USERID_COLUMNSID model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model           = new Dianda.Model.NEWS_USERID_COLUMNSID();
                    model.ID        = ds.Tables[0].Rows[n]["ID"].ToString();
                    model.UserID    = ds.Tables[0].Rows[n]["UserID"].ToString();
                    model.ColumnsID = ds.Tables[0].Rows[n]["ColumnsID"].ToString();
                    if (ds.Tables[0].Rows[n]["ISShenHe"].ToString() != "")
                    {
                        model.ISShenHe = int.Parse(ds.Tables[0].Rows[n]["ISShenHe"].ToString());
                    }
                    if (ds.Tables[0].Rows[n]["ISAdd"].ToString() != "")
                    {
                        model.ISAdd = int.Parse(ds.Tables[0].Rows[n]["ISAdd"].ToString());
                    }
                    if (ds.Tables[0].Rows[n]["DATETIME"].ToString() != "")
                    {
                        model.DATETIME = DateTime.Parse(ds.Tables[0].Rows[n]["DATETIME"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
예제 #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(Dianda.Model.NEWS_USERID_COLUMNSID model)
 {
     dal.Update(model);
 }
예제 #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(Dianda.Model.NEWS_USERID_COLUMNSID model)
 {
     dal.Add(model);
 }