Beispiel #1
0
        private void lbSelectedCardTypes_DoubleClick(object sender, EventArgs e)
        {
            var key       = ((CreatorDataSet.CardTypeRow)lbSelectedCardTypes.SelectedItem).CardTypeName;
            var condition = (CustomerCondition)htConditions[key];
            var frm       = new frmConditon(condition.ShallowCopy());

            if (frm.ShowDialog() == DialogResult.OK)
            {
                htConditions[key] = frm.CustomerCondition.ShallowCopy();
            }
        }
Beispiel #2
0
 private void AddSelecedCardType()
 {
     if (lbCardTypes.SelectedItems.Count == 0)
     {
         MessageBox.Show("请选择至少一个卡类别!");
         return;
     }
     var frm = new frmConditon();
     if (frm.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
         return;
     var selectedCardTypes = (from CreatorDataSet.CardTypeRow item in lbCardTypes.SelectedItems select (item)).Cast<object>().ToList();
     foreach (CreatorDataSet.CardTypeRow item in selectedCardTypes)
     {
         lbCardTypes.Items.Remove(item);
         lbSelectedCardTypes.Items.Add(item);
         htConditions.Add(item.CardTypeName, frm.CustomerCondition.ShallowCopy());
     }
 }
Beispiel #3
0
        private void AddSelecedCardType()
        {
            if (lbCardTypes.SelectedItems.Count == 0)
            {
                MessageBox.Show("请选择至少一个卡类别!");
                return;
            }
            var frm = new frmConditon();

            if (frm.ShowDialog() == System.Windows.Forms.DialogResult.Cancel)
            {
                return;
            }
            var selectedCardTypes = (from CreatorDataSet.CardTypeRow item in lbCardTypes.SelectedItems select(item)).Cast <object>().ToList();

            foreach (CreatorDataSet.CardTypeRow item in selectedCardTypes)
            {
                lbCardTypes.Items.Remove(item);
                lbSelectedCardTypes.Items.Add(item);
                htConditions.Add(item.CardTypeName, frm.CustomerCondition.ShallowCopy());
            }
        }
Beispiel #4
0
 private void lbSelectedCardTypes_DoubleClick(object sender, EventArgs e)
 {
     var key = ((CreatorDataSet.CardTypeRow)lbSelectedCardTypes.SelectedItem).CardTypeName;
     var condition = (CustomerCondition)htConditions[key];
     var frm = new frmConditon(condition.ShallowCopy());
     if (frm.ShowDialog() == DialogResult.OK)
     {
         htConditions[key] = frm.CustomerCondition.ShallowCopy();
     }
 }