예제 #1
0
        //override
        public static T_Role AddT_Role(string role_name, bool role_pris)
        {
            Models.T_Role t_Role = new Models.T_Role();

            TransData_AddT_Role(role_name, role_pris, t_Role);

            return(T_RoleService.AddT_Role(t_Role));
        }
예제 #2
0
        //override
        public static T_Role AddT_Role(int role_id, bool role_pris)
        {
            Models.T_Role t_Role = new Models.T_Role();

            TransData_AddT_Role(role_id, role_pris, t_Role);

            return(T_RoleService.AddT_Role(t_Role));
        }
예제 #3
0
        //overload
        public static void ModifyT_Role(int Id, string role_name, bool role_pris)
        {
            Models.T_Role t_Role = new Models.T_Role();
            //PK
            t_Role.Id = Id;
            TransData_ModifyT_Role(Id, role_name, role_pris, t_Role);

            T_RoleService.ModifyT_Role(t_Role);
        }
예제 #4
0
 //Trans Add Method
 private static void TransData_AddT_Role(string role_name, bool role_pris, Models.T_Role t_Role)
 {
     try{ if (role_name.ToString() == "0001-1-1 0:00:00")
          {
              t_Role.Role_name = null;
          }
          else
          {
              t_Role.Role_name = role_name;
          } }catch {}
     try{ if (role_pris.ToString() == "0001-1-1 0:00:00")
          {
              t_Role.Role_pris = null;
          }
          else
          {
              t_Role.Role_pris = role_pris;
          } }catch {}
 }
예제 #5
0
        //Trans Add Method
        private static void TransData_AddT_Role(int role_id, bool role_pris, Models.T_Role t_Role)
        {
            try{ if (role_id.ToString() == "0001-1-1 0:00:00")
                 {
                     t_Role.Role_id = null;
                 }
                 else
                 {
                     t_Role.Role_id = role_id;
                 } }catch {}

            try{ if (role_pris.ToString() == "0001-1-1 0:00:00")
                 {
                     t_Role.Role_pris = null;
                 }
                 else
                 {
                     t_Role.Role_pris = role_pris;
                 } }catch {}
        }