public object GetSingleGrievanace(ParamMember obj) { GRContext context = new GRContext(); try { var grievance = context.ViewGetMemberInfoes.Where(r => r.UserId == obj.UserId).FirstOrDefault(); if (grievance == null) { return(new Result { IsSucess = false, ResultData = "Record Not Found" }); } else { return(new Result { IsSucess = true, ResultData = grievance }); } } catch (Exception ex) { return(new Error { IsError = true, Message = ex.Message }); } }
public object GetSingleGrievanace([FromBody] ParamMember obj) { //get single member info try { CheckUsernamePassword chkUserPassword = new CheckUsernamePassword(); var chkUser = chkUserPassword.ValidateUsernamePassword(obj.UserId, obj.Password); if (chkUser) { MemberBusiness MBusiness = new MemberBusiness(); var grievance = MBusiness.GetSingleGrievanace(obj); return(grievance); } else { return(new Result { IsSucess = false, ResultData = "Username or Password Is Invalid." }); } } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }
public object SetIsLiveForMember([FromBody] ParamMember PM) { try { SetMemberStatus SM = new SetMemberStatus(); var Status = SM.SetIsLiveStatusMember(PM); return(Status); } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }
public object SetIsLiveStatusMember(ParamMember PM) { try { tbl_user objTBLUSER = gc.tbl_user.Where(r => r.UserId == PM.UserId && r.type == "Member" && r.Display == 1).FirstOrDefault(); if (objTBLUSER == null) { return(new Error() { IsError = true, Message = "Incorrect Code !" }); } else { if (objTBLUSER.Islive == 1) { objTBLUSER.Islive = 0; } else { objTBLUSER.Islive = 1; } //objTBLUSER.code = PM.Code; gc.SaveChanges(); return(new Result() { IsSucess = true, ResultData = "Status Updated Sucessfully!" }); } } catch (Exception e) { return(new Error() { IsError = true, Message = e.Message }); } }