Пример #1
0
        public bool SaveCheckedUserRole(string vUserGuid, string idstr)
        {
            bool     success = false;
            MyDataOp mdo     = new MyDataOp();
            string   sSql    = string.Format("update Ac_UserRole set btWrite = 'True' where vUserGuid = '{0}' and iMenuId in ({1})", vUserGuid, idstr);

            success = mdo.ExecuteCommand(sSql);

            return(success);
        }
Пример #2
0
        public bool Delete_Data(object[] values)
        {
            bool     success = false;
            MyDataOp mdo     = new MyDataOp();
            string   sql     = string.Format("delete from {0} where {1} = '{2}'", values[0], values[1], values[2]);

            success = mdo.ExecuteCommand(sql);

            return(success);
        }
Пример #3
0
        public bool UnAllCheckUserRole(string vUserGuid)
        {
            bool     success = false;
            MyDataOp mdo     = new MyDataOp();
            string   sSql    = string.Format("update Ac_UserRole set btWrite = 'False' where vUserGuid = '{0}'", vUserGuid);

            success = mdo.ExecuteCommand(sSql);

            return(success);
        }
Пример #4
0
        public bool CreateUserRole(string vUserGuid)
        {
            bool     success = false;
            MyDataOp mdo     = new MyDataOp();
            string   sSql    = string.Format("insert into Ac_UserRole(vUserGuid,iMenuId) select '{0}',id from Ac_Menus", vUserGuid);

            success = mdo.ExecuteCommand(sSql);

            return(success);
        }
Пример #5
0
        public bool Delete_Ac_Users(string vUserGuid)
        {
            bool     success = false;
            MyDataOp mdo     = new MyDataOp();
            string   sSql    = string.Format("delete from User where Guid = '{0}'", vUserGuid);

            success = mdo.ExecuteCommand(sSql);

            return(success);
        }
Пример #6
0
        public bool Insert_Ac_Users(object[] values)
        {
            bool     success = false;
            MyDataOp mdo     = new MyDataOp();
            string   sSql    = string.Format("insert Ac_Users(vUserName, vPassWord, vUserGuid, vUserRole, dPwdChgDate) values('{0}','{1}','{2}','{3}','{4}')", values[0], values[1], values[2], values[3], values[4]);

            success = mdo.ExecuteCommand(sSql);

            return(success);
        }
Пример #7
0
        public bool ChangeUserPassword(string sUserGuid, string sNewPwd)
        {
            bool     blSuccess = false;
            MyDataOp mdo       = new MyDataOp();
            string   sql       = string.Format("update [User] set PassWord = '******',PwdChgDate=GetDate() where GUID = '{1}'", sUserGuid, sNewPwd);

            blSuccess = mdo.ExecuteCommand(sql);

            return(blSuccess);
        }