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

            if (rowsCount > 0)
            {
                StudentMS.Model.S_R_F model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model            = new StudentMS.Model.S_R_F();
                    model.RoleID     = dt.Rows[n]["RoleID"].ToString();
                    model.FunctionID = dt.Rows[n]["FunctionID"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(StudentMS.Model.S_R_F model)
 {
     return(dal.Update(model));
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(StudentMS.Model.S_R_F model)
 {
     dal.Add(model);
 }