protected void onSave(object sender, EventArgs e) { save(); SqlDAO<Blog> sdao = new SqlDAO<Blog>(ConfigurationManager.ConnectionStrings["DB"].ConnectionString); Loader.save(blog,sdao.emulate<DataObject>(typeof(Blog))); sdao.saveOrUpdate(blog); }
protected void OnSave(object sender, EventArgs e) { if (!SaveData()) { try { SqlDAO<DataObject> dao = new SqlDAO<DataObject>("Data Source=REVLOCAL-54\\SQLEXPRESS;Initial Catalog=FileStoreTest;Integrated Security=True;", source.GetType()); dao.saveOrUpdate(source); } catch (Exception ex) { Log.getInst("UI").error(ex.ToString()); } Log.getInst("UI").write(Server.MapPath("DebugUI.html"), 4); } else { } }