/// <summary>
 /// Lista la información de las solicitudes antes de ser aprobadas por el ordenador de gasto
 /// </summary>
 public ActionResult ListInfo(String txtPage, String selRequestTypeFilter,  String selProjectFilter, String selRequestStateFilter, String txtNumberPaymentsFilter, String txtTimeFilter, String selUnitTimeFilter, String selSupervisorFilter)
 {
     String usuario = (String)Session["USER_ID"];
     RequestDTO objDTO = new RequestDTO(selRequestTypeFilter, selProjectFilter, selRequestStateFilter, (txtNumberPaymentsFilter.Equals("") ? "0" : txtNumberPaymentsFilter), (txtTimeFilter.Equals("") ? "0" : txtTimeFilter), selUnitTimeFilter, selSupervisorFilter);
     IList<String> info = ContractService.ListInfoBeforeApprove(txtPage,objDTO,usuario);
     return Json(new { d = info });
 }
Beispiel #2
0
 //public IList<String> SaveInfo(AuditoriaDTO obj)
 //{
 //    String[] data = { "objetivo", obj.objetivo, "fecha", obj.fecha, "grupo_encargado", obj.grupo_encargado, "proyecto_id", obj.proyecto, "resultados", obj.resultados, "id", obj.id };
 //    _repository.SetData(data);
 //    _repository.SetProcedure("sp_save_auditoria");
 //    _repository.IsPaginator(false);
 //    return _repository.Execute();
 //}
 //public IList<String> ListInfo(String user)
 //{
 //    String[] data = {"User", user };
 //    _repository.SetData(data);
 //    _repository.SetProcedure("sp_list_soluser");
 //    _repository.IsPaginator(true);
 //    return _repository.Execute();
 //}
 public IList<String> ListInfo(String page, RequestDTO obj, String user, String rol)
 {
     String[] data = { "RequestType", obj.RequestType, "Project", obj.Project, "RequestState", obj.RequestState, "NumberPayments", obj.NumberPayments, "Time", obj.Time, "UnitTime", obj.UnitTime, "Supervisor", obj.Supervisor, "Page", page, "User", user , "Rol" , rol};
     _repository.SetData(data);
     _repository.SetProcedure("sp_list_soluserfilter");
     _repository.IsPaginator(true);
     return _repository.Execute();
 }
 public IList<String> ListInfo(String page,RequestDTO obj)
 {
     String[] data = {"RecordId",obj.RecordID,"Page", page};
     _repository.SetData(data);
     _repository.SetProcedure("sp_list_AssignAvailability");
     _repository.IsPaginator(true);
     return _repository.Execute();
 }
Beispiel #4
0
 public IList<String> DeleteActivity(RequestDTO obj)
 {
     String[] data = {"RecordID2", obj.RecordID };
     _repository.SetData(data);
     _repository.SetProcedure("sp_delete_activity");
     _repository.IsPaginator(false);
     return _repository.Execute();
 }
Beispiel #5
0
 public IList<String> Approve_Any_Request(RequestDTO obj, String user, String sinco)
 {
     String[] data = { "HasCdp", obj.Hascdp, "Enterprise", obj.Enterprise, "RecordID", obj.RecordID, "User", user,"Sinco",sinco };
     _repository.SetData(data);
     _repository.SetProcedure("sp_save_Approve_Any_Request");
     _repository.IsPaginator(false);
     return _repository.Execute();
 }
 public ActionResult Rechazar_Any_Request(String selApproved, String txtEnterprise, String txtRecordId)
 {
     if (selApproved == null)
     {
         selApproved = "-1";
     }
     String usuario = (String)Session["USER_ID"];
     RequestDTO objDTO = new RequestDTO(selApproved, txtEnterprise, (txtRecordId.Equals("") ? "0" : txtRecordId));
     IList<String> info = ContractService.Rechazar_Any_Request(objDTO, usuario);
     return Json(new { d = info });
 }
Beispiel #7
0
 public IList<String> SaveInfoResponsible(RequestDTO obj, String user)
 {
     String[] data = { "Responsible", obj.Responsible, "Amount2", obj.Amount2,  "Enterprise", obj.Enterprise, "RecordID2", obj.RecordID2, "RecordID3", obj.RecordID3,"User", user };
     _repository.SetData(data);
     _repository.SetProcedure("sp_save_InCharge");
     _repository.IsPaginator(false);
     return _repository.Execute();
 }
Beispiel #8
0
 public IList<String> SaveInfo(RequestDTO obj ,String provider,String projectman,String user)
 {
     String[] data = { "RequestType", obj.RequestType, "Project", obj.Project, "RequestState", obj.RequestState, "Value", obj.Value, "NumberPayments", obj.NumberPayments, "Time", obj.Time, "UnitTime", obj.UnitTime, "Supervisor", obj.Supervisor, "Justificaction", obj.Justification, "Object", obj.Object, "HasCdp", obj.Hascdp, "Provider", provider, "Enterprise", obj.Enterprise, "RecordID", obj.RecordID, "User", user, "ProjectMan", projectman };
     _repository.SetData(data);
     _repository.SetProcedure("sp_save_Request");
     _repository.IsPaginator(false);
     return _repository.Execute();
 }
Beispiel #9
0
 public IList<String> RemainderValue(RequestDTO obj)
 {
     String[] data = { "Request", obj.RecordID };
     _repository.SetData(data);
     _repository.SetProcedure("sp_search_remainder_Request_Value");
     _repository.IsPaginator(false);
     return _repository.Execute();
 }
Beispiel #10
0
 public IList<String> Remainder(RequestDTO obj)
 {
     String[] data = { "Certificate", obj.RecordID };
     _repository.SetData(data);
     _repository.SetProcedure("sp_search_remainder_amount_cdp");
     _repository.IsPaginator(false);
     return _repository.Execute();
 }
Beispiel #11
0
 public ActionResult ListInfoResponsible(String txtPage, String txtRecordID2)
 {
     RequestDTO objDTO = new RequestDTO((txtRecordID2.Equals("") ? "0" : txtRecordID2));
     IList<String> info = ContractService.ListInfoResponsible(txtPage, objDTO);
     return Json(new { d = info });
 }
 /// <summary>
 /// Lista la información de los Areaes
 /// </summary>
 public ActionResult ListInfo(String txtPage, String selRequestFilter)
 {
     RequestDTO objDTO = new RequestDTO(selRequestFilter);
     IList<String> info = ContractService.ListInfo(txtPage, objDTO);
     return Json(new { d = info });
 }
 public ActionResult Reminder(String txtRecordID2)
 {
     RequestDTO objDTO = new RequestDTO((txtRecordID2.Equals("") ? "0" : txtRecordID2));
     IList<String> info = ContractService.Remainder(objDTO);
     return Json(new { d = info });
 }
Beispiel #14
0
 public ActionResult DeleteResponsible(String txtRecordID3)
 {
     RequestDTO objDTO = new RequestDTO((txtRecordID3.Equals("") ? "0" : txtRecordID3));
     IList<String> info = ContractService.DeleteResponsible(objDTO);
     return Json(new { d = info });
 }
Beispiel #15
0
 /// <summary>
 /// Actualiza la información de los responsables de elementos
 /// </summary>
 public ActionResult SaveInfoResponsible(String selResponsible, String txtAmount2, String txtEnterprise, String txtRecordID2, String txtRecordID3)
 {
     String usuario = (String)Session["USER_ID"];
     RequestDTO objDTO = new RequestDTO(selResponsible, txtAmount2, txtEnterprise, txtRecordID2, (txtRecordID3.Equals("") ? "0" : txtRecordID3));
     IList<String> info = ContractService.SaveInfoResponsible(objDTO, usuario);
     return Json(new { d = info });
 }
Beispiel #16
0
        /// <summary>
        /// Actualiza la información de las Solicitudes
        /// </summary>
        public ActionResult SaveInfo(String selRequestType, String selProject, String selRequestState, String txtValue, String txtNumberPayments, String txtTime, String selUnitTime, String selSupervisor, String txtJustification, String txtObject, String selApproved, String selProvider, String txtEnterprise, String txtRecordId,String selProjectMan)
        {
            if (selProjectMan == null) {
                selProjectMan = "-1";
            }
            if (selApproved == null)
            {
                selApproved = "-1";
            }

            String usuario = (String)Session["USER_ID"];
            RequestDTO objDTO = new RequestDTO(selRequestType, selProject, (selRequestState.Equals("-1") ? "2" : selRequestState), (txtValue.Equals("") ? "0" : txtValue), (txtNumberPayments.Equals("") ? "0" : txtNumberPayments), (txtTime.Equals("") ? "0" : txtTime), selUnitTime, selSupervisor, txtJustification, txtObject, (selApproved.Equals("-1") ? "NULL" : selApproved), txtEnterprise, (txtRecordId.Equals("") ? "0" : txtRecordId));
            IList<String> info = ContractService.SaveInfo(objDTO, selProvider,selProjectMan, usuario);
            System.Web.HttpContext.Current.Session["solicitud"] = info[0];

            //ver como arreglar esto
            bool exists = System.IO.Directory.Exists(Server.MapPath("~/App_Data/" + info[0]));

            if (!exists)
            {
                String path = Path.Combine(Server.MapPath("~/App_Data/" + info[0].ToString()));
                Directory.CreateDirectory(path);
            }
            return Json(new { d = info });
        }
Beispiel #17
0
 //String txtRecordId)
 public ActionResult RemainderValue()
 {
     String txtRecordId = Session["solicitud"].ToString();
     RequestDTO objDTO = new RequestDTO(txtRecordId);
     IList<String> info = ContractService.RemainderValue(objDTO);
     return Json(new { d = info });
 }
Beispiel #18
0
 public ActionResult Remainder(String txtRecordIDCert)
 {
     RequestDTO objDTO = new RequestDTO(txtRecordIDCert);
     IList<String> info = ContractService.Remainder(objDTO);
     return Json(new { d = info });
 }
Beispiel #19
0
 public IList<String> Send_Request_To_Paymaster(RequestDTO obj, String user)
 {
     String[] data = { "HasCdp", obj.Hascdp, "Enterprise", obj.Enterprise, "RecordID", obj.RecordID, "User", user };
     _repository.SetData(data);
     _repository.SetProcedure("sp_save_Send_Request_To_Paymaster");
     _repository.IsPaginator(false);
     return _repository.Execute();
 }
 public ActionResult Send_Request_To_Paymaster(String selApproved, String txtEnterprise, String txtRecordId)
 {
     String usuario = (String)Session["USER_ID"];
     RequestDTO objDTO = new RequestDTO(selApproved, txtEnterprise, (txtRecordId.Equals("") ? "0" : txtRecordId));
     IList<String> info = ContractService.Send_Request_To_Paymaster(objDTO, usuario);
     return Json(new { d = info });
 }
Beispiel #21
0
 public IList<String> ListInfoResponsible(String page, RequestDTO obj)
 {
     String[] data = { "Page", page, "RecordID", obj.RecordID };
     _repository.SetData(data);
     _repository.SetProcedure("sp_list_incharge");
     _repository.IsPaginator(true);
     return _repository.Execute();
 }
Beispiel #22
0
 public IList<String> DeleteResponsible(RequestDTO obj)
 {
     String[] data = { "RecordID3", obj.RecordID };
     _repository.SetData(data);
     _repository.SetProcedure("sp_delete_InCharge");
     _repository.IsPaginator(false);
     return _repository.Execute();
 }
Beispiel #23
0
 public IList<String> Rechazar_sol(RequestDTO obj, String user)
 {
     String[] data = {"RecordID", obj.RecordID, "User", user };
     _repository.SetData(data);
     _repository.SetProcedure("sp_save_Rechazar_Sol");
     _repository.IsPaginator(false);
     return _repository.Execute();
 }
Beispiel #24
0
 public IList<String> ListInfoActivities(String page, RequestDTO obj)
 {
     String[] data = {"Page", page,"RecordID", obj.RecordID };
     _repository.SetData(data);
     _repository.SetProcedure("sp_list_Request_Activities");
     _repository.IsPaginator(true);
     return _repository.Execute();
 }
Beispiel #25
0
 public ActionResult ListInfoActivities(String txtPage, String txtRecordId)
 {
     RequestDTO objDTO = new RequestDTO((txtRecordId.Equals("") ? "0" : txtRecordId));
     IList<String> info = ContractService.ListInfoActivities(txtPage, objDTO);
     return Json(new { d = info });
 }