Example #1
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     this.DialogResult = DialogResult.OK;
     this.Operation = new OperationModel
         {
             DataType = typeof(string),
             FieldName = cmbField.Text,
             //Operation = XmlTransformOperation.TryParse(cmbOperation.Text)
             Value =  txtValue.Text
         };
     OperationTypeEnum op;
     Enum.TryParse(cmbOperation.Text, true, out op);
     this.Operation.OperationType = op;
     if (op == OperationTypeEnum.Toplama || op == OperationTypeEnum.Carpma)
     {
         this.Operation.Value = OperationModel.floatToStr(OperationModel.stringToFloat(txtValue.Text));
     }
     this.Close();
 }
Example #2
0
        private void OperationControl_Load(object sender, EventArgs e)
        {
            cmbOperationType.Items.AddRange(Enum.GetNames(typeof (OperationTypeEnum)).ToArray<object>());

            if (_fieldList == null)
                _fieldList = new List<string>();

            cmbFieldName.Items.AddRange(_fieldList.ToArray<object>());

            if (this._operation != null)
            {
                setFields();
            }
            else
            {
                _operation = new OperationModel();
            }
            _loaded = true;
        }
Example #3
0
 public OperationControl()
 {
     _operation = new OperationModel();
     InitializeComponent();
 }