Update() публичный Метод

public Update ( ) : void
Результат void
Пример #1
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            DateTime currentDate = DateTime.Now;

            if (Request.Cookies["userLoginSystem"] != null)
            {
                string username = Request.Cookies["userLoginSystem"].Value;
                var    acc      = AccountController.GetByUsername(username);
                if (acc != null)
                {
                    if (acc.RoleID == 0)
                    {
                        int    ID = ViewState["ID"].ToString().ToInt(0);
                        string kq = AgentController.Update(ID, txtAgentName.Text, "", txtAddress.Text, txtPhone.Text, txtEmail.Text, txtAgentLeader.Text,
                                                           chkIsHidden.Checked, currentDate, username, "");
                        if (kq.ToInt(0) > 0)
                        {
                            PJUtils.ShowMessageBoxSwAlert("Cập nhật thành công", "s", true, Page);
                        }
                    }
                }
            }
            else
            {
                Response.Redirect("/dang-nhap");
            }
        }
Пример #2
0
        public void Update()
        {
            Console.Clear();
            Console.WriteLine("Enter id of record you want to change:");
            var id = Int32.Parse(Console.ReadLine());

            var entity = controller.Find(id);

            controller.Update(entity);
        }