Ejemplo n.º 1
0
        public ActionResult GetData(int BossId = 0, int DesignationId = 0, string withoutBoss = "")
        {
            IList <Person> persons = _personRepo.GetData(BossId, DesignationId, withoutBoss);

            return(Json(new { data = (from P in persons
                                      select new
                {
                    PersonId = P.PersonId,
                    Name = P.Name,
                    FatherName = P.FatherName,
                    Gender = P.Gender,
                    CNIC = P.CNIC,
                    DOB = P.DOB,
                    DOBFormatted = P.DOBFormatted,
                    CNICIssueDateFormatted = P.CNICIssueDateFormatted,
                    P.MobileBusiness,
                    P.CurrentAddress,
                    P.MobilePersonal,
                    P.PermanentAddress,
                    P.Qualification,
                    Designation = P.Designation.Name
                }) }, JsonRequestBehavior.AllowGet));
        }