public object GetPTAMember(PTAMemberParam obj)
        {
            GETPTAMEMBER ObjTerm    = new GETPTAMEMBER();
            var          GetTermVar = ObjTerm.GetMemberList(obj);

            return(GetTermVar);
        }
Ejemplo n.º 2
0
 public object GetMemberList(PTAMemberParam obj)
 {
     try
     {
         SchoolMainContext db = new ConcreateContext().GetContext(obj.UserName, obj.Password);
         if (db == null)
         {
             return(new Results {
                 IsSuccess = false, Message = "Invalid User"
             });
         }
         else
         {
             var data = db.TBLUSERLOGINs.Where(r => r.UserName == obj.UserName && r.Password == obj.Password).FirstOrDefault();
             if (data == null)
             {
                 return(new Results {
                     IsSuccess = false, Message = "Invalid User"
                 });
             }
             var result = db.View_DisplayPTAMember.ToList();
             for (int i = 0; i < result.Count(); i++)
             {
                 if (result[i].MOBILENO.Length < 10 || result[i].MOBILENO == "0000000000")
                 {
                     result[i].MOBILENO = "Not Available";
                 }
             }
             return(new StudentDetails {
                 IsSuccess = true, StudentInformation = result
             });
         }
     }
     catch (Exception ex)
     {
         return(new Results
         {
             IsSuccess = false,
             Message = ex.Message
         });
     }
 }
        public object GetMemberList(PTAMemberParam obj)
        {
            SchoolMainContext db = new ConcreateContext().GetContext(obj.UserName, obj.Password);

            if (db == null)
            {
                return(new Results {
                    IsSuccess = false, Message = "Invalid User"
                });
            }
            else
            {
                var data      = db.TBLUSERLOGINs.Where(r => r.UserName == obj.UserName && r.Password == obj.Password).FirstOrDefault();
                int StudentId = Convert.ToInt32(data.EmpCode);
                var result    = db.View_DisplayStudentDetails.Where(r => r.STUDENTID == StudentId).FirstOrDefault();
                return(new StudentDetails {
                    IsSuccess = true, StudentInformation = result
                });
            }
        }
 public object GetPTAMember(PTAMemberParam obj)
 {
     return(null);
 }