Example #1
0
        public TOTransaction <Models.TOPqInpqr> SetPqInpqr(DTOEntities.TOPqInpqr toPqInpqr)
        {
            DTOEntities.TSalida salida = new DTOEntities.TSalida();
            try
            {
                Models.TOPqInpqr pqr = new Models.TOPqInpqr();
                var ite_cont         = ConfigurationManager.AppSettings["ReciboPQR"].ToString();
                if (ite_cont != null)
                {
                    toPqInpqr.ite_frec = int.Parse(ite_cont);
                }

                toPqInpqr.inp_esta = "A";
                toPqInpqr.arb_csuc = "0";
                toPqInpqr.inp_tcli = "S";
                if (string.IsNullOrEmpty(toPqInpqr.arb_ccec))
                {
                    throw new Exception("Debe diligeciar el campo ambiente");
                }

                salida = comPqInpqr.CrearPqInpqr(toPqInpqr);
                //crear WorkFlow
                var wf = boWfRflup.CrearCasoWorkFlow(toPqInpqr.emp_codi, salida.retorno);
                pqr.inp_cont = salida.retorno;
                //Se modifica para que retorne un Transaction acorde a la nueva app de reservas
                return(new TOTransaction <Models.TOPqInpqr>()
                {
                    ObjTransaction = pqr, Retorno = 0, TxtError = ""
                });
            }
            catch (Exception ex)
            {
                salida.retorno  = 0;
                salida.Txterror = ex.Message;
                var wf = boWfRflup.CrearCasoWorkFlow(toPqInpqr.emp_codi, salida.retorno);
                return(new TOTransaction <Models.TOPqInpqr>()
                {
                    ObjTransaction = null, Retorno = 1, TxtError = ex.Message
                });
            }
        }
Example #2
0
 public TOTransaction <Models.TOPqInpqr> Post(DTOEntities.TOPqInpqr toPqInpqr)
 {
     return(boPqInpqr.SetPqInpqr(toPqInpqr));
 }