public ActionResult Create(tblApplicationStatu Model)
 {
     UserId = USession.User_Id;
     try
     {
         Connection.GDsetApplicationStatus(Model.StatusDescription, UserId, "Y");
         Connection.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         Errorlog.ErrorManager.LogError(ex);
         return(View());
     }
 }
        public ActionResult Edit(ApplicationStatusModel Model)
        {
            try
            {
                UserId = USession.User_Id;
                tblApplicationStatu TCtable = Connection.tblApplicationStatus.SingleOrDefault(x => x.StatusCode == Model.StatusCode);


                Connection.GDModifyAllApplicationStatus(Model.StatusDescription, Model.StatusCode, UserId);
                Connection.SaveChanges();

                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                Errorlog.ErrorManager.LogError(ex);
                return(View());
            }
        }
        public ActionResult Edit(long typeId)
        {
            try
            {
                ApplicationStatusModel TModel = new ApplicationStatusModel();

                tblApplicationStatu TCtable = Connection.tblApplicationStatus.SingleOrDefault(x => x.StatusCode == typeId);
                TModel.IsActive = TCtable.IsActive;

                TModel.StatusDescription = TCtable.StatusDescription;
                TModel.StatusCode        = TCtable.StatusCode;

                return(PartialView("EditApplicationStatus", TModel));
            }
            catch (Exception ex)
            {
                Errorlog.ErrorManager.LogError(ex);
                return(View());
            }
        }