Пример #1
0
        private void ppCustomer_ParseEditValue(object sender, DevExpress.XtraEditors.Controls.ConvertEditValueEventArgs e)
        {
            SalesOrder so = (SalesOrder)salesOrderBindingSource.DataSource;

            if (e.Value == null || (e.Value is int && (int)e.Value <= 0))
            {
                so.CustomerInfo = null;
            }
            else
            {
                if (e.Value is DataRowView)
                {
                    e.Value = (int)((DataRowView)e.Value).Row["ClientID"];
                }
                else if (e.Value is DataRow)
                {
                    e.Value = (int)((DataRow)e.Value)["ClientID"];
                }
                else
                {
                }

                if (e.Value is int)
                {
                    so.CustomerInfo = ((DataView)((CTechCore.Tools.CustomControls.CustomSearchEditor)sender).Properties.DataSource).Table.Select($"ClientID = {(int)e.Value} ").FirstOrDefault();
                }
            }
        }
Пример #2
0
 private void HandleParseEditValue(object sender, DevExpress.XtraEditors.Controls.ConvertEditValueEventArgs e)
 {
     if (e.Value == null)
     {
     }
     else
     {
         if (e.Value is DataRow)
         {
         }
         else
         {
         }
     }
 }
Пример #3
0
 private void treeList1_CustomFilterDisplayText(object sender, DevExpress.XtraEditors.Controls.ConvertEditValueEventArgs e)
 {
 }
Пример #4
0
 /// <summary>
 /// Utilizar para customizar el texto que aparece como EditValue al elegir un elemento de la grilla
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ListaEditValue(object sender, DevExpress.XtraEditors.Controls.ConvertEditValueEventArgs e)
 {
     //grdRecursos.Properties.View.get
     e.Handled = false;
     e.Value   = "La puta madre...";
 }