Example #1
0
 /// <summary>
 /// 新建
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnAdd_Click(object sender, EventArgs e)
 {
     using (frmAgentCAssistant fa = new frmAgentCAssistant())
     {
         fa.Flag = "NEW";
         if (fa.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             loadAgentCs();
         }
     }
 }
Example #2
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (dgvAgentCs.SelectedRows.Count != 1)
            {
                MessageBox.Show("请选择一行记录后进行操作", this.funName, MessageBoxButtons.OK);
                return;
            }

            using (frmAgentCAssistant fa = new frmAgentCAssistant())
            {
                fa.Flag = "UPDATE";
                fa.ACID = (int)dgvAgentCs.SelectedRows[0].Cells[0].Value;
                if (fa.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    loadAgentCs();
                }
            }
        }