/// <summary>
 /// 功能说明:保存记录
 /// </summary>
 /// <param name="roleMember"></param>
 /// <returns></returns>
 public bool SaveDal(RoleUser roleMember)
 {
     string insertSql = string.Format(@"INSERT INTO {0} (ID,FK_RoleID,FK_UserID,RecordStatus)
                                        VALUES('{1}','{2}','{3}',{4})", RoleUser.TableName, roleMember.ID, roleMember.FK_RoleID, roleMember.FK_UserID, "1");
     int i = Entity.RunNoQuery(insertSql);
     return i > 0;
 }
Esempio n. 2
0
        /// <summary>
        /// 功能说明:保存记录
        /// </summary>
        /// <param name="roleMember"></param>
        /// <returns></returns>
        public bool SaveDal(RoleUser roleMember)
        {
            string insertSql = string.Format(@"INSERT INTO {0} (ID,FK_RoleID,FK_UserID,RecordStatus) 
                                               VALUES('{1}','{2}','{3}',{4})", RoleUser.TableName, roleMember.ID, roleMember.FK_RoleID, roleMember.FK_UserID, "1");
            int    i         = Entity.RunNoQuery(insertSql);

            return(i > 0);
        }
Esempio n. 3
0
        /// <summary>
        /// 保存角色用户
        /// </summary>
        /// <param name="strRoleIDs">角色,用','分搁</param>
        /// <returns></returns>
        private bool SaveRoleUser(string strRoleIDs)
        {
            bool bFlag = true;

            if (strRoleIDs.Length > 0)
            {
                string[] Ids = strRoleIDs.Split(';');
                for (int i = 0; i < Ids.Length; i++)
                {
                    RoleUser roleUser = new RoleUser();
                    roleUser.FK_UserID = base.ID;
                    roleUser.FK_RoleID = int.Parse(Ids[i]);
                    if (roleUser.Save() == false)
                    {
                        bFlag = false;
                    }
                }
            }
            return(bFlag);
        }
Esempio n. 4
0
 /// <summary>
 /// 保存角色用户
 /// </summary>
 /// <param name="strRoleIDs">角色,用','分搁</param>
 /// <returns></returns>
 private bool SaveRoleUser(string strRoleIDs)
 {
     bool bFlag = true;
     if (strRoleIDs.Length > 0)
     {
         string[] Ids = strRoleIDs.Split(';');
         for (int i = 0; i < Ids.Length; i++)
         {
             RoleUser roleUser = new RoleUser();
             roleUser.FK_UserID = base.ID;
             roleUser.FK_RoleID = int.Parse(Ids[i]);
             if (roleUser.Save() == false)
             {
                 bFlag = false;
             }
         }
     }
     return bFlag;
 }