示例#1
0
文件: Form1.cs 项目: loya/Creator
        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();
            }
        }
示例#2
0
文件: Form1.cs 项目: loya/Creator
 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());
     }
 }
示例#3
0
文件: Form1.cs 项目: loya/Creator
        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());
            }
        }
示例#4
0
文件: Form1.cs 项目: loya/Creator
 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();
     }
 }