public ActionResult _InsertAjaxEditing()
 {
     //Create a new instance of the EditableProduct class.
     Form form = new Form();
     //Perform model binding (fill the product properties and validate it).
     if (TryUpdateModel(form))
     {
         //The model is valid - insert the product.
         azureStorage.InsertOrUpdateForm(form);
     }
     //Rebind the grid
     return View(new GridModel(azureStorage.GetAllForms()));
 }
Example #2
0
 public void InsertOrUpdateForm(Form form)
 {
     form.PartitionKey = "forms";
     if (form.Id == Guid.Empty)
     {
         form.Id = Guid.NewGuid();
     }
     form.RowKey = form.Id.ToString();
     //form.RowKey = form.TechName;
     var formTable = _tableClient.GetTableReference("form");
     formTable.Execute(TableOperation.InsertOrReplace(form));
 }