Beispiel #1
0
        public ActionResult Delete(UserDetailsDto dto)
        {
            OpUserDelete delet = new OpUserDelete();

            delet.Uuid = dto.UUID;
            var result = _manager.ExecuteOperation(delet);

            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteUser(UserDto dto)
        {
            OpUserDelete op = new OpUserDelete();

            op.Uuid = dto.Uuid;

            OperationResult result = OperationManager.Singleton.ExecuteOperation(op);

            TempData["Success"] = "Deleted Successfully!";
            return(RedirectToAction("Index"));
        }
        protected void btnUserDelete_Click(object sender, EventArgs e)
        {
            Button taster = (Button)sender;
            int    args   = Convert.ToInt32(taster.CommandArgument);

            OpUserDelete oud = new OpUserDelete();

            oud.IdUser = args;
            OperationResult obj = OperationManager.Singleton.executeOperation(oud);

            if ((obj == null) || (!obj.Status))
            {
                return;
            }
            else
            {
                Response.Redirect(Request.RawUrl);
                GridView1.DataSource = obj.DbItems;
                GridView1.DataBind();
            }
        }