internal ActionResult <WF_SEGUI> RechazarFlujo(WF_SEGUI pSWfSvrcn) { try { object varSali; string txterror = ""; SWfSvrcnDmr _SWfSvrcn = new SWfSvrcnDmr(); object[] varEntr = { usuario, Encrypta.EncriptarClave(password), alias, "SWfSvrcn", "", "", "", "", "", "N" }; if (_SWfSvrcn.ProgramLogin(varEntr, out varSali, out txterror) != 0) { throw new Exception("Error al ingresar a SEVEN-ERP, " + txterror); } _SWfSvrcn.emp_codi = pSWfSvrcn.EMP_CODI; _SWfSvrcn.usu_codi = pSWfSvrcn.USU_CODI; _SWfSvrcn.cas_cont = pSWfSvrcn.CAS_CONT; _SWfSvrcn.seg_cont = pSWfSvrcn.SEG_CONT; _SWfSvrcn.seg_come = pSWfSvrcn.COMENTARIOS; _SWfSvrcn.SelExec = ""; _SWfSvrcn.WebServer = ConfigurationManager.AppSettings["webServer"].ToString(); _SWfSvrcn.AppServer = ConfigurationManager.AppSettings["appServer"].ToString(); _SWfSvrcn.FtpServer = ConfigurationManager.AppSettings["ftpServer"].ToString(); _SWfSvrcn.FtpUser = ""; _SWfSvrcn.FtpPassword = ""; //_SWfSvrcn.WebServer = pSWfSvrcn.webServer; //_SWfSvrcn.AppServer = pSWfSvrcn.appServer; //_SWfSvrcn.FtpServer = pSWfSvrcn.ftpServer; //_SWfSvrcn.FtpUser = pSWfSvrcn.ftpUser; //_SWfSvrcn.FtpPassword = pSWfSvrcn.ftpPassword; _SWfSvrcn.seg_subj = pSWfSvrcn.SEG_SUBJ; int num = _SWfSvrcn.InvalidarSeguimiento(); if (num == 0) { return(new ActionResult <WF_SEGUI>(true, pSWfSvrcn, "")); } return(new ActionResult <WF_SEGUI>(false, null, _SWfSvrcn.txterror)); } catch (Exception) { return(null); } }
internal ActionResult <List <WF_ACCIO> > AprobarFlujo(WF_SEGUI pSWfSvrcn) { try { List <WF_ACCIO> vValor = dao.DAOSEListaAccionesdeUnaEtapa(pSWfSvrcn.EMP_CODI, pSWfSvrcn.FLU_CONT, pSWfSvrcn.ETA_CONT); if (vValor != null && vValor.Any()) { if (vValor.Count == 1) { pSWfSvrcn.ACC_CONT = vValor.FirstOrDefault().ACC_CONT.ToString(); } else { if (pSWfSvrcn.ACC_CONT == null || pSWfSvrcn.ACC_CONT == "") { return(new ActionResult <List <WF_ACCIO> >(false, vValor, "Seleccione una acción.")); } } } else { pSWfSvrcn.ACC_CONT = " "; } object varSali; string txterror = ""; SWfSvrcnDmr _SWfSvrcn = new SWfSvrcnDmr(); object[] varEntr = { usuario, Encrypta.EncriptarClave(password), alias, "SWfSvrcn", "", "", "", "", "", "N" }; if (_SWfSvrcn.ProgramLogin(varEntr, out varSali, out txterror) != 0) { throw new Exception("Error al ingresar a SEVEN-ERP, " + txterror); } _SWfSvrcn.emp_codi = pSWfSvrcn.EMP_CODI; _SWfSvrcn.usu_codi = pSWfSvrcn.USU_CODI.ToUpper(); _SWfSvrcn.cas_cont = pSWfSvrcn.CAS_CONT; _SWfSvrcn.seg_cont = pSWfSvrcn.SEG_CONT; _SWfSvrcn.seg_come = pSWfSvrcn.COMENTARIOS; _SWfSvrcn.acc_cont = pSWfSvrcn.ACC_CONT; _SWfSvrcn.SelExec = ""; _SWfSvrcn.WebServer = ConfigurationManager.AppSettings["webServer"].ToString(); _SWfSvrcn.AppServer = ConfigurationManager.AppSettings["appServer"].ToString(); _SWfSvrcn.FtpServer = ConfigurationManager.AppSettings["ftpServer"].ToString(); _SWfSvrcn.FtpUser = ""; _SWfSvrcn.FtpPassword = ""; //_SWfSvrcn.WebServer = pSWfSvrcn.webServer; //_SWfSvrcn.AppServer = pSWfSvrcn.appServer; //_SWfSvrcn.FtpServer = pSWfSvrcn.ftpServer; //_SWfSvrcn.FtpUser = pSWfSvrcn.ftpUser; //_SWfSvrcn.FtpPassword = pSWfSvrcn.ftpPassword; _SWfSvrcn.seg_subj = pSWfSvrcn.SEG_SUBJ; object din = new object(); object dout; string txterr; //int num = _SWfSvrcn.TerminarSeguimiento(din, out dout, out txterr); int num = _SWfSvrcn.TerminarSeguimiento(); if (num == 0) { return(new ActionResult <List <WF_ACCIO> >(true, null, "")); } return(new ActionResult <List <WF_ACCIO> >(false, null, _SWfSvrcn.txterror)); } catch (Exception exception) { //base.BOException.Throw("KBOSWfSvrcn", "RechazarFlujo", exception); return(new ActionResult <List <WF_ACCIO> >(false, null, exception.Message)); } }