public object GetSingleGrievance(ParamGetSingleGrievance objgr) { try { var SingleGrievancelist = db.View_MemberAllocation.Where(r => r.UserId == objgr.UserId).FirstOrDefault(); return(SingleGrievancelist); //if (SingleGrievancelist == null) //{ // return new Error() { IsError = true, Message = "Grievance Not Found" }; //} //else //{ // return new Result() { IsSucess = true, ResultData = SingleGrievancelist }; //} } catch (Exception E) { return(new Error() { IsError = true, Message = E.Message }); } }
public object GetSingleGrievance([FromBody] ParamGetSingleGrievance OBJGR) { try { GetSingleGrievanceBL obj = new GetSingleGrievanceBL(); var SingleGR = obj.GetSingleGrievance(OBJGR); return(SingleGR); } catch (Exception ex) { return(new Error() { IsError = true, Message = ex.Message }); } }