コード例 #1
0
ファイル: Program.cs プロジェクト: jbliss02/DynamicWebForms
        static void Main(string[] args)
        {
            Db db = new Db();
            DataSet ds = db.ReturnFormData(1);

            AlpacaFactory factory = new AlpacaFactory();

            factory.ReturnForm(ds);

            var x = "x";
        }
コード例 #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);
            }
        }