/// <summary> /// 获得数据列表 /// </summary> public List <XHD.Model.ssn_role_emp> DataTableToList(DataTable dt) { List <XHD.Model.ssn_role_emp> modelList = new List <XHD.Model.ssn_role_emp>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { XHD.Model.ssn_role_emp model; for (int n = 0; n < rowsCount; n++) { model = new XHD.Model.ssn_role_emp(); if (dt.Rows[n]["RoleID"] != null && dt.Rows[n]["RoleID"].ToString() != "") { model.RoleID = int.Parse(dt.Rows[n]["RoleID"].ToString()); } if (dt.Rows[n]["empID"] != null && dt.Rows[n]["empID"].ToString() != "") { model.empID = int.Parse(dt.Rows[n]["empID"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(XHD.Model.ssn_role_emp model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(XHD.Model.ssn_role_emp model) { dal.Add(model); }