public ActionResult SetTime(DeterminationLevelResponseDto model)
        {
            var ecId = WebUserInfo.SiteId;
            var languageDeterminationLevelRequest = _db.Set <LanguageDeterminationLevelRequest>().Include("Student.User.Person").FirstOrDefault(ldlr => ldlr.Id == model.Id && ldlr.EducationalCenterId == ecId);

            if (languageDeterminationLevelRequest == null)
            {
                return(Json("داده ای یافت نشد", JsonRequestBehavior.AllowGet));
            }

            languageDeterminationLevelRequest.SetJalaliDay  = model.Day;
            languageDeterminationLevelRequest.SetJalaliHour = model.Hour;

            var time    = model.Hour.Split(':');
            var setDate = model.Day.ToGeorgianDateTimeFromJalali(Convert.ToDouble(time[0]), Convert.ToDouble(time[1]));

            languageDeterminationLevelRequest.SetDate          = setDate;
            languageDeterminationLevelRequest.Setter           = WebUserInfo.UserId.ToString();
            languageDeterminationLevelRequest.SetJalaliDayName = model.Day.ToJalaliDateName();
            _db.Entry(languageDeterminationLevelRequest).State = EntityState.Modified;
            _db.SaveChanges();
            return(Json(new { success = true, message = "ثبت موفق" }, JsonRequestBehavior.AllowGet));
        }
        public ActionResult SetTime(int id)
        {
            var ecId = WebUserInfo.SiteId;
            var req  = _db.Set <LanguageDeterminationLevelRequest>()
                       .Include("Student.User.Person")
                       .FirstOrDefault(ldlr => ldlr.Id == id && ldlr.EducationalCenterId == ecId);

            if (req == null)
            {
                return(View("NotFound"));
            }

            var determinationLevelResponse = new DeterminationLevelResponseDto
            {
                Day                = req.SetJalaliDay,
                Hour               = req.SetJalaliHour,
                StudentFullName    = req.Student.User.Person.FirstName + " " + req.Student.User.Person.LastName,
                PhoneNo            = req.Student.User.Person.MobileNo,
                StudentPereferDate = req.PreferJalaliDayName + " " + req.PreferJalaliDay + " ساعت " + req.PreferJalaliHour,
                Id = id
            };

            return(View(determinationLevelResponse));
        }