//
        // GET: /AdminLogin/Create
        public ActionResult Create()
        {
            if (!Authenticate().Equals("admin"))
            {
                return CantGoHere();
            }

            PLAdminLogin PL_AdminLogin = new PLAdminLogin();
            return View("Create", PL_AdminLogin);
        }
 private static SLAdminLogins.AdminLogin DTO_to_SL(PLAdminLogin PL_AdminLogin)
 {
     SLAdminLogins.AdminLogin SL_AminLogin = new SLAdminLogins.AdminLogin();
     SL_AminLogin.admin_id = PL_AdminLogin.admin_id;
     SL_AminLogin.admin_name = PL_AdminLogin.admin_name;
     SL_AminLogin.admin_password = PL_AdminLogin.admin_password;
     SL_AminLogin.first_name = PL_AdminLogin.first_name;
     SL_AminLogin.middle_name = PL_AdminLogin.middle_name;
     SL_AminLogin.last_name = PL_AdminLogin.last_name;
     return SL_AminLogin;
 }
        public ActionResult Create(FormCollection collection)
        {
            try
            {
                if (!Authenticate().Equals("admin"))
                {
                    return CantGoHere();
                }

                PLAdminLogin PL_AdminLogin = new PLAdminLogin();
                PL_AdminLogin.admin_name = collection["admin_name"];
                PL_AdminLogin.admin_password = collection["admin_password"];
                PL_AdminLogin.first_name = collection["first_name"];
                PL_AdminLogin.middle_name = collection["middle_name"];
                PL_AdminLogin.last_name = collection["last_name"];
                AdminLoginClientService.CreateAdmin(PL_AdminLogin);
                return RedirectToAction("Index");
            }
            catch
            {
                return View("Create");
            }
        }
 public static void UpdateAdmin(PLAdminLogin PL_AdminLogin)
 {
     string[] errors = new string[0];
     SLAdminLogins.ISLAdminLogins SLAdminLogins = new SLAdminLogins.SLAdminLoginsClient();
     SLAdminLogins.UpdateAdmin(DTO_to_SL(PL_AdminLogin), ref errors);
 }