Beispiel #1
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     using (frmTemplateSysAssitant fa = new frmTemplateSysAssitant())
     {
         fa.Flag = "NEW";
         if (fa.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             MessageBox.Show("新增成功", this.funName, MessageBoxButtons.OK);
         }
     }
 }
Beispiel #2
0
        /// <summary>
        /// 修改列信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (dgvCols.SelectedRows.Count != 1)
            {
                MessageBox.Show("请选择一条记录后进行操作", this.funName, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            using (frmTemplateSysAssitant fa = new frmTemplateSysAssitant())
            {
                fa.Flag  = "UPDATE";
                fa.ColID = (int)dgvCols.SelectedRows[0].Cells[0].Value;  // fa.TaxPlayerID = (int)dgvPlayers.SelectedRows[0].Cells[0].Value;
                if (fa.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    loadCols();
                }
            }
        }