public ActionResult GetAppointmensQuantity()
        {
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            return(Json(catalogueBusiness.GetAppointmentsQuantity()));
            // return JsonConvert.SerializeObject(catalogueBusiness.GetAppointmensQuantityFirstSemester());
        }
        public ActionResult GetSubprocessListByProcess(int process)
        {
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            return(Json(catalogueBusiness.GetSubprocessListByProcess(process)));
            // return JsonConvert.SerializeObject(UserBusiness.GetProfessionalsByProcess(process));
        }
Beispiel #3
0
        public ActionResult MainFunctionaryRegisterHome()
        {
            CatalogueBusiness appointmentBusiness = new CatalogueBusiness();

            ViewBag.places  = appointmentBusiness.GetCatalogueFunctionary("puesto");
            ViewBag.areas   = appointmentBusiness.GetCatalogueFunctionary("area");
            ViewBag.offices = appointmentBusiness.GetCatalogueFunctionary("oficina");
            return(View("MainFunctionaryRegisterHome"));
        }
Beispiel #4
0
        public void CheckNullSearchCodeTests()
        {
            // Arrange
            CatalogueBusiness business = new CatalogueBusiness();
            // Act
            List <FPT_SP_CATA_GET_DETAILINFOR_OF_ITEM_Result> result = business.SearchCode("", "", "");

            // Assert
            Assert.AreEqual(0, result.Count());
        }
Beispiel #5
0
        public void CheckErrorFormIDGET_CATALOGUE_FIELDSTests()
        {
            // Arrange
            CatalogueBusiness business = new CatalogueBusiness();
            // Act
            List <GET_CATALOGUE_FIELDS_Result> result = business.GET_CATALOGUE_FIELDS(1, 11, "020,020$a,040,040$a,041,041$a,044,044$a,082,082$a,090,090$a,100,100$a,100$e,110,110$a,110$b,245,245$a,245$b,245$c,245$n,245$p,246,246$a,246$b,250,250$a,260,260$a,260$b,260$c,300,300$a,300$b,300$c,300$e,490,490$a,500,500$a,520,520$a,650,650$a,653,653$a,700,700$a,700$e,700$n,852,852$a,852$p,900,911,925,926,927,", "", 0);

            // Assert
            Assert.AreEqual(21, result.Count());
        }
Beispiel #6
0
        public void CheckErrorFormIDGetComplatedFormTests()
        {
            // Arrange
            CatalogueBusiness business = new CatalogueBusiness();
            // Act
            List <GET_CATALOGUE_FIELDS_Result> result = business.GetComplatedForm(1, "Ahihi", 11);

            // Assert
            Assert.AreEqual(0, result.Count());
        }
Beispiel #7
0
        public void CheckErrorTitleTests()
        {
            // Arrange
            CatalogueBusiness business = new CatalogueBusiness();
            // Act
            List <FPT_SP_CATA_GET_DETAILINFOR_OF_ITEM_Result> result = business.CheckTitle("abcxyz");

            // Assert
            Assert.AreEqual(0, result.Count());
        }
Beispiel #8
0
        public void CheckNullGetContentByIDTests()
        {
            // Arrange
            CatalogueBusiness business = new CatalogueBusiness();
            // Act
            List <FPT_SP_CATA_GET_CONTENTS_OF_ITEMS_Result> result = business.GetContentByID("");

            // Assert
            Assert.AreEqual(0, result.Count());
        }
        public ActionResult ManageProcessAdministrator()
        {
            CatalogueModels catalogueProcess = new CatalogueModels();

            catalogueProcess.Table = "proceso";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.process = catalogueBusiness.GetListCatalogue(catalogueProcess);
            return(View("ManageProcessAdministrator"));
        }
        public ActionResult ManageAreaAdministrator()
        {
            CatalogueModels catalogueArea = new CatalogueModels();

            catalogueArea.Table = "area";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.areas = catalogueBusiness.GetListCatalogue(catalogueArea);
            return(View("ManageAreaAdministrator"));
        }
Beispiel #11
0
        public void CheckSearchCodeByCopyNumberTests()
        {
            // Arrange
            CatalogueBusiness business = new CatalogueBusiness();
            // Act
            List <FPT_SP_CATA_GET_DETAILINFOR_OF_ITEM_Result> result = business.SearchCode("", "TK/DNCA000198", "");

            // Assert
            Assert.AreEqual(21, result.Count());
        }
Beispiel #12
0
        public ActionResult MainFunctionaryRegisterAdministrator()
        {
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.places     = catalogueBusiness.GetCatalogueFunctionary("puesto");
            ViewBag.areas      = catalogueBusiness.GetCatalogueFunctionary("area");
            ViewBag.offices    = catalogueBusiness.GetCatalogueFunctionary("oficina");
            ViewBag.assistance = catalogueBusiness.GetCatalogueFunctionary("asistencia");
            return(View("MainFunctionaryRegisterAdministrator"));
        }
        public ActionResult ManagePlaceAdministrator()
        {
            CatalogueModels cataloguePlace = new CatalogueModels();

            cataloguePlace.Table = "puesto";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.places = catalogueBusiness.GetListCatalogue(cataloguePlace);
            return(View("ManagePlaceAdministrator"));
        }
        public ActionResult ManageAssistanceAdministrator()
        {
            CatalogueModels catalogueOffice = new CatalogueModels();

            catalogueOffice.Table = "asistencia";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.assistance = catalogueBusiness.GetListCatalogue(catalogueOffice);
            return(View("ManageAssistanceAdministrator"));
        }
Beispiel #15
0
        public void GetComplatedFormTests()
        {
            // Arrange
            CatalogueBusiness business = new CatalogueBusiness();
            // Act
            List <GET_CATALOGUE_FIELDS_Result> result = business.GetComplatedForm(1, "", 12);

            // Assert
            Assert.AreEqual(21, result.Count());
        }
        public ActionResult ManageActivityAdministrator()
        {
            CatalogueModels catalogueActivity = new CatalogueModels();

            catalogueActivity.Table = "actividad";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.activity = catalogueBusiness.GetListCatalogue(catalogueActivity);
            return(View("ManageActivityAdministrator"));
        }
        public ActionResult ManageOfficeAdministrator()
        {
            CatalogueModels catalogueOffice = new CatalogueModels();

            catalogueOffice.Table = "oficina";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.offices = catalogueBusiness.GetListCatalogue(catalogueOffice);
            return(View("ManageOfficeAdministrator"));
        }
        public ActionResult DeleteAssistanceAdministrator(int id)
        {
            CatalogueModels catalogueProcess = new CatalogueModels();

            catalogueProcess.Table = "asistencia";
            catalogueProcess.ID    = id;
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            catalogueBusiness.DeleteCatalogueItems(catalogueProcess);
            return(Json("Exitoso"));
        }
        public ActionResult DeleteSubprocessAdministrator(int id)
        {
            CatalogueModels catalogue = new CatalogueModels();

            catalogue.Table = "subproceso";
            catalogue.ID    = id;
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            catalogueBusiness.DeleteCatalogueItems(catalogue);
            ViewBag.process = catalogueBusiness.GetListCatalogue(catalogue);
            return(Json("Exitoso"));
        }
        public ActionResult DeleteActivityAdministrator(int id)
        {
            CatalogueModels catalogueProcess = new CatalogueModels();

            catalogueProcess.Table = "actividad";
            catalogueProcess.ID    = id;
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            catalogueBusiness.DeleteCatalogueItems(catalogueProcess);
            ViewBag.process = catalogueBusiness.GetListCatalogue(catalogueProcess);
            return(Json("Exitoso"));
        }
        public ActionResult ModifyAssistanceAdministrator(int id, String description)
        {
            CatalogueModels cataloguePlace = new CatalogueModels();

            cataloguePlace.ID    = id;
            cataloguePlace.Name  = description;
            cataloguePlace.Table = "asistencia";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            catalogueBusiness.ModifyCatalogueItems(cataloguePlace);
            return(Json("Exitoso"));
        }
        public ActionResult MainProfessionalRegisterAdministrator(UserModels professional)
        {
            UserBusiness professionalBusiness = new UserBusiness();

            professionalBusiness.RegisterProfessional(professional);
            CatalogueModels catalogueProcess = new CatalogueModels();

            catalogueProcess.Table = "proceso";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.process = catalogueBusiness.GetListCatalogue(catalogueProcess);
            return(View("MainProfessionalRegisterAdministrator"));
        }
        public ActionResult MainProfessionalUpdateAdministrator(UserModels professional)
        {
            UserBusiness professionalBusiness = new UserBusiness();

            professionalBusiness.ModifyProfessional(professional);
            CatalogueModels catalogueProcess = new CatalogueModels();

            catalogueProcess.Table = "proceso";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.process = catalogueBusiness.GetListCatalogue(catalogueProcess);
            return(Json("Exitoso"));
        }
 public ActionResult RegisterAssistanceAdministrator(String description)
 {
     if (description != "")
     {
         CatalogueModels catalogueAssitance = new CatalogueModels();
         catalogueAssitance.Table = "asistencia";
         catalogueAssitance.Name  = description;
         CatalogueBusiness catalogueBusiness = new CatalogueBusiness();
         catalogueBusiness.RegisterCatalogueItem(catalogueAssitance);
         return(Json("Exitoso"));
     }
     return(Json("Debe ingresar una descripción"));
 }
        public ActionResult ModifyProcessAdministrator(int id, String description)
        {
            CatalogueModels catalogueProcess = new CatalogueModels();

            catalogueProcess.Table = "proceso";
            catalogueProcess.ID    = id;
            catalogueProcess.Name  = description;
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            catalogueBusiness.ModifyCatalogueItems(catalogueProcess);
            ViewBag.process = catalogueBusiness.GetListCatalogue(catalogueProcess);
            return(Json("Exitoso"));
        }
Beispiel #26
0
        public ActionResult ScheduleDatesAdministrator()
        {
            CatalogueModels catalogueProcess = new CatalogueModels();

            catalogueProcess.Table = "proceso";
            CatalogueBusiness appointmentBusiness = new CatalogueBusiness();
            UserBusiness      userBusiness        = new UserBusiness();

            ViewBag.professional = userBusiness.GetListProfessionals();
            ViewBag.subprocess   = appointmentBusiness.GetCatalogueFunctionary("subproceso");
            ViewBag.process      = appointmentBusiness.GetListCatalogue(catalogueProcess);
            return(View());
        }
        public ActionResult ModifySubprocessAdministrator(int id, String description, int father)
        {
            CatalogueModels catalogue = new CatalogueModels();

            catalogue.Table    = "subproceso";
            catalogue.ID       = id;
            catalogue.Name     = description;
            catalogue.FatherID = father;
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            catalogueBusiness.ModifyCatalogueItems(catalogue);
            ViewBag.process = catalogueBusiness.GetListCatalogue(catalogue);
            return(Json("Exitoso"));
        }
 public ActionResult RegisterPlaceAdministrator(String description)
 {
     if (description != "")
     {
         CatalogueModels cataloguePlace = new CatalogueModels();
         cataloguePlace.Table = "puesto";
         cataloguePlace.Name  = description;
         CatalogueBusiness catalogueBusiness = new CatalogueBusiness();
         catalogueBusiness.RegisterCatalogueItem(cataloguePlace);
         ViewBag.process = catalogueBusiness.GetListCatalogue(cataloguePlace);
         return(Json("Exitoso"));
     }
     return(Json("Debe ingresar una descripción"));
 }
        public ActionResult MainProfessionalUpdateAdministrator()
        {
            int             id_professional  = Convert.ToInt32(Request.Params["login"]);
            CatalogueModels catalogueProcess = new CatalogueModels();

            catalogueProcess.Table = "proceso";
            CatalogueBusiness catalogueBusiness = new CatalogueBusiness();

            ViewBag.process = catalogueBusiness.GetListCatalogue(catalogueProcess);
            UserBusiness userBusiness = new UserBusiness();

            ViewBag.professional        = userBusiness.GetProfessionalByIdentification(id_professional);
            ViewBag.processProfessional = catalogueBusiness.GetListProcessProfessional(id_professional);
            return(View("MainProfessionalUpdateAdministrator"));
        }
 public ActionResult RegisterSubprocessAdministrator(String description, int father)
 {
     if (description != "")
     {
         CatalogueModels catalogue = new CatalogueModels();
         catalogue.Table    = "subproceso";
         catalogue.Name     = description;
         catalogue.FatherID = father;
         CatalogueBusiness catalogueBusiness = new CatalogueBusiness();
         catalogueBusiness.RegisterCatalogueItem(catalogue);
         ViewBag.process = catalogueBusiness.GetListCatalogue(catalogue);
         return(Json("Exitoso"));
     }
     return(Json("Debe ingresar una descripción"));
 }