Esempio n. 1
0
        /// <summary>
        /// 删除操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDel_Click(object sender, EventArgs e)
        {
            if (gridView4.FocusedRowHandle < 0)
            {
                m_app.CustomMessageBox.MessageShow("请选择要删除的记录");
                return;
            }
            DataRow foucesRow = gridView4.GetDataRow(gridView4.FocusedRowHandle);

            if (foucesRow == null)
            {
                m_app.CustomMessageBox.MessageShow("请选择要删除的记录");
                return;
            }
            if (DialogResult.OK == m_app.CustomMessageBox.MessageShow("您确定要删除该记录吗?", DrectSoft.Core.CustomMessageBoxKind.QuestionOkCancel))
            {
                try
                {
                    m_SqlManager.SaveData(SetEntityByPage(), "3");
                    m_app.CustomMessageBox.MessageShow("删除成功");
                    RefreshData("1");
                }
                catch (Exception)
                {
                    m_app.CustomMessageBox.MessageShow("删除失败");
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 删除操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDel_Click(object sender, EventArgs e)
        {
            string modelid = this.txtId.Text.Trim();

            if (modelid == "")
            {
                m_app.CustomMessageBox.MessageShow("请选择要删除的记录!");
                return;
            }
            try
            {
                m_SqlManager.SaveData(SetEntityByPage(), "3");
                m_app.CustomMessageBox.MessageShow("删除成功!");
                RefreshData("1");
            }
            catch (Exception)
            {
                m_app.CustomMessageBox.MessageShow("删除失败!");
            }
        }