private void Form2_Load(object sender, EventArgs e) { _allForm = new AllForm(delegate(string text) { richTextBox1.AppendText(text); }); }
public async Task <ActionResult> DeleteConfirmed(int id) { AllForm allForm = await db.Forms.FindAsync(id); db.Forms.Remove(allForm); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "Id,Name,Email,Age,Gender,Standard,Division,Image,birthdate,AcadmicStartDate,AcadmicEndDate,Hobby,OtherActivity")] AllForm allForm) { if (ModelState.IsValid) { db.Entry(allForm).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(allForm)); }
// GET: AllForms/Delete/5 public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } AllForm allForm = await db.Forms.FindAsync(id); if (allForm == null) { return(HttpNotFound()); } return(View(allForm)); }