Exemple #1
0
        //override
        public static T_User AddT_User(string username, string password, int role_id, bool status, DateTime create_date)
        {
            Models.T_User t_User = new Models.T_User();

            TransData_AddT_User(username, password, role_id, status, create_date, t_User);

            return(T_UserService.AddT_User(t_User));
        }
Exemple #2
0
        //overload
        public static void ModifyT_User(int user_id, string username, string password, int role_id, bool status, DateTime create_date)
        {
            Models.T_User t_User = new Models.T_User();
            //PK
            t_User.Username = Username;
            TransData_ModifyT_User(user_id, username, password, role_id, status, create_date, t_User);

            T_UserService.ModifyT_User(t_User);
        }
Exemple #3
0
        //Trans Add Method
        private static void TransData_AddT_User(int user_id, string password, int role_id, bool status, DateTime create_date, Models.T_User t_User)
        {
            try{ if (user_id.ToString() == "0001-1-1 0:00:00")
                 {
                     t_User.User_id = null;
                 }
                 else
                 {
                     t_User.User_id = user_id;
                 } }catch {}

            try{ if (password.ToString() == "0001-1-1 0:00:00")
                 {
                     t_User.Password = null;
                 }
                 else
                 {
                     t_User.Password = password;
                 } }catch {}
            try{ if (role_id.ToString() == "0001-1-1 0:00:00")
                 {
                     t_User.Role_id = null;
                 }
                 else
                 {
                     t_User.Role_id = role_id;
                 } }catch {}
            try{ if (status.ToString() == "0001-1-1 0:00:00")
                 {
                     t_User.Status = null;
                 }
                 else
                 {
                     t_User.Status = status;
                 } }catch {}
            try{ if (create_date.ToString() == "0001-1-1 0:00:00")
                 {
                     t_User.Create_date = null;
                 }
                 else
                 {
                     t_User.Create_date = create_date;
                 } }catch {}
        }