コード例 #1
0
        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();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
 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 = "";
         }
     }
 }
コード例 #4
0
 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);
     }
 }
コード例 #5
0
        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();
        }
コード例 #6
0
ファイル: FormAddTask.cs プロジェクト: careysoft/SqlData
 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;
     }
 }
コード例 #7
0
 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);
     }
 }
コード例 #8
0
 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();
     }
 }
コード例 #9
0
        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;
                }
            }
        }
コード例 #10
0
        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);
            }
        }
コード例 #11
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;
            }
        }
コード例 #12
0
 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());
     }
 }
コード例 #13
0
        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;
            }
        }
コード例 #14
0
        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;
            }
        }
コード例 #15
0
ファイル: frmCheckOut.cs プロジェクト: hezhangxi/rms
 /// <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);
     }
 }
コード例 #16
0
        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();
        }
コード例 #17
0
 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;
     }
 }
コード例 #18
0
ファイル: frmTraCuuHvCu.cs プロジェクト: vhtrieu/HLTV
 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;
     }
 }
コード例 #19
0
 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());
     }
 }
コード例 #20
0
        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;
            }
        }
コード例 #21
0
 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;
         }
     }
 }
コード例 #22
0
        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;
            //}
        }
コード例 #23
0
        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;
                }
            }
        }
コード例 #24
0
 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);
     }
 }
コード例 #25
0
 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;
         }
     }
 }
コード例 #26
0
        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("请选择对应资源的动作。");
                }
            }
        }
コード例 #27
0
 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;
         }
     }
 }
コード例 #28
0
 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;
                }
            }
        }
コード例 #30
0
 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;
             }
         }
     }
 }