public object GetMemberGrievance([FromBody] ParamGetMyGrievance objmy)
 {
     try
     {
         GetMyGrievanceBL obj = new GetMyGrievanceBL();
         var mygrievance      = obj.GetMember(objmy);
         return(mygrievance);
     }
     catch (Exception e)
     {
         return(new Error()
         {
             IsError = true, Message = e.Message
         });
     }
 }
Exemple #2
0
        public object GetMember(ParamGetMyGrievance obj)
        {
            var id     = Convert.ToString(obj.StudentCode);
            var userid = Convert.ToInt32(obj.Userid);

            if (id == "0")
            {
                return(new Error()
                {
                    IsError = true, Message = "UserCode Not Found"
                });
            }
            try
            {
                tbl_member s           = new tbl_member();
                var        MyGrievance = db.tbl_member.Where(r => r.UserId == userid).SingleOrDefault();
                var        type        = MyGrievance.griType;
                var        list        = db.tbl_complaintdetails.Where(r => r.GrievanceType == type).ToList();
                if (MyGrievance == null)
                {
                    return(new Error()
                    {
                        IsError = true, Message = "My Grievance Not Found"
                    });
                }
                else
                {
                    return(new Result()
                    {
                        IsSucess = true, ResultData = list
                    });
                }
            }
            catch (Exception E)
            {
                return(new Error()
                {
                    IsError = true, Message = E.Message
                });
            }
        }
Exemple #3
0
        public object GetMyGrievance(ParamGetMyGrievance obj)
        {
            var id = Convert.ToString(obj.StudentCode);

            if (id == "0")
            {
                return(new Error()
                {
                    IsError = true, Message = "UserCode Not Found"
                });
            }
            try
            {
                var MyGrievance = db.ViewGetMyGrievances.Where(r => r.StackholderID == id).ToList();

                if (MyGrievance == null)
                {
                    return(new Error()
                    {
                        IsError = true, Message = "My Grievance Not Found"
                    });
                }
                else
                {
                    return(new Result()
                    {
                        IsSucess = true, ResultData = MyGrievance
                    });
                }
            }
            catch (Exception E)
            {
                return(new Error()
                {
                    IsError = true, Message = E.Message
                });
            }
        }