private void resItem_EditValueChanged(object sender, EventArgs e) { GridLookUpEdit LookupEdit = sender as IvsGridLookUpEdit; DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow(); string itemName = CommonMethod.ParseString((this.resItem.DataSource as DataTable).Rows[(sender as DevExpress.XtraEditors.LookUpEdit).ItemIndex]["Name"]); string unit = CommonMethod.ParseString((this.resItem.DataSource as DataTable).Rows[(sender as DevExpress.XtraEditors.LookUpEdit).ItemIndex]["InvUnitCode"]); dgcInventory.SetRowCellValue(CommonKey.ItemName, itemName); dgcInventory.SetRowCellValue(CommonKey.Unit, unit); }
private void gluAnimal_EditValueChanged(object sender, EventArgs e) { try { GridLookUpEdit objGluAnimal = ((GridLookUpEdit)sender); object objFilaSeleccionada = objGluAnimal.GetSelectedDataRow(); if (objFilaSeleccionada != null) { this.txtAnimal.Text = ((System.Data.DataRowView)(objFilaSeleccionada)).Row.ItemArray[2].ToString(); this.lueLote.Properties.DataSource = clsGraDosisAplicadas.funRecLotes(((System.Data.DataRowView)(objFilaSeleccionada)).Row.ItemArray[0].ToString()); } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void resItem_EditValueChanged(object sender, EventArgs e) { GridLookUpEdit LookupEdit = sender as GridLookUpEdit; DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow(); if (SelectedDataRow != null) { dgcInventory.SetRowCellValue(CommonKey.ItemName, CommonMethod.ParseString(SelectedDataRow["Name"])); dgcInventory.SetRowCellValue("Unit", CommonMethod.ParseString(SelectedDataRow["InvUnitCode"])); dgcInventory.SetRowCellValue("QualityStatus", SelectedDataRow["QuanlityStatus"].ToString()); if (ShowProductionLine) { dgcInventory.SetRowCellValue("ProductionLine", CommonMethod.ParseString(SelectedDataRow["Line"])); } dgcInventory.FocusedView.PostEditor(); } }