Beispiel #1
0
        public List <TSGLXT.Model.GLB> DataViewDetaiList(DataTable dt)
        {
            List <TSGLXT.Model.GLB> modelList = new List <TSGLXT.Model.GLB>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                TSGLXT.Model.GLB model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new TSGLXT.Model.GLB();
                    if (dt.Rows[n]["ADYNAME"] != null && dt.Rows[n]["ADYNAME"].ToString() != "")
                    {
                        model.ADYNAME = dt.Rows[n]["ADYNAME"].ToString();
                    }
                    if (dt.Rows[n]["ADUSERNAME"] != null && dt.Rows[n]["ADUSERNAME"].ToString() != "")
                    {
                        model.ADUSERNAME = dt.Rows[n]["ADUSERNAME"].ToString();
                    }
                    if (dt.Rows[n]["SKID"] != null && dt.Rows[n]["SKID"].ToString() != "")
                    {
                        model.SKID = dt.Rows[n]["SKID"].ToString();
                    }
                    if (dt.Rows[n]["ADSEX"] != null && dt.Rows[n]["ADSEX"].ToString() != "")
                    {
                        model.ADSEX = dt.Rows[n]["ADSEX"].ToString();
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(TSGLXT.Model.GLB model)
 {
     return(dal.Update(model));
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(TSGLXT.Model.GLB model)
 {
     return(dal.Add(model));
 }