static void Main(string[] args) { stud ben = new stud(); stud bat = new stud(); Swap <stud>(ref ben, ref bat); Swap(ref ben, ref bat); }
public ActionResult Edit(int id, stud s) { try { // TODO: Add update logic here string msg = sc.UpdateStud(s); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Delete(int id, stud s) { try { string msg = sc.DeleteStud(id); return(RedirectToAction("Index")); } catch { return(View()); } }
// // GET: /Stud/Delete/5 public ActionResult Delete(int id) { try { stud s = sc.SearchStud(id); // TODO: Add insert logic here return(View(s)); } catch { return(View()); } }
public ActionResult Create(stud s) { try { string msg = sc.InsertStud(s); // TODO: Add insert logic here return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult student(stud ob) { if (ModelState.IsValid) { registrationEntities std = new registrationEntities(); std.sp_student(ob.id, ob.name, ob.age, ob.qualification, ob.passoutyear, ob.email, ob.username, ob.password); ob.msg = ("successfully registered"); ModelState.Clear(); return(View("studentreg", ob)); } return(View("studentreg", ob)); }
static void Main(string[] args) { stud stud = new stud() { id = 10, name = "test" }; PropertyInfo[] propertyInfo; propertyInfo = typeof(stud).GetProperties(BindingFlags.Public | BindingFlags.Instance); foreach (var item in propertyInfo) { Console.WriteLine(item.Name + " : " + item.GetValue(stud)); } Console.ReadLine(); }