public ActionResult EditNetworkOperator(int id)
        {
            var             networkOperatorDAO = new NetworkOperatorDAO();
            NetworkOperator networkOperator    = networkOperatorDAO.getNetworkOperatorEdit(id);

            return(View(networkOperator));
        }
Ejemplo n.º 2
0
        public ActionResult NetworkOperatorPartial()
        {
            int idCustomer         = Int32.Parse(Session["IDCustomer"].ToString());
            var networkOperatorDAO = new NetworkOperatorDAO();
            IEnumerable <NetworkOperator> listNetworkOperators = networkOperatorDAO.getNetworkOperator(idCustomer);

            return(PartialView(listNetworkOperators));
        }
Ejemplo n.º 3
0
        public void SetViewBagNetworkOperator(int?selectedIDNetworkOperator = null)
        {
            int idCustomer          = Int32.Parse(Session["IDCustomer"].ToString());
            var networkOperatorDAO  = new NetworkOperatorDAO();
            var listNetworkOperator = networkOperatorDAO.getNetworkOperator(idCustomer);

            ViewBag.IDNetworkOperator = new SelectList(listNetworkOperator, "IDNetworkOperator", "NetworkOperatorName", selectedIDNetworkOperator);
        }
        public ActionResult DeleteNetworkOperator(int id)
        {
            var networkOperatorDAO = new NetworkOperatorDAO();

            networkOperatorDAO.deleteIDNetworkOperatorinContact(id);
            networkOperatorDAO.deleteNetworkOperator(id);
            return(RedirectToAction("NetworkOperator", "NetworkOperator"));
        }
        public ActionResult NetworkOperator()
        {
            int idCustomer         = Int32.Parse(Session["IDCustomer"].ToString());
            var networkOperatorDAO = new NetworkOperatorDAO();
            IEnumerable <NetworkOperator> listNetworkOperator        = networkOperatorDAO.getNetworkOperator(idCustomer);
            IEnumerable <NetworkOperator> listNetworkOperatorDisplay = networkOperatorDAO.getNetworkOperatorDisplay(listNetworkOperator, idCustomer);

            return(View(listNetworkOperatorDisplay));
        }
 public ActionResult EditNetworkOperator(NetworkOperator model)
 {
     if (!ModelState.IsValid)
     {
         var networkOperatorDAO = new NetworkOperatorDAO();
         networkOperatorDAO.updateNetworkOperator(model);
         return(RedirectToAction("NetworkOperator", "NetworkOperator"));
     }
     ModelState.AddModelError("", "Please enter the Network operator name");
     return(View());
 }
 public ActionResult CreateNetworkOperator(NetworkOperator model)
 {
     if (ModelState.IsValid)
     {
         var networkOperatorDAO = new NetworkOperatorDAO();
         networkOperatorDAO.insertNetworkOperator(model, Int32.Parse(Session["IDCustomer"].ToString()));
         return(RedirectToAction("NetworkOperator", "NetworkOperator"));
     }
     ModelState.AddModelError("", "Please enter the Network operator name");
     return(View());
 }