Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Db      db = new Db();
            DataSet ds = db.ReturnFormData(1);

            AlpacaFactory factory = new AlpacaFactory();

            factory.ReturnForm(ds);

            var x = "x";
        }
Exemplo n.º 2
0
        public IHttpActionResult GetForm(int id)
        {
            try
            {
                DataSet ds = new Db().ReturnFormData(id);

                if (ds.Tables.Count == 4)
                {
                    AlpacaFactory frm = new AlpacaFactory();
                    dynamic       obj = frm.ReturnForm(ds);
                    return(Ok(obj));
                }
                else
                {
                    return(InternalServerError(new Exception("Database output incorrect")));
                }
            }
            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }//GetForm