Exemplo n.º 1
0
        public OutFlowType GetFlow()
        {
            var response = new OutFlowType();

            try
            {
                PqrDAO dao = new PqrDAO();
                response = dao.GetFlows();
            }
            catch (Exception ex)
            {
                //escribir en el log
                LogHelper.WriteLog("Models", "ManagerPQR", "GetFlow", ex, "");
            }
            return(response);
        }
Exemplo n.º 2
0
        public OutFlowType GetFlows()
        {
            string      connectionString = DataBaseHelper.GetConnectionString("DLG");
            OutFlowType response         = new OutFlowType();
            var         ora = new OracleServer(connectionString);

            FlowType        flow;
            List <FlowType> list    = new List <FlowType>();
            string          command = string.Empty;

            try
            {
                command = "SELECT BBS_WFG_TIPO_FLUJO.TIPO_FLUJO,  BBS_WFG_TIPO_FLUJO.NOMBRE_FLUJO FROM   BBS_WFG_TIPO_FLUJO ";
                command = command + " WHERE  BBS_WFG_TIPO_FLUJO.IND_VER_DESDE_PORTAL = 1 AND BBS_WFG_TIPO_FLUJO.ESTADO_FLUJO = 1 ";
                var rdr = ora.ExecuteCommand(command);

                while (rdr.Read())
                {
                    flow          = new FlowType();
                    flow.flowType = DBNull.Value.Equals(rdr["TIPO_FLUJO"]) ? 0 : int.Parse(rdr["TIPO_FLUJO"].ToString());
                    flow.flowName = DBNull.Value.Equals(rdr["NOMBRE_FLUJO"]) ? string.Empty : rdr["NOMBRE_FLUJO"].ToString();
                    list.Add(flow);
                }
                rdr.Close();
                response.lstFlowType      = list;
                response.msg              = new Response();
                response.msg.errorCode    = "200";
                response.msg.errorMessage = "OK";
            }
            catch (Exception ex)
            {
                throw new Exception("PqrDAO.GetFlows", ex);
            }
            finally
            {
                ora.Dispose();
            }
            return(response);
        }