/// <summary>
 /// Handles the KeyDown event of the Window control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="KeyEventArgs"/> instance containing the event data.</param>
 private void Window_KeyDown(object sender, KeyEventArgs e)
 {
     try
     {
         newGameViewModel.KeyDown(e, ref timer);
     }
     catch (Exception error)
     {
         errorLogViewModel.LogError(error);
     }
 }
Exemple #2
0
 /// <summary>
 /// Handles the Click event of the NewGameButton control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs"/> instance containing the event data.</param>
 private void NewGameButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         NewGameWindow childWindow = new NewGameWindow();
         this.Close();
         childWindow.ShowDialog();
     }
     catch (Exception error)
     {
         errorLogViewModel.LogError(error);
     }
 }
Exemple #3
0
        public ActionResult Delete(int?id)
        {
            try
            {
                if (id == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }
                LifeCyclesViewModel lifecyclesviewmodel = new LifeCyclesViewModel();
                var lifecycle = lifecyclesviewmodel.FindLifeCycles(id);
                TempData["daId"] = lifecycle.daid;

                if (lifecycle.LifeCycleID == 0)
                {
                    return(HttpNotFound());
                }
                return(View(lifecycle));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #4
0
 public ActionResult Edit(AppVersionViewModel appVersionViewModel)
 {
     try
     {
         if (ModelState.IsValid)
         {
             //bool isduplicate = false;
             //isduplicate = appVersionViewModel.CheckDuplicate(appVersionViewModel);
             //if(isduplicate)
             //{
             //return View("Edit", "appVersionViewModel");
             //}
             appVersionViewModel.AppVersion = appVersionViewModel.AppVersion.Trim();
             appVersionViewModel.UpdateAppVersion(appVersionViewModel);
             return(RedirectToAction("Index", "AppVersion"));
         }
         return(View(appVersionViewModel));
         //return View();
     }
     catch (Exception ex)
     {
         errorlogviewmodel = new ErrorLogViewModel();
         errorlogviewmodel.LogError(ex);
         return(View("Error"));
     }
 }
Exemple #5
0
        public ActionResult Index(ProductsViewModel prodviewmodel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    prodviewmodel.ReqReference = prodviewmodel.ReqReference == null ? "" : prodviewmodel.ReqReference.Trim();
                    prodviewmodel.AddProduct(prodviewmodel);
                    TempData["daId"] = prodviewmodel.daid;
                    prodviewmodel.GetScreenAccessRights("Products");
                    return(RedirectToAction("Index", "Products"));
                }
                else
                {
                    TempData["ErrorMsg"] = "Requirement Reference Required";
                    //ModelState.AddModelError("ReqReference", "Requirement Reference required");
                    prodviewmodel.GetScreenAccessRights("Products");
                    return(RedirectToAction("Index", prodviewmodel));
                }

                //return View("Index");
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #6
0
        // GET: Prod Edit
        public ActionResult Edit(int?id)
        {
            try
            {
                if (id == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                ProductsViewModel prodviewmodel = new ProductsViewModel();
                prodviewmodel    = prodviewmodel.FindProd(id);
                TempData["daId"] = prodviewmodel.daid;


                if (prodviewmodel.ProductID == 0)
                {
                    return(HttpNotFound());
                }
                return(View(prodviewmodel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #7
0
        public virtual ActionResult Index()
        {
            try
            {
                loginViewModel           = new LoginViewModel();
                loginViewModel.UserTypes = new List <UserType>
                {
                    new UserType {
                        ID = "1", Type = "Internal"
                    },
                    new UserType {
                        ID = "2", Type = "External"
                    }
                };

                ViewData["UserTypeID"] = "1";
                return(View(loginViewModel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #8
0
        public ActionResult Delete(int?id)
        {
            try
            {
                if (id == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                ModeTypeViewModel modetypeviewmodel = new ModeTypeViewModel();
                var modetype = modetypeviewmodel.FindModeTypes(id);
                TempData["daId"] = modetype.daid;

                if (modetype.ModeTypeID == 0)
                {
                    return(HttpNotFound());
                }
                return(View(modetype));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #9
0
        //GET user/Edit/5
        public ActionResult Edit(int?sourceId)
        {
            try
            {
                if (sourceId == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                SourceViewModel sourceViewModel = new SourceViewModel();
                var             source          = sourceViewModel.FindSource(sourceId);
                TempData["daID"] = source.DAID;

                if (source.sourceID == 0)
                {
                    return(HttpNotFound());
                }
                return(View(source));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #10
0
        public ActionResult Index(int?id)
        {
            try
            {
                if (id == null)
                {
                    id = (int)TempData["daID"];
                }

                SourceViewModel sourceViewModel = new SourceViewModel();
                //sourceViewModel.SourceList= sourceViewModel.GetSourceDetails((int)id);
                sourceViewModel.GetSourceDetails((int)id);
                sourceViewModel.GetScreenAccessRights("Source Details");
                CommonFunctions comfuns = new CommonFunctions();

                var da = comfuns.FindDA((int)id);
                sourceViewModel.DAID     = (int)id;
                sourceViewModel.DAName   = da.DAName;
                sourceViewModel.ModuleId = da.ModuleId;
                TempData["daId"]         = sourceViewModel.DAID;

                return(View(sourceViewModel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #11
0
 public ActionResult Edit(SourceViewModel sourceViewModel)
 {
     try
     {
         if (ModelState.IsValid)
         {
             bool isduplicate = false;
             sourceViewModel.sourceDesc = sourceViewModel.sourceDesc.Trim();
             isduplicate = sourceViewModel.CheckDuplicate(sourceViewModel);
             if (isduplicate)
             {
                 ModelState.AddModelError("sourceDesc", "Source already exists");
                 return(View("Edit", sourceViewModel));
             }
             sourceViewModel.UpdateSource(sourceViewModel);
             return(RedirectToAction("Index", "Source"));
         }
         return(View());
     }
     catch (Exception ex)
     {
         errorlogviewmodel = new ErrorLogViewModel();
         errorlogviewmodel.LogError(ex);
         return(View("Error"));
     }
 }
Exemple #12
0
        // GET: Application/Delete/5
        public ActionResult Delete(int?id)
        {
            try
            {
                if (id == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                ApplicationViewModel applicationViewModel = new ApplicationViewModel();
                applicationViewModel  = applicationViewModel.FindApplication(id);
                TempData["ProjectId"] = applicationViewModel.ProjectID;


                if (applicationViewModel.ApplicationID == 0)
                {
                    return(HttpNotFound());
                }
                return(View(applicationViewModel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #13
0
        public ActionResult Edit(ApplicationViewModel applicationViewModel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    bool isduplicate = false;
                    applicationViewModel.ApplicationName = applicationViewModel.ApplicationName.Trim();
                    isduplicate = applicationViewModel.CheckDuplicate(applicationViewModel);
                    if (isduplicate)
                    {
                        ModelState.AddModelError("ApplicationName", "Application already exists");
                        applicationViewModel.GetVersions(applicationViewModel);
                        applicationViewModel.BankTypeList = applicationViewModel.GetEnumList <ApplicationViewModel.BankTypes>();
                        return(View("Edit", applicationViewModel));
                    }

                    applicationViewModel.UpdateApplication(applicationViewModel);
                    return(RedirectToAction("Index", "Application"));
                }
                applicationViewModel.GetVersions(applicationViewModel);
                applicationViewModel.BankTypeList = applicationViewModel.GetEnumList <ApplicationViewModel.BankTypes>();
                return(View(applicationViewModel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #14
0
        //GET: Module/Delete/5
        public ActionResult Delete(int?Id)
        {
            try
            {
                if (Id == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                ModuleViewModel modViewModel = new ModuleViewModel();
                //var mod = modViewModel.FindMod((int)modId);
                modViewModel = modViewModel.FindMod((int)Id);
                TempData["ApplicationId"] = modViewModel.ApplicationID;

                if (modViewModel.ModuleId == 0)
                {
                    return(HttpNotFound());
                }
                return(View(modViewModel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #15
0
        public ActionResult Edit(ModuleViewModel modVM)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    bool isduplicate = false;
                    modVM.ModuleName = modVM.ModuleName.Trim();
                    isduplicate      = modVM.CheckDuplicate(modVM);
                    if (isduplicate)
                    {
                        ModelState.AddModelError("ModuleName", "Module already exists");
                        return(View("Edit", modVM));
                    }
                    //ModuleViewModel modViewModel = new ModuleViewModel();
                    modVM.UpdateMod(modVM);

                    return(RedirectToAction("Index", "Module"));
                }
                return(View());
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #16
0
        public ActionResult Index(int?id)
        {
            try
            {
                if (id == null)
                {
                    id = (int)TempData["daId"];
                }

                ModeTypeViewModel modetypeviewmodel = new ModeTypeViewModel();
                modetypeviewmodel = modetypeviewmodel.GetlModeTypes(id);

                CommonFunctions comfuns = new CommonFunctions();

                var da = comfuns.FindDA((int)id);
                modetypeviewmodel.daid     = (int)id;
                modetypeviewmodel.daName   = da.DAName;
                modetypeviewmodel.ModuleId = da.ModuleId;
                TempData["daId"]           = modetypeviewmodel.daid;

                return(View(modetypeviewmodel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #17
0
 public ActionResult Edit(ModeTypeViewModel modetypeviewmodel)
 {
     try
     {
         if (ModelState.IsValid)
         {
             bool isduplicate = false;
             modetypeviewmodel.ModeTypeDesc = modetypeviewmodel.ModeTypeDesc.Trim();
             isduplicate = modetypeviewmodel.CheckDuplicate(modetypeviewmodel);
             if (isduplicate)
             {
                 ModelState.AddModelError("ModeTypeDesc", "Mode already exists");
                 return(View("Edit", modetypeviewmodel));
             }
             modetypeviewmodel.UpdateModeType(modetypeviewmodel);
             return(RedirectToAction("Index", "ModeType"));
         }
         return(View());
     }
     catch (Exception ex)
     {
         errorlogviewmodel = new ErrorLogViewModel();
         errorlogviewmodel.LogError(ex);
         return(View("Error"));
     }
 }
Exemple #18
0
        //GET user/Edit/5
        public ActionResult Edit(int?periodTypeId)
        {
            try
            {
                if (periodTypeId == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                PeriodTypeViewModel periodTypeViewModel = new PeriodTypeViewModel();
                var periodType = periodTypeViewModel.FindPeriodType(periodTypeId);

                if (periodType == null)
                {
                    return(HttpNotFound());
                }
                return(View(periodType));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #19
0
        public ActionResult Delete(ModeTypeViewModel modetypeviewmodel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    modetypeviewmodel.DeleteModeType(modetypeviewmodel);
                    modetypeviewmodel.GetlModeTypes(modetypeviewmodel.daid);
                }
                return(RedirectToAction("Index", "ModeType"));
            }
            catch (DbUpdateException exception)
            {
                //Log Exception
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(exception);

                //Check for Referential Integrity
                if (((System.Data.SqlClient.SqlException)exception.InnerException.InnerException).Number == 547)
                {
                    return(View("Error_ReferentialIntegrity"));
                }

                return(View("Error"));
            }

            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
        public ActionResult Edit(int?id)
        {
            try
            {
                if (id == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                TransactionsViewModel transviewmodel = new TransactionsViewModel();
                transviewmodel   = transviewmodel.FindTrans(id);
                TempData["daId"] = transviewmodel.daId;

                if (transviewmodel.TransactionSeq == 0)
                {
                    return(HttpNotFound());
                }
                return(View(transviewmodel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #21
0
        public ActionResult Delete(ProductsViewModel prodviewmodel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    prodviewmodel.DeleteProd(prodviewmodel);
                }
                return(RedirectToAction("Index", "Products"));
            }
            catch (DbUpdateException exception)
            {
                //Log Exception
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(exception);

                //Check for Referential Integrity
                if (((System.Data.SqlClient.SqlException)exception.InnerException.InnerException).Number == 547)
                {
                    return(View("Error_ReferentialIntegrity"));
                }

                return(View("Error"));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
 public ActionResult Edit(TransactionsViewModel transviewmodel)
 {
     try
     {
         if (ModelState.IsValid)
         {
             transviewmodel.HighLevelTxnDesc = transviewmodel.HighLevelTxnDesc.Trim();
             if (transviewmodel.ReqReference != null)
             {
                 transviewmodel.ReqReference = transviewmodel.ReqReference.Trim();
             }
             bool isduplicate = false;
             isduplicate = transviewmodel.CheckDuplicate(transviewmodel);
             if (isduplicate)
             {
                 ModelState.AddModelError("HighLevelTxnID", "HighLevelTransaction already exists");
                 transviewmodel.GetLifeCycle(transviewmodel);
                 return(View("Edit", transviewmodel));
             }
             transviewmodel.GetLifeCycle(transviewmodel);
             transviewmodel.UpdateTrans(transviewmodel);
             return(RedirectToAction("Index", "Transactions"));
         }
         transviewmodel.GetLifeCycle(transviewmodel);
         return(View(transviewmodel));
     }
     catch (Exception ex)
     {
         errorlogviewmodel = new ErrorLogViewModel();
         errorlogviewmodel.LogError(ex);
         return(View("Error"));
     }
 }
Exemple #23
0
        public ActionResult Edit(ProductsViewModel prodviewmodel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    prodviewmodel.ReqReference = prodviewmodel.ReqReference == null ? "" : prodviewmodel.ReqReference.Trim();
                    bool isduplicate = false;
                    isduplicate = prodviewmodel.CheckDuplicate(prodviewmodel);
                    if (isduplicate)
                    {
                        ModelState.AddModelError("ReqReference", "ReqReference already exists");
                        prodviewmodel.GetLOBS(prodviewmodel);
                        prodviewmodel.GetBusinessProds(prodviewmodel);
                        return(View("Edit", prodviewmodel));
                    }
                    prodviewmodel.UpdateProd(prodviewmodel);
                    return(RedirectToAction("Index", "Products"));
                }


                prodviewmodel.GetLOBS(prodviewmodel);
                prodviewmodel.GetBusinessProds(prodviewmodel);
                return(View(prodviewmodel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #24
0
        public ActionResult SaveData(IList <TransactionAttributes> transactionAttributes)
        {
            try
            {
                int    index  = 0;
                String result = String.Empty;
                int    daId   = transactionAttributes.First().daId;

                TempData["daId"] = daId;
                TransactionAttributes transactionAttribute = new TransactionAttributes();
                index = transactionAttribute.SaveData(transactionAttributes, daId);
                if (index > 0)
                {
                    result = "1";
                }
                else
                {
                    result = "0";
                }

                return(Json(result, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #25
0
        // GET: Application/Edit/5
        public ActionResult Edit(int?id)
        {
            try
            {
                if (id == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                AppVersionViewModel appVersionViewModel = new AppVersionViewModel();
                var appVersion = appVersionViewModel.FindAppVersion(id);

                if (appVersion == null)
                {
                    return(HttpNotFound());
                }

                return(View(appVersion));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #26
0
        public ActionResult Edit(DistributionTypeViewModel distributionTypeViewModel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    bool isduplicate = false;
                    distributionTypeViewModel.distributionDesc = distributionTypeViewModel.distributionDesc.Trim();
                    isduplicate = distributionTypeViewModel.CheckDuplicate(distributionTypeViewModel);
                    if (isduplicate)
                    {
                        ModelState.AddModelError("distributionDesc", "Distribution already exists");
                        return(View("Edit", distributionTypeViewModel));
                    }

                    distributionTypeViewModel.UpdateDistributionType(distributionTypeViewModel);
                    return(RedirectToAction("Index", "DistributionType"));
                }
                return(View());
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #27
0
        public ActionResult Index(int?id)
        {
            try
            {
                if (System.Web.HttpContext.Current.Request.UrlReferrer.ToString().IndexOf("Transactions") > 0)
                {
                    Session["PreviousURL"] = System.Web.HttpContext.Current.Request.UrlReferrer;
                }

                LifeCyclesViewModel lifecyclesviewmodel = new LifeCyclesViewModel();
                if (id == null)
                {
                    id = (int)TempData["daId"];
                }
                lifecyclesviewmodel = lifecyclesviewmodel.GetTransactionsLifecycle(id);

                //TempData["daId"] = lifecyclesviewmodel.daid;
                lifecyclesviewmodel.daid = (int)id;

                return(View(lifecyclesviewmodel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #28
0
        public ActionResult Index(int?id)
        {
            try
            {
                DistributionTypeViewModel distributionTypeViewModel = new DistributionTypeViewModel();

                if (id == null)
                {
                    id = (int)TempData["daID"];
                }

                distributionTypeViewModel.GetDistributionTypeDetails((int)id);
                distributionTypeViewModel.GetScreenAccessRights("Distribution Type");
                CommonFunctions comfuns = new CommonFunctions();

                var da = comfuns.FindDA((int)id);
                distributionTypeViewModel.DAID     = (int)id;
                distributionTypeViewModel.DAName   = da.DAName;
                distributionTypeViewModel.ModuleId = da.ModuleId;
                TempData["daId"] = distributionTypeViewModel.DAID;

                return(View(distributionTypeViewModel));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #29
0
        public ActionResult Delete(LifeCyclesViewModel lifecyclesviewmodel)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    lifecyclesviewmodel.DeleteLifeCycle(lifecyclesviewmodel);
                    lifecyclesviewmodel.GetTransactionsLifecycle(lifecyclesviewmodel.daid);
                }
                return(RedirectToAction("Index", "LifeCycles"));
            }
            catch (DbUpdateException exception)
            {
                //Log Exception
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(exception);

                //Check for Referential Integrity
                if (((System.Data.SqlClient.SqlException)exception.InnerException.InnerException).Number == 547)
                {
                    return(View("Error_ReferentialIntegrity"));
                }

                return(View("Error"));
            }

            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }
Exemple #30
0
        //GET user/Edit/5
        public ActionResult Edit(int?distributionTypeId)
        {
            try
            {
                if (distributionTypeId == null)
                {
                    return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
                }

                DistributionTypeViewModel distributionTypeViewModel = new DistributionTypeViewModel();
                var distributionType = distributionTypeViewModel.FindDistributionType(distributionTypeId);
                TempData["daID"] = distributionType.DAID;

                if (distributionType.distributionTypeID == 0)
                {
                    return(HttpNotFound());
                }
                return(View(distributionType));
            }
            catch (Exception ex)
            {
                errorlogviewmodel = new ErrorLogViewModel();
                errorlogviewmodel.LogError(ex);
                return(View("Error"));
            }
        }