Beispiel #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.HSPR.Tb_HSPR_CommFriend> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.HSPR.Tb_HSPR_CommFriend> modelList = new List <MobileSoft.Model.HSPR.Tb_HSPR_CommFriend>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.HSPR.Tb_HSPR_CommFriend model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model              = new MobileSoft.Model.HSPR.Tb_HSPR_CommFriend();
                    model.FriendCode   = dt.Rows[n]["FriendCode"].ToString();
                    model.CustId       = dt.Rows[n]["CustId"].ToString();
                    model.FriendCustId = dt.Rows[n]["FriendCustId"].ToString();
                    model.RoomSign     = dt.Rows[n]["RoomSign"].ToString();
                    if (dt.Rows[n]["IsDelete"].ToString() != "")
                    {
                        model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.HSPR.Tb_HSPR_CommFriend model)
 {
     dal.Update(model);
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.HSPR.Tb_HSPR_CommFriend model)
 {
     dal.Add(model);
 }