Esempio n. 1
0
        public ActionResult Update(ACTIONModel model)
        {
            var da = new ACTIONDA();

            da.DTO.Model.ID            = model.ID;
            da.DTO.Execute.ExecuteType = ACTIONExecuteType.GetByID;
            da.Select(da.DTO);

            return(View(da.DTO.Model));
        }
Esempio n. 2
0
        public ActionResult SaveDelete(ACTIONModel model)
        {
            var da = new ACTIONDA();

            da.DTO.Model.ID            = model.ID;
            da.DTO.Execute.ExecuteType = ACTIONExecuteType.Delete;
            da.Delete(da.DTO);

            return(Json(true, JsonRequestBehavior.AllowGet));
        }
Esempio n. 3
0
        public ActionResult Delete(ACTIONModel model)
        {
            var da = new ACTIONDA();

            da.DTO.Model.ID            = model.ID;
            da.DTO.Execute.ExecuteType = ACTIONExecuteType.Delete;
            da.Delete(da.DTO);

            return(RedirectToAction("View"));
        }
Esempio n. 4
0
        public ActionResult UpdateEF(ACTIONModel model)
        {
            var da = new ACTIONDA();

            da.DTO.Model.ID            = model.ID;
            da.DTO.Execute.ExecuteType = ACTIONExecuteType.UpdateEF;
            da.UpdateNoEF(da.DTO);

            return(RedirectToAction("View"));
        }
Esempio n. 5
0
        public ActionResult SearchALl(ACTIONModel model)
        {
            var da = new ACTIONDA();

            //da.DTO.Model.ID = model.ID;
            //da.DTO.Model.DATA = model.DATA;
            da.DTO.Execute.ExecuteType = ACTIONExecuteType.GetAll;
            da.Select(da.DTO);

            return(Json(new { data = da.DTO.Models }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 6
0
        public ActionResult SaveUpdate(ACTIONModel model)
        {
            var da = new ACTIONDA();

            da.DTO.Model.ID            = model.ID;
            da.DTO.Model.DATA          = model.DATA;
            da.DTO.Execute.ExecuteType = ACTIONExecuteType.Update;
            da.Update(da.DTO);

            return(RedirectToAction("Index"));
        }
Esempio n. 7
0
        public ActionResult SearchEF(ACTIONModel model)
        {
            var da = new ACTIONDA();

            //da.DTO.Model.ID = model.ID;
            //da.DTO.Model.DATA = model.DATA;
            da.DTO.Execute.ExecuteType = ACTIONExecuteType.GetAllEF;
            da.SelectNoEF(da.DTO);

            return(RedirectToAction("View"));
        }
Esempio n. 8
0
        public ActionResult InsertEF(ACTIONModel model)
        {
            var da = new ACTIONDA();

            da.DTO.Model.ID            = model.ID;
            da.DTO.Model.DATA          = model.DATA;
            da.DTO.Execute.ExecuteType = ACTIONExecuteType.InsertEF;
            da.InsertNoEF(da.DTO);

            return(RedirectToAction("View"));
        }
Esempio n. 9
0
        public ActionResult SaveInsert(ACTIONModel model)
        {
            var da = new ACTIONDA();

            da.DTO.Model.ID            = model.ID;
            da.DTO.Model.DATA          = model.DATA;
            da.DTO.Execute.ExecuteType = ACTIONExecuteType.Insert;
            da.Insert(da.DTO);

            if (da.DTO.Result.IsResult)
            {
                return(Json(da.DTO.Result, JsonRequestBehavior.AllowGet));
            }

            return(Json(da.DTO.Result, JsonRequestBehavior.AllowGet));
        }
Esempio n. 10
0
 public ActionResult Insert(ACTIONModel model)
 {
     return(View());
 }