コード例 #1
0
        protected void ucConfirmDialog_Yes(object sender)
        {
            ucConfirmDialog.Hide();
            string errMsg = string.Empty;
            Admins vcontroller = new Admins();
            int result = vcontroller.delete_Size(Convert.ToInt32(ucConfirmDialog.Key), ref errMsg);
            if (result > 0)
            {
                ucNotificationDialog.MessageContent = "xóa thành công!";
                ucNotificationDialog.MessageType = 1;
                ucNotificationDialog.RedirectUrl = "~/Admin/Sizes.aspx";
                ucNotificationDialog.Show();
            }
            else
            {
                if (result == -1) { ucNotificationDialog.MessageContent = "Bản ghi không tồn tại!<br/>Vui lòng kiểm tra lại."; }
                else { ucNotificationDialog.MessageContent = "Hệ thống gặp sự cố!<br/>Vui lòng liên hệ @ để được hỗ trợ."; }

                ucNotificationDialog.MessageType = 0;
                ucNotificationDialog.Show();
            }
        }