public ActionResult List(data_list model)
        {
            data_list        user      = new data_list();
            List <data_list> user_list = user.GetAll();

            return(View(user_list));
        }
        public ActionResult Add(FormCollection data)
        {
            data_list users = new data_list();

            users.RecordName  = data["RecordName"];
            users.StudentID   = int.Parse(data["StudentID"]);
            users.Name        = data["Name"];
            users.TelNumber   = data["TelNumber"];
            users.Address     = data["Address"];
            users.Email       = data["Email"];
            users.Username    = data["Username"];
            users.MothersName = data["MothersName"];
            users.MTelNumber  = data["MTelNumber"];
            users.Add();
            return(RedirectToAction("Admin", "Users"));
        }
        public ActionResult Edit(int RecordID)
        {
            if (RecordID <= 0)
            {
                       
                {
                    return(RedirectToAction("List", "Admin"));
                }
            }

            data_list user_list = new data_list();

            user_list = user_list.Get(RecordID);

            if (user_list.RecordID == 0)
            {
                return(RedirectToAction("List", "Admin"));
            }
            else
            {
                return(View(user_list));
            }
        }
 public ActionResult Save(data_list model)
 {
     model.Add();
     return(RedirectToAction("Admin", "Users"));
 }
 public ActionResult Delete(data_list model)
 {
     model.Delete();
     return(RedirectToAction("List", "Users"));
 }
 public ActionResult Edit(data_list model)
 {
     model.Edit();
     return(RedirectToAction("List", "Admin"));
 }