private void te_zonghe1_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { int r_ret = 0; if (!Int32.TryParse(te_zonghe1.Text, out r_ret)) { //e.Cancel = true; // MessageBox.Show("请输入数字"); } this.XmaxX2CDeltaX = r_ret; GetAllpoints(); }
private void textEdit1_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (e.NewValue == e.OldValue || e.NewValue.ToString().Length < 5) { return; } IEnumerable <SOCIONEGOCIO> sociosNegocio = null; sociosNegocio = facturaServicio.buscarSociosDeNegocio(e.NewValue.ToString(), CredencialUsuario.getInstancia().getEmpresaSeleccionada().CODIGOEMPRESA); gridControlBusqueda.DataSource = sociosNegocio.ToList(); }
private void txtAlisFiyati_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (e.NewValue != null) { if (e.NewValue.ToString().Length > 10) { e.Cancel = true; MessageBox.Show("Çok Uzun Bir Değer Girdiniz"); txtAlisFiyati.Text = ""; } } }
private void chk_Aprobacion_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { try { gridViewAprobacion.SetRowCellValue(gridViewAprobacion.FocusedRowHandle, colCheck, e.NewValue); } catch (Exception ex) { Log_Error_bus.Log_Error(ex.ToString()); MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void te_caijipaoci_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { int r_ret = 0; if (!Int32.TryParse(te_caijipaoci.Text, out r_ret)) { //e.Cancel = true; // MessageBox.Show("请输入数字"); } SValue = r_ret; GetAllpoints(); }
private void repositoryItemImageComboBox5_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { Model.T_D_TASK_SLVModel model = gridView1.GetFocusedRow() as Model.T_D_TASK_SLVModel; if (model == null) { return; } if (model.TASKTYPE == "1") { e.Cancel = true; } }
private void EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { try { BaseEdit obj = (sender as BaseEdit); bool isEdit = false; if (mainTable == null || isSetValue) { } else { foreach (DataColumn dc in mainTable.Columns) { if (obj.Name.Substring(3).Equals(dc.Caption, StringComparison.InvariantCultureIgnoreCase)) { foreach (DataRow dr in mainTable.Select("", "", DataViewRowState.CurrentRows)) { if (e.NewValue == null) { dr[dc.Caption] = DBNull.Value; } else { dr[dc.Caption] = e.NewValue; } isEdit = true; } } } if (isEdit && !barSave.Enabled) { if (obj.Name == "txtStatus") { setStatusDataSourceFilter("EDIT"); } else { txtStatus.ReadOnly = true; } barNew.Enabled = false; barSave.Enabled = true; barDelete.Enabled = false; barCancel.Enabled = true; barRefresh.Enabled = false; } } } catch (Exception ex) { DevExpress.XtraEditors.XtraMessageBox.Show(ex.Message); } }
private void txtEfectivo_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (e.NewValue.ToString() == string.Empty) { txtTotal.Text = total.ToString(); return; } txtTotal.Text = (float.Parse(txtCuenta.Text) - float.Parse(e.NewValue.ToString())).ToString(); if (txtEfectivoSinDescuento.Text != string.Empty) { txtCambio.Text = (float.Parse(txtEfectivoSinDescuento.Text) - float.Parse(txtTotal.Text)).ToString(); } }
private void txtChiSoVe_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { int result = 0; if (e.NewValue != null && int.TryParse(e.NewValue.ToString(), out result)) { if (result < 0) { e.NewValue = 0; e.Cancel = true; } } }
private void Servicio_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { var servicio = Promowork_dataDataSetCombustible.TiposServicios.FindByIdServicio((int)e.NewValue); try { gridView2.SetFocusedRowCellValue("Precio", servicio.PrecioServicio); } catch { gridView2.SetFocusedRowCellValue("Precio", 0); } }
private void gridText_Heso_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (e.NewValue.ToString().Length > 10) { e.Cancel = true; } if ("" + e.NewValue == "") { gridView1.SetFocusedRowCellValue(gridView1.Columns["Heso"], null); e.Cancel = true; } }
private void txt_num_cuotas_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { try { Calcular_Cuotas(); } catch (Exception ex) { string NameMetodo = System.Reflection.MethodBase.GetCurrentMethod().Name; MessageBox.Show(param.Get_Mensaje_sys(enum_Mensajes_sys.Error_comunicarse_con_sistemas) + ex.Message + " ", param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error); Log_Error_bus.Log_Error(NameMetodo + " - " + ex.ToString()); } }
private void txtHeso_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (e.NewValue.ToString().Length > 10) { e.Cancel = true; } if ("" + e.NewValue == "") { //txtHeso.EditValue = null; e.Cancel = true; } }
private void repCustomers_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { Member mb = e.NewValue as Member; layoutViewBills.SetRowCellValue(layoutViewBills.FocusedRowHandle, "CusID", mb.UseName); layoutViewBills.SetRowCellValue(layoutViewBills.FocusedRowHandle, "CusName", mb.FullName); if (current != null) { current.CusID = mb.UseName; current.CusName = mb.FullName; current.CusInfo = mb; } }
/// <summary> /// Handles the EditValueChanging event of the spDisCount control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DevExpress.XtraEditors.Controls.ChangingEventArgs"/> instance containing the event data.</param> /// 创建人:桂书丛 /// 创建日期:2013-02-23 private void spDisCount_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { try { double DisCount = Convert.ToDouble(this.spDisCount.EditValue) * 0.1; double TotalAmount = Convert.ToDouble(this.txtTotalAmount.EditValue) * DisCount; this.txtShouldPay.EditValue = TotalAmount; } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
private void resQuantity_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { ST_StockTransactionDetailDto detailDto = dgcInventory.GetFocusedRow <ST_StockTransactionDetailDto>(); decimal amount = CommonMethod.ParseDecimal(detailDto.UnitPrice) * CommonMethod.ParseDecimal(e.NewValue); dgcInventory.SetRowCellValue(CommonKey.Amount, CommonMethod.ParseString(amount)); //DataRow row = dgvInventory.GetDataRow(dgvInventory.FocusedRowHandle); //decimal unitPrice = CommonMethod.ParseDecimal(row["UnitPrice"]); //decimal quantity = CommonMethod.ParseDecimal(e.NewValue); //row["Amount"] = unitPrice * quantity; //dgvInventory.RefreshData(); }
private void gridText_Dinhmuc_No_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (e.NewValue.ToString() == "") { gvDm_Khahhang.SetFocusedRowCellValue("Dinhmuc_No", null); e.Cancel = true; return; } if (e.NewValue.ToString().Length > 9) { e.Cancel = true; } }
private void txtSearchText_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (txtSearchText.Text != string.Empty) { searchHocVien(txtSearchText.Text); } else { gridStudentsList.DataSource = null; gridMarks.DataSource = null; gridLop.DataSource = null; } }
private void cmb_nomina_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { try { IdNomina_tipo = Convert.ToInt32(e.NewValue); Get_nomina_tipo(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); Log_Error_bus.Log_Error(ex.ToString()); } }
private void repositoryItemTextEdit2_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (e.NewValue != null) { if (e.NewValue.ToString() == "" || e.NewValue.ToString() == "0") { e.Cancel = true; } //if (e.NewValue.ToString().Length > 10) // e.Cancel = true; } }
private void cbo_MAHD_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { for (int i = 0; i < gridView1.RowCount; i++) { if (cbo_MaHH.Text != gridView1.GetRowCellValue(i, MAHH).ToString()) //asdasdadddddddddddddddddd { txt_dongia.Text = null; cbo_MANCC.Text = null; txt_tenHH.Text = null; txt_soluong.Text = null; } } }
private void numPayment_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { decimal remain = Static.ToDecimal(numRemain.EditValue); decimal paid = Static.ToDecimal(numPaid.EditValue); decimal now = Static.ToDecimal(e.NewValue); //if (_pflag_last != 0 && remain < now + paid) //if (remain < paid) //{ // _core.AlertShow("Төлбөр", "Төлбөрийн дүн төлөх дүнгээс их байх ёсгүй!", 2); // e.Cancel = true; //} }
private void txtManChk_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { object obj = e.NewValue; if (obj != null && obj != DBNull.Value) { if (Convert.ToInt32(obj) <= 0) { e.Cancel = true; return; } } }
private void EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { try { SetPropertiesModified(true); } catch (System.Exception f) { DevExpress.XtraEditors.XtraMessageBox.Show( "Ошибка изменения значения.\n\nТекст ошибки : " + f.Message, "Внимание", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); } }
private void CbLanguages_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { foreach (string name in Enum.GetNames(typeof(SupportedLanguage))) { if (e.NewValue.ToString().CompareTo(name) == 0) { LanguageManager.ChangeLanguage((SupportedLanguage)Enum.Parse(typeof(SupportedLanguage), name), this); RegistrySettings.Language = name; RegistrySettings.Save(); break; } } }
private void repositoryItemLookUpEdit2_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { Privilege currentPrivilege = this.CurrentPrivilege; if (currentPrivilege != null) { Action act = Action.GetAction((Guid)e.NewValue); if (act.ResId != currentPrivilege.ResId) { e.NewValue = e.OldValue; MessageBox.Show("请选择对应资源的动作。"); } } }
private void gridText_Tygia_Vnd_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (e.NewValue.ToString() == "" || e.NewValue.ToString() == "0") { e.Cancel = true; } if (e.NewValue != null) { if (e.NewValue.ToString().Length > 12) { e.Cancel = true; } } }
private void txtSearchInput_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (txtSearchInput.Text != string.Empty) { mSearchBy = int.Parse(lookSearchBy.GetColumnValue("ID").ToString()); mSearchCon = int.Parse(lookCondition.GetColumnValue("ID").ToString()); gridNewClass.DataSource = sSearch(mSearchBy); } else if (txtSearchInput.Text == string.Empty) { ((DataTable)gridNewClass.DataSource).Rows.Clear(); } }
static void TextEdit_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { TextEdit currentTextEdit = sender as TextEdit; ListBoxControl currentListBox = currentTextEdit.Tag as ListBoxControl; if (e.NewValue != null) { int iSelectedIndex = currentListBox.FindString(e.NewValue.ToString()); if (iSelectedIndex >= 0 && iSelectedIndex < currentListBox.Items.Count) { currentListBox.SelectedIndex = iSelectedIndex; } } }
private void txtTTGhiChu_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) { if (FormStatus == EnumFormStatus.MODIFY) { if (gvGrid.FocusedColumn == colTT_GHICHU) { if (!clsChangeType.change_bool(gvGrid.GetFocusedRowCellValue(colTT_BTC))) { clsMessage.MessageInfo("Hội đồng xét trúng thầu mới cho phép cập nhật ghi chú"); e.Cancel = true; } } } }