Beispiel #1
0
        /// <summary>
        /// 分页获取数据列表
        /// </summary>
        //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
        //{
        //return dal.GetList(PageSize,PageIndex,strWhere);
        //}

        #endregion  BasicMethod
        #region  ExtensionMethod
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(int roleID, int[] rightsID, Eastcom.Model.v_Sys_User_Info uModel)
        {
            Eastcom.Model.Sys_Power_RoleRight roleRightModel = null;
            bool flag = true;

            if (rightsID.Length > 0)
            {
                for (int i = 0; i < rightsID.Length; i++)
                {
                    if (rightsID[i] > 0)
                    {
                        roleRightModel             = new Eastcom.Model.Sys_Power_RoleRight();
                        roleRightModel.CreateTime  = DateTime.Now;
                        roleRightModel.FK_CreateID = uModel.UserID;
                        roleRightModel.FK_RightId  = rightsID[i];
                        roleRightModel.FK_RoleId   = roleID;
                        if (this.Add(roleRightModel) <= 0)
                        {
                            flag = false;
                        }
                    }
                }
            }
            return(flag);
        }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Eastcom.Model.Sys_Power_RoleRight model)
 {
     return(dal.Update(model));
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Eastcom.Model.Sys_Power_RoleRight model)
 {
     return(dal.Add(model));
 }