public object GetSingleStaffValue(ParamGetSingleStaffInfo objstaff)
 {
     try
     {
         var StaffData = objcontext.ViewAllStaffInfoes.Where(r => r.UserId == objstaff.UserId).FirstOrDefault();
         if (StaffData == null)
         {
             return(new Error {
                 IsError = true, Message = "Staff Data Not Found"
             });
         }
         else
         {
             //return new Result { IsSucess = true, ResultData = StaffData };
             return(StaffData);
         }
     }
     catch (Exception ex)
     {
         return(new Error()
         {
             IsError = true, Message = ex.Message
         });
     }
 }
Exemplo n.º 2
0
 public object GetSingleStaff([FromBody] ParamGetSingleStaffInfo obj)
 {
     try
     {
         GetSingleStaffData objstaff = new GetSingleStaffData();
         var result = objstaff.GetSingleStaffValue(obj);
         return(result);
     }
     catch (Exception e)
     {
         return(new Error()
         {
             IsError = true, Message = e.Message
         });
     }
 }
Exemplo n.º 3
0
 public object GetStaffInfo([FromBody] ParamGetSingleStaffInfo objstaff)
 {
     try
     {
         GetAllStaffInfo obj       = new GetAllStaffInfo();
         var             status    = objstaff.DisplayStatus;
         var             StaffInfo = obj.GetStaffInfo(status);
         return(StaffInfo);
     }
     catch (Exception ex)
     {
         return(new Error()
         {
             IsError = true, Message = ex.Message
         });
     }
 }