public List <ManpowerStatusAllDTO> GetAllStatus(ManpowerStatusDTO objBranch) { List <ManpowerStatusAllDTO> site = new List <ManpowerStatusAllDTO>(); using (DbLayer dbLayer = new DbLayer()) { SqlCommand SqlCmd = new SqlCommand("spSelectAttendanceStatusMaster"); SqlCmd.CommandType = CommandType.StoredProcedure; SqlCmd.Parameters.AddWithValue("@ActionBy", objBranch.ActionBy); site = dbLayer.GetEntityList <ManpowerStatusAllDTO>(SqlCmd); } return(site); }
public HttpResponseMessage getAllStatus(ManpowerStatusDTO status) { HttpResponseMessage message; try { // ManpowerAttendanceDAL dal = new ManpowerAttendanceDAL(); var dynObj = new { result = _obj.GetAllStatus(status) }; message = Request.CreateResponse(HttpStatusCode.OK, dynObj); } catch (Exception ex) { message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "Something wrong. Try Again!" }); ErrorLog.CreateErrorMessage(ex, "ManpowerAttendance", "getAllStatus"); } return(message); }