Beispiel #1
0
        public RResult add_or_update_employee(dto_employee employee)
        {
            if (employee == null || ModelState.IsValid == false)
            {
                return(RResult.Fail("", null));
            }

            return(this.service.insert_or_update(employee.Id, employee.Name, employee.Address, employee.Phone));
        }
Beispiel #2
0
        public RResult add_or_update_manager(dto_manager manager)
        {
            if (manager == null || ModelState.IsValid == false)
            {
                return(RResult.Fail("", null));
            }

            return(this.service.insert_or_update(manager.Id, manager.Name, manager.Address, manager.Phone));
        }
 public static RResult Fail(object value)
 {
     return(RResult.Fail("Error", value));
 }