public ActionResult ViewSchema(string id = "")
        {
            Logger.Debug("Inside Job Controller- View Job");
            try
            {
                if (Session["OrganizationGUID"] != null)
                {
                    DropdownValues();
                    Jschema = new JobForm();
                    jobPageList.Clear();
                    jobItemList.Clear();
                    Jschema = _IJobSchemaRepository.JobSchemaDetails(new Guid(id));
                    ViewBag.JobName = Jschema.FriendlyName;
                    JobFormModel jobFormModel = new JavaScriptSerializer().Deserialize<JobFormModel>(Jschema.JobForm1);
                    jobPageList = jobFormModel.JobPageList;
                    jobItemList = jobFormModel.JobItemList;

                    JobSchemaEditView jobschemaedit = new JobSchemaEditView();
                    jobschemaedit.JobPageSchemaModel = jobPageList;
                    jobschemaedit.JobPageItemModel = jobItemList;
                    jobschemaedit.JobSchemaModel = null;

                    return View(jobschemaedit);
                }
                else
                {
                    return RedirectToAction("SessionTimeOut", "User");
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex.Message);
                if (Session["UserType"] != null && Session["UserType"].ToString() != "ENT_A")
                    return RedirectToAction("../JobStatus/Index");
                else
                    return RedirectToAction("Index");
            }
        }
        public ActionResult Edit(string id)
        {
            if (Session["OrganizationGUID"] != null)
            {
                DropdownValues();
                Jschema = new JobForm();
                jobPageList.Clear();
                jobItemList.Clear();
                Jschema = _IJobSchemaRepository.JobSchemaDetails(new Guid(id));
                JobSchemaModel jobschemamodel = new JobSchemaModel();
                jobschemamodel.JobLogicalID = Jschema.JobFormGUID.ToString();
                jobschemamodel.OrganizationGUID = Jschema.OrganizationGUID != null ? Jschema.OrganizationGUID.ToString() : Guid.Empty.ToString();
                jobschemamodel.LastModifiedBy = Jschema.LastModifiedBy != null ? Jschema.LastModifiedBy.ToString() : Guid.Empty.ToString();
                jobschemamodel.LastModifiedDate = Convert.ToDateTime(Jschema.LastModifiedDate);
                jobschemamodel.JobSchemaName = Jschema.FriendlyName;
                // jobschemamodel.EstimatedDuration = Jschema.EstimatedDuration;
                // jobschemamodel.GroupCode = Jschema.GroupCode.ToString();
                jobschemamodel.IsDeleted = Convert.ToBoolean(Jschema.IsDeleted);
                jobschemamodel.JobClass = Jschema.JobClass;

                ViewBag.JobLogicalID = Jschema.JobFormGUID.ToString();
                ViewData["JobName"] = Jschema.FriendlyName;
                ViewData["JobClass"] = Jschema.JobClass == null ? 0 : Jschema.JobClass;// Jschema.Description;
                ViewData["GroupCode"] = "";// Jschema.GroupCode;
                ViewData["GroupName"] = "";// _IGroupRepository.GetGroupByID(Jschema.GroupCode).Name;
                ViewData["EstimatedDuration"] = "";// Jschema.EstimatedDuration;
                ViewBag.BasicDetails = "true";


                JobFormModel jobFormModel = new JavaScriptSerializer().Deserialize<JobFormModel>(Jschema.JobForm1);
                jobPageList = jobFormModel.JobPageList;
                jobItemList = jobFormModel.JobItemList;

                JobSchemaEditView jobschemaedit = new JobSchemaEditView();
                jobschemaedit.JobPageSchemaModel = jobPageList;
                jobschemaedit.JobPageItemModel = jobItemList;
                jobschemaedit.JobSchemaModel = jobschemamodel;

                return View(jobschemaedit);
            }
            else
            {
                return RedirectToAction("SessionTimeOut", "User");
            }
        }