Beispiel #1
0
        private void dgv_BundledList_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            if (!(dgv_BundledList.Columns[e.ColumnIndex] is DataGridViewButtonColumn))
            {
                return;
            }
            using (DelayParam dp = DelayParam.Instance)
            {
                dp.ShowDialog();
                if (dp.Tag == null)
                {
                    return;
                }
                DelayParamValue param     = (DelayParamValue)dp.Tag;
                CardInfo        mcardinfo = _mBundledViceCard[e.RowIndex];
                dgv_BundledList.Rows[e.RowIndex].Cells[3].Value = param.DelayTime != mcardinfo.CardTime ? param.DelayTime : DateTime.MinValue;
                dgv_BundledList.Rows[e.RowIndex].Cells[4].Value = param.Partition != mcardinfo.CardPartition ? param.Partition : mcardinfo.CardPartition;

                mcardinfo.CardTime      = param.DelayTime;
                mcardinfo.CardPartition = param.Partition;
            }
        }
Beispiel #2
0
 private void btn_BatchDelay_Click(object sender, EventArgs e)
 {
     using (DelayParam dp = DelayParam.Instance)
     {
         dp.ShowDialog();
         if (dp.Tag == null)
         {
             return;
         }
         DelayParamValue param = (DelayParamValue)dp.Tag;
         for (int i = 0; i < dgv_BundledList.RowCount; i++)
         {
             if ((bool)dgv_BundledList.Rows[i].Cells["cSelected"].Value)
             {
                 CardInfo mcardinfo = _mBundledViceCard[i];
                 dgv_BundledList.Rows[i].Cells[3].Value = param.DelayTime != mcardinfo.CardTime ? param.DelayTime : DateTime.MinValue;
                 dgv_BundledList.Rows[i].Cells[4].Value = param.Partition != mcardinfo.CardPartition ? param.Partition : mcardinfo.CardPartition;
                 mcardinfo.CardTime      = param.DelayTime;
                 mcardinfo.CardPartition = param.Partition;
             }
         }
     }
 }