private void grd_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { try { if (e.Cell == null) { return; } var item = (planDto)e.Cell.Row.ListObject; item.Editado = true; if (e.Cell.Column.Key.Equals("EsDeducible")) { var estado = Convert.ToBoolean(e.Cell.EditorResolved.Value.ToString()); e.Cell.Row.Cells["EsCoaseguro"].SetValue(!estado, false); } if (e.Cell.Column.Key.Equals("EsCoaseguro")) { var estado = Convert.ToBoolean(e.Cell.EditorResolved.Value.ToString()); e.Cell.Row.Cells["EsDeducible"].SetValue(!estado, false); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void grd_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { try { var f = new frmLineaSelector(); f.ShowDialog(); var linea = f.LineaSeleccionada; if (linea == null) { return; } if (!_gridDataSouce.Any(p => p.v_IdUnidadProductiva != null && p.v_IdUnidadProductiva.Equals(linea.IdLinea))) { var fila = grd.ActiveRow; var item = (planDto)fila.ListObject; fila.Cells["v_IdUnidadProductiva"].SetValue(linea.IdLinea, false); fila.Cells["NombreLinea"].SetValue(linea.Nombre, false); fila.Cells["v_OrganizationSeguroId"].SetValue(_aseguradoraId, false); fila.Cells["v_ProtocoloId"].SetValue(_protocolId, false); item.Editado = true; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void dgvDatos_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { try { if (e.Cell.Column.Key == "Kilometros") { int Factura = Convert.IsDBNull((sender as UltraGrid).Rows[e.Cell.Row.Index].Cells["Factura"].Value) ? 0 : Convert.ToInt32((sender as UltraGrid).Rows[e.Cell.Row.Index].Cells["Factura"].Value); int Kilometros = Convert.IsDBNull((sender as UltraGrid).Rows[e.Cell.Row.Index].Cells["Kilometros"].Value) ? 0 : Convert.ToInt32((sender as UltraGrid).Rows[e.Cell.Row.Index].Cells["Kilometros"].Value); using (SqlConnection connection = new SqlConnection(ClasesSGUV.Propiedades.conectionLog)) { using (SqlCommand command = new SqlCommand("up_Logistica_Transportes", connection)) { command.CommandType = CommandType.StoredProcedure; command.Connection.Open(); command.Parameters.AddWithValue("@TipoConsulta", 2); command.Parameters.AddWithValue("@Factura", Factura); command.Parameters.AddWithValue("@Kilometros", Kilometros); command.Parameters.AddWithValue("@Usuario", ClasesSGUV.Login.Id_Usuario); command.ExecuteNonQuery(); command.Connection.Close(); } } } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void Grid_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (Convert.ToInt32(Grid.ActiveRow.Cells["Quantity"].Value.ToString()) == 0) { this.DeleteItem(false); } getTotals(); }
private void OnScheduleAfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //Event handler for change in a cell value try { //Apply cell rules } catch (Exception ex) { App.ReportError(ex, false, LogLevel.Warning); } }
private void ultraGridRCardList_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { this.ultraGridRCardList.UpdateData(); DataView dv = this.m_RcardList.Copy().DefaultView; dv.RowFilter = "Checked = 'true'"; this.ucLabelEditSelected.Value = dv.Count.ToString(); }
private void ugSimulationgropus_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (e.Cell.Column.Key == "Change Measure Order" && e.Cell.Row.Index > 0) { ugSimulationgropus.SuspendLayout(); ugSimulationgropus.Rows.Move(e.Cell.Row.ParentRow, e.Cell.Row.Index - 1); ugSimulationgropus.ResumeLayout(); } }
private void OnGridCellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //Event handler for change in a data entry cell value try { // //if(e.Cell.Row.Cells["Application"].Value.ToString() == "") // e.Cell.Row.Cells["Application"].Value = this.mTsortApp.DBConfiguration.ProductName; } catch (Exception ex) { App.ReportError(ex); } }
/**************************************************************************************************** * NAME : uGrid_Users_AfterCellUpdate * * DESCRIPTION : AfterCellUpdate Event call from uGrid_Users_AfterCellUpdate control * * WRITTEN BY : RajaSekar J * * DATE : 15Feb2018 * ****************************************************************************************************/ private void uGrid_Users_AfterCellUpdate(object sender, IWUG.CellEventArgs e) { try { uGrid_Users_CommonCellupdating(); } catch (Exception ex) { string str = ex.Message; } }
private void grd_mvto_ListaVersiones_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { Infragistics.Win.UltraWinGrid.UltraGridRow oRow; oRow = this.grd_mvto_ListaVersiones.ActiveRow; if (e.Cell.Column.Index == 0) { //string strRuta = "" + oFC_Modelo.CañoProceso.Trim(); //Dim frm As New frm_Adjunto //frm.ShowMe(intIdPac_Cabecera, 1, strRuta, grd_mvto_DocumntoComite) } }
private void grdSigners_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs args) { //Allows for only 1 row to be selected as "Primary" foreach (var item in grdSigners.Rows) { if (args.Cell.Row.Index != item.Index) { item.Cells["Primary"].Value = false; item.CancelUpdate(); } } }
/// <summary> /// Aktionen, welche beim Ändern der Grid-Zelle ausgeführt werden /// </summary> /// <param name="e"></param> protected override void OnCellChange(Infragistics.Win.UltraWinGrid.CellEventArgs e) { base.OnCellChange(e); // Wenn die Boolean-Wert im Grid geändert wird, soll die Aktualisierung des Grundobjektes // gleich angestößen werden (nicht erst beim Verlassen des Feldes) if (e.Cell.Column.DataType == typeof(System.Boolean)) { DataChangedCommit(new System.ComponentModel.CancelEventArgs()); } e.Cell.Row.Update(); }
private void ugdPredlosci_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (ugdPredlosci.DisplayLayout.Bands.Count > 0) { if (ugdPredlosci.DisplayLayout.Bands[0].Columns.Count > 0) { UpdatePredlosciAktivnost((int)ugdPredlosci.ActiveRow.Cells["ID Predloška"].Value, !(bool)ugdPredlosci.ActiveRow.Cells["Aktivan za obračun"].Value, ugdPredlosci.ActiveRow.Index); try { BusinessLogic.Predlosci.pSelectedIndex = ugdPredlosci.ActiveRow.Index; } catch { } LoadGridPredlosci(); } } }
private void OnGridCellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //Event handler for change in a cell value try { //Set cell defaults if applicable switch (e.Cell.Row.Band.Key) { case "TerminalConfigurationTable": if (e.Cell.Row.IsAddRow) { ; } break; } } catch (Exception ex) { reportError(ex); } }
private void OnScheduleAfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //Event handler for change in a cell value try { //Apply cell rules switch (e.Cell.Column.Key.ToString()) { case "NickName": //Max 8 chars (i.e. 3 char mnemonic plus 5 char store#) if (e.Cell.Text.Length > 8) { e.Cell.Value = e.Cell.Text.Substring(0, 8); e.Cell.SelStart = 8; } break; } } catch (Exception ex) { App.ReportError(ex, false, LogLevel.Warning); } }
private void ugServicios_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { ItemPlantillaServicio Item = (ItemPlantillaServicio)e.Cell.Row.Tag; switch (e.Cell.Column.Key) { case colUnidad: Item.Unidad = (ExistenciaUnidad)e.Cell.ValueList.GetValue(e.Cell.ValueList.SelectedItemIndex); break; case colCantidad: Item.Cantidad = Convert.ToDecimal(e.Cell.Text); break; default: break; } MostrarServicio(e.Cell.Row); }
private void ultraGrid1_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { try { string strMsg = ""; Product p = new Product(); if (e.Cell.Row.Cells.Exists("cnvcMemberCardNo")) { p.cnvcMemberCardNo = e.Cell.Row.Cells["cnvcMemberCardNo"].Value.ToString(); strMsg += "【会员卡号:" + p.cnvcMemberCardNo + "】\n"; } p.cnvcPaperNo = e.Cell.Row.Cells["cnvcPaperNo"].Value.ToString(); p.cnvcMemberName = e.Cell.Row.Cells["cnvcMemberName"].Value.ToString(); p.cnvcProduct = e.Cell.Row.Cells["cnvcProductName"].Value.ToString(); int iCount = int.Parse(e.Cell.Row.Cells["cnnCount"].Value.ToString()); strMsg += "【单位名称:" + p.cnvcMemberName + "】\n【工商注册号:" + p.cnvcPaperNo + "】\n【服务产品:" + p.cnvcProduct + "】\n【消费次数:" + iCount.ToString() + "】"; p.cnvcOperName = this.oper.cnvcOperName; p.cndOperDate = DateTime.Now; DialogResult dr2 = MessageBox.Show(this, strMsg, "服务产品消费信息确认", MessageBoxButtons.YesNo, MessageBoxIcon.Information); if (dr2 == DialogResult.Yes) { PrintedBill pBill = new PrintedBill(p.ToTable()); pBill.cnvcBillType = ConstApp.Bill_Type_Product_Use; pBill.cnvcProduct = p.cnvcProduct + ",,,," + iCount.ToString() + ","; MemberManageFacade memberManage = new MemberManageFacade(); PrintedBill retBill = memberManage.UserProduct(p, pBill, iCount); Helper.PrintTicket(retBill); //pMember = new Member(p.ToTable()); //this.ultraPrintDocument1.Print(); this.btnQuery_Click(null, null); } } catch (BusinessException bex) { MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error); } catch (System.Exception ex) { MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void OnGridCellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //Event handler for change in a cell value try { //If "Assign" cell, set or clear "AssignedDate" cell required value if (e.Cell.Column.Key.ToString() == "Assign") { if (Convert.ToBoolean(e.Cell.Text) == true) { e.Cell.Row.Cells["AssignedDate"].Value = DateTime.Today; } else { e.Cell.Row.Cells["AssignedDate"].Value = DateTime.MinValue; } this.OnValidateForm(null, null); } } catch (Exception) { } }
private void ultraGridMaterialList_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { this.ultraGridMaterialList.UpdateData(); if (string.Compare(e.Cell.Column.Key, "Checked", true) == 0) { if (string.Compare(e.Cell.Value.ToString(), "true", true) == 0) { for (int i = 0; i < this.ultraGridMaterialList.Rows.Count; i++) { if (this.ultraGridMaterialList.Rows[i] != e.Cell.Row && string.Compare(this.ultraGridMaterialList.Rows[i].Cells["Checked"].Value.ToString(), "true", true) == 0) { this.ultraGridMaterialList.Rows[i].Cells["Checked"].Value = "false"; } } } this.ultraGridMaterialList.UpdateData(); } }
private void ultraGrid2_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (e.Cell.Column.Key == "CHK") { if (!Convert.ToBoolean(e.Cell.Value)) { if (grid2Index > -1 && e.Cell.Row.Index != grid2Index) { ultraGrid2.Rows[grid2Index].Cells["CHK"].Value = "FALSE"; } grid2Index = e.Cell.Row.Index; ultraTextEditor3.Text = e.Cell.Row.Cells["FS_POTNO"].Value.ToString(); } else { grid2Index = -1; ultraTextEditor3.Text = string.Empty; } ultraGrid2.UpdateData(); } }
private void dgvDatos_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (dgvDatos.ActiveRow != null) { using (SqlConnection connection = new SqlConnection(Datos.Clases.Constantes.conectionLog)) { using (SqlCommand command = new SqlCommand("sp_ListaPrecios", connection)) { command.CommandType = CommandType.StoredProcedure; command.Parameters.AddWithValue("@TipoConsulta", 6); command.Parameters.AddWithValue("@PriceList", cbListasPrecios.SelectedValue); command.Parameters.AddWithValue("@ItemCode", dgvDatos.ActiveRow.Cells["ItemCode"].Value); command.Parameters.AddWithValue("@Price", dgvDatos.ActiveRow.Cells["PF2"].Value); command.Parameters.AddWithValue("@Factor", dgvDatos.ActiveRow.Cells["Descuento"].Value); command.Parameters.AddWithValue("@Volumen", dgvDatos.ActiveRow.Cells["Volumen"].Value); connection.Open(); command.ExecuteNonQuery(); } } } }
private void OnCellChanged(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //Event handler for change in a cell value try { //If "RequestedBy" cell, set or clear "Requested" cell required value if (e.Cell.Column.Key.ToString() == "RequestedBy") { if (e.Cell.Text.Length > 0) { e.Cell.Row.Cells["ID"].Value = 0; e.Cell.Row.Cells["Requested"].Value = DateTime.Now; } else { e.Cell.Row.Cells["ID"].Value = DBNull.Value; e.Cell.Row.Cells["Requested"].Value = DBNull.Value; } this.OnValidateForm(null, null); } } catch (Exception) { } }
private void ugItems_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { try { ItemSalidaCaja Item = (ItemSalidaCaja)e.Cell.Row.Tag; switch (e.Cell.Column.Key) { case colCodigo: Item.Codigo = e.Cell.Text; break; case colDescripcion: Item.Descripcion = e.Cell.Text; break; case colPrecio: Item.Precio = Convert.ToDecimal(e.Cell.Text.Replace('_', ' ')); break; case colCantidad: Item.Cantidad = Convert.ToDecimal(e.Cell.Text.Replace('_', ' ')); break; case colObservacion: Item.Observacion = e.Cell.Text; break; default: break; } MostrarItem(e.Cell.Row); MostrarTotales(); } catch (Exception ex) { SoftException.Control(ex); } }
private void ugBTS_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //int auto_id = 0; //string reference = ""; //string status = ""; //if (e.Cell.Column.Index == 1 || e.Cell.Column.Index == 20) //{ // // if (this.ugBTS.Selected.Rows.Count > 0) // // { // auto_id = Convert.ToInt32(e.Cell.Row.Cells["auto_id"].Value.ToString().Trim()); // status = e.Cell.Row.Cells["status"].Value.ToString().Trim(); // reference = e.Cell.Row.Cells["reference"].Value.ToString().Trim(); // string qry = "update dbo.BTS_GoogleIntInvTranWB set status='" + status + "', reference='" + reference + "' where auto_id=" + auto_id; // SqlConnection cn = new SqlConnection(constr); // cn.Open(); // SqlCommand cmd = new SqlCommand(qry, cn); // SqlDataAdapter da = new SqlDataAdapter(cmd); // DataSet ds = new DataSet(); // da.Fill(ds); // cn.Close(); // // } //} }
private void OnScheduleAfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //Event handler for change in a cell value }
private void OnGridCellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //Event handler for change in a cell value try { //Set effective date for new entries switch (e.Cell.Row.Band.Key) { case "RateMileageTable": if (e.Cell.Row.IsAddRow) { if (e.Cell.Row.Cells["AgentNumber"].Value.ToString() == "") { e.Cell.Row.Cells["ID"].Value = 0; e.Cell.Row.Cells["AgentNumber"].Value = this.mRates.AgentNumber; e.Cell.Row.Cells["EffectiveDate"].Value = this.mRates.RatesDate; e.Cell.Row.Cells["Mile"].Value = 0.0; e.Cell.Row.Cells["BaseRate"].Value = 0.0; e.Cell.Row.Cells["Rate"].Value = 0.0; } } break; case "RateUnitTable": if (e.Cell.Row.IsAddRow) { if (e.Cell.Row.Cells["AgentNumber"].Value.ToString() == "") { e.Cell.Row.Cells["ID"].Value = 0; e.Cell.Row.Cells["AgentNumber"].Value = this.mRates.AgentNumber; e.Cell.Row.Cells["EffectiveDate"].Value = this.mRates.RatesDate; e.Cell.Row.Cells["DayRate"].Value = 0.0; e.Cell.Row.Cells["MultiTripRate"].Value = 0.0; e.Cell.Row.Cells["StopRate"].Value = 0.0; e.Cell.Row.Cells["CartonRate"].Value = 0.0; e.Cell.Row.Cells["PalletRate"].Value = 0.0; e.Cell.Row.Cells["PickupCartonRate"].Value = 0.0; e.Cell.Row.Cells["MinimumAmount"].Value = 0.0; e.Cell.Row.Cells["MaximumAmount"].Value = 0.0; e.Cell.Row.Cells["MaximumTriggerField"].Value = ""; e.Cell.Row.Cells["MaximumTriggerValue"].Value = 0; e.Cell.Row.Cells["FSBase"].Value = 0.0; } } break; case "RateMileageRouteTable": if (e.Cell.Row.IsAddRow) { if (e.Cell.Row.Cells["AgentNumber"].Value.ToString() == "") { e.Cell.Row.Cells["ID"].Value = 0; e.Cell.Row.Cells["AgentNumber"].Value = this.mRates.AgentNumber; e.Cell.Row.Cells["EffectiveDate"].Value = this.mRates.RatesDate; e.Cell.Row.Cells["Mile"].Value = 0.0; e.Cell.Row.Cells["BaseRate"].Value = 0.0; e.Cell.Row.Cells["Rate"].Value = 0.0; e.Cell.Row.Cells["Status"].Value = "1"; } } break; case "RateUnitRouteTable": if (e.Cell.Row.IsAddRow) { if (e.Cell.Row.Cells["AgentNumber"].Value.ToString() == "") { e.Cell.Row.Cells["ID"].Value = 0; e.Cell.Row.Cells["AgentNumber"].Value = this.mRates.AgentNumber; e.Cell.Row.Cells["EffectiveDate"].Value = this.mRates.RatesDate; e.Cell.Row.Cells["DayRate"].Value = 0.0; e.Cell.Row.Cells["MultiTripRate"].Value = 0.0; e.Cell.Row.Cells["StopRate"].Value = 0.0; e.Cell.Row.Cells["CartonRate"].Value = 0.0; e.Cell.Row.Cells["PalletRate"].Value = 0.0; e.Cell.Row.Cells["PickupCartonRate"].Value = 0.0; e.Cell.Row.Cells["MinimumAmount"].Value = 0.0; e.Cell.Row.Cells["MaximumAmount"].Value = 0.0; e.Cell.Row.Cells["MaximumTriggerField"].Value = ""; e.Cell.Row.Cells["MaximumTriggerValue"].Value = 0; e.Cell.Row.Cells["FSBase"].Value = 0.0; e.Cell.Row.Cells["Status"].Value = "1"; } } break; } } catch (Exception ex) { reportError(ex); } }
private void grdCCs_AfterCellUpdate(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs args) { // ** Place Event Handling Code Here ** grdCCs.DisplayLayout.PerformAutoResizeColumns(false, Infragistics.Win.UltraWinGrid.PerformAutoSizeType.VisibleRows); }
private void grdTotalDiagnosticos_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { try { if (e.Cell == null || e.Cell.Row.Cells["v_DiagnosticRepositoryId"].Value == null) { return; } var diagnosticRepositoryId = e.Cell.Row.Cells["v_DiagnosticRepositoryId"].Value.ToString(); var categoryName = e.Cell.Row.Cells["v_ComponentName"].Value.ToString(); #region Conexion SIGESOFT verificar la unidad productiva del componente ConexionSigesoft conectasam = new ConexionSigesoft(); conectasam.opensigesoft(); var cadena1 = "select CP.v_IdUnidadProductiva " + "from diagnosticrepository DR " + "inner join component CP on DR.v_ComponentId=CP.v_ComponentId " + "where DR.v_DiagnosticRepositoryId='" + diagnosticRepositoryId + "' "; SqlCommand comando = new SqlCommand(cadena1, connection: conectasam.conectarsigesoft); SqlDataReader lector = comando.ExecuteReader(); string LineId = ""; while (lector.Read()) { LineId = lector.GetValue(0).ToString(); } lector.Close(); conectasam.closesigesoft(); #endregion switch (e.Cell.Column.Key) { case "_AddRecipe": { var f = new frmAddRecipe(ActionForm.Add, diagnosticRepositoryId, 0, _protocolId, _serviceId, categoryName, LineId) { StartPosition = FormStartPosition.CenterScreen }; f.ShowDialog(); GetData(_listDiagnosticRepositoryLists); } break; case "_EditRecipe": { var recipeId = int.Parse(e.Cell.Row.Cells["i_IdReceta"].Value.ToString()); var f = new frmAddRecipe(ActionForm.Edit, diagnosticRepositoryId, recipeId, _protocolId, _serviceId, categoryName, LineId) { StartPosition = FormStartPosition.CenterScreen }; f.ShowDialog(); GetData(_listDiagnosticRepositoryLists); } break; case "_DeleteRecipe": { _pobjOperationResult = new OperationResult(); var recipeId = int.Parse(e.Cell.Row.Cells["i_IdReceta"].Value.ToString()); var msg = MessageBox.Show(@"¿Seguro de eliminar esta receta?", @"Confirmación", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (msg == DialogResult.No) { return; } _objRecetaBl.DeleteRecipe(ref _pobjOperationResult, recipeId); if (_pobjOperationResult.Success == 0) { MessageBox.Show(_pobjOperationResult.ErrorMessage, @"Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } GetData(_listDiagnosticRepositoryLists); } break; } } catch (Exception ex) { MessageBox.Show(ex.Message, @"grdTotalDiagnosticos_ClickCellButton()", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void grd_buscados_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { this.cmdAceptar.Enabled = true; }
private void OnGridCellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { //Event handler for change in a data entry cell value }