public ActionResult Create(Student stdObj) { if (ModelState.IsValid) { var id = MyDAL.SaveStudent(stdObj); ViewBag.ID = id; return(RedirectToAction("Index")); } return(View(stdObj)); }
private async void initData() { dal = MyDAL.Instance; string JsonWorker = await dal.GetAsync("2019_02_06_MVC_Backend/rest/workers"); var deserialized = JsonConvert.DeserializeObject <IEnumerable <Worker> >(JsonWorker); // Do something with it _workers = deserialized.ToList <Worker>(); }
public CustomersModel() { Dal = MyDAL.Instance; initData(); }
public ActionResult DeleteRec(int id) { MyDAL.DeleteStudentByID(id); return(RedirectToAction("Index")); }
public CitiesModel() { Dal = MyDAL.Instance; initData(); }
public ActionResult Edit(Student stdObj) { int id = MyDAL.SaveStudent(stdObj); return(RedirectToAction("Index")); }
public ActionResult Delete(int id) { var result = MyDAL.GetStudentByID(id); return(View("Delete", result)); }
// // GET: /Student/ public ActionResult Index() { var list = MyDAL.GetAllStudents(); return(View("List", list)); }
public ActionResult Edit(int id) { var result = MyDAL.GetStudentByID(id); return(View("Edit", result)); }
public MyBLL(MyDAL dal) { _dal = dal; }
public ActionResult Delete(int id) { var stdObj = MyDAL.GetStudentByID(id); return(View(stdObj)); }
public WorkersModel() { Dal = MyDAL.Instance; initData(); }
// // GET: /Student/ public ActionResult Index() { var data = MyDAL.GetAllStudents(); return(View("List", data)); }
public CarsModel() { Dal = MyDAL.Instance; InitData(); }
public static List <Employee> GetAll(string connectionString) { return(MyDAL.GetAll(connectionString)); }
public static void Update(string connectionString, int id, Employee emp) { MyDAL.Update(connectionString, id, emp); }
public static Employee GetById(string connectionString, int id) { return(MyDAL.GetById(connectionString, id)); }
public BillsModel() { Dal = MyDAL.Instance; InitData(); this.PropertyChanged += Model_Calculate; }