예제 #1
0
        private PagedList <DocumentModels> Document(string id)
        {
            List <DocumentModels> list = DocumentLogic.getInstance().getAllDocumentByUser(id);
            var page = new PagedList <DocumentModels>();

            try
            {
                page.Content = list;
            }
            catch (Exception e)
            {
                Logging.Log.getInstance().CreateLogError(e);
            }
            return(page);
        }
예제 #2
0
        public ActionResult Verification(string[] arrValue)
        {
            try
            {
                DocumentLogic.getInstance().Verification(arrValue[0]);
                TempData["Success"] = "Success verification for " + arrValue[0];
            }
            catch (Exception e)
            {
                TempData["Error"] = "Error verification for " + arrValue[0];
                Logging.Log.getInstance().CreateLogError(e);
            }

            return(RedirectToAction("Detail", "Users", new { id = arrValue[1] }));
        }
        public ActionResult Upload(DocumentModels model)
        {
            try
            {
                if (DocumentLogic.getInstance().CheckExistingDocument(model))
                {
                    DocumentLogic.getInstance().Add(model);
                    TempData["Success"] = "Success saving Data for " + model.NIP;
                }
                else
                {
                    TempData["Error"] = "Document " + model.DocumentNo + " is exist";
                }
            }
            catch (Exception e)
            {
                TempData["Error"] = "Error saving Data for " + model.NIP;
                Logging.Log.getInstance().CreateLogError(e);
            }

            return(RedirectToAction("Detail", "Users", new { id = model.NIP }));
        }