コード例 #1
0
        private void btn_NewCard_Click(object sender, EventArgs e)
        {
            DialogUpdateCard newCardDialog = new DialogUpdateCard();

            newCardDialog.ShowDialog(this);
            label_AllCard.Text = "共有卡片 " + DB_Service.MainDataSet.Tables["CardTable"].Rows.Count.ToString() + " 张。其中有 " + DB_Service.MainDataSet.Tables["CardTable"].Select("PID is null").Length.ToString() + " 张尚未与员工绑定。";
        }
コード例 #2
0
 private void btn_UpdateCardType_Click(object sender, EventArgs e)
 {
     if (dataGridView_Card.SelectedRows.Count > 0)
     {
         int       UpdateCardID = Convert.ToInt32(dataGridView_Card.SelectedRows[0].Cells["CardID"].Value);
         DataRow[] rows         = DB_Service.MainDataSet.Tables["CardTable"].Select("CardID = " + UpdateCardID);
         if (rows.Length > 0)
         {
             DialogUpdateCard updateCardDialog = new DialogUpdateCard(UpdateCardID, rows[0]["CardType"].ToString());
             updateCardDialog.ShowDialog(this);
         }
         else
         {
             MessageBox.Show("您欲修改的卡片不存在。", "修改卡片", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     else
     {
         MessageBox.Show("请先选择一个您要修改的卡片。", "修改卡片", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }