private void colourRow(UltraGridRow row_) { CurrentRollLine line; if (row_ == null || (line = row_.ListObject as CurrentRollLine) == null) return; { var cells = new[] { row_.Cells[CurrentRollLineHelper.Mappings.GetValueFromKey(CurrentRollLineField.LastCloseOI_Current_Back)], row_.Cells[CurrentRollLineHelper.Mappings.GetValueFromKey(CurrentRollLineField.LastCloseOI_Current_Front)] }; Array.ForEach(cells, cell => cell.Appearance = line.OI_Status() == Model.Enums.OIStatus.Estimate ? getItalicAppearance() : null); } // daily front { var currentVal = line.GetValue(CurrentRollLineField.LastCloseOI_Current_FrontP); var avgPrior = line.GetValue(CurrentRollLineField.LastCloseOI_AvgPrior_FrontP); var diff = currentVal - avgPrior; var cell = row_.Cells[CurrentRollLineHelper.Mappings.GetValueFromKey(CurrentRollLineField.LastCloseOI_Current_FrontP)]; Infragistics.Win.Appearance app = null; if (diff > m_dispOptions.DailyHighlighThreshold) { app = getSlowAppearance(); } else if (Math.Abs(diff) > m_dispOptions.DailyHighlighThreshold) { app = getFastAppearance(); } cell.Appearance = app; cell.SelectedAppearance = app; } // daily back { var currentVal = line.GetValue(CurrentRollLineField.LastCloseOI_Current_BackP); var avgPrior = line.GetValue(CurrentRollLineField.LastCloseOI_AvgPrior_BackP); var diff = currentVal - avgPrior; var cell = row_.Cells[CurrentRollLineHelper.Mappings.GetValueFromKey(CurrentRollLineField.LastCloseOI_Current_BackP)]; Infragistics.Win.Appearance app = null; if (diff > m_dispOptions.DailyHighlighThreshold) { app = getFastAppearance(); } else if (Math.Abs(diff) > m_dispOptions.DailyHighlighThreshold) { app = getSlowAppearance(); } cell.Appearance = app; cell.SelectedAppearance = app; } // intraday { var currentVal = line.GetValue(CurrentRollLineField.SpreadVolumeOnDay_CurrentLiveP); var avgPrior = line.GetValue(CurrentRollLineField.SpreadVolumeOnDay_AvgPriorLiveP); var diff = currentVal - avgPrior; var cell = row_.Cells[CurrentRollLineHelper.Mappings.GetValueFromKey(CurrentRollLineField.SpreadVolumeOnDay_CurrentLiveP)]; Infragistics.Win.Appearance app = null; if (diff > m_dispOptions.DailyHighlighThreshold) { app = getFastAppearance(); } else if (Math.Abs(diff) > m_dispOptions.DailyHighlighThreshold) { app = getSlowAppearance(); } cell.Appearance = app; cell.SelectedAppearance = app; } // change on day { var diff = line.GetValue(CurrentRollLineField.RollLevelChange); var cell = row_.Cells[CurrentRollLineHelper.Mappings.GetValueFromKey(CurrentRollLineField.RollLevelChange)]; Infragistics.Win.Appearance app = null; if (diff > 0d) { app = getFastAppearance(); } else if (Math.Abs(diff) > 0d) { app = getSlowAppearance(); } cell.Appearance = app; cell.SelectedAppearance = app; } }
public void MostrarItem(UltraGridRow Row) { ItemClasificacionExistencia Item = (ItemClasificacionExistencia)Row.Tag; Row.Cells[colCodigo].Value = Item.Codigo; Row.Cells[colNombre].Value = Item.Nombre; Row.Cells[colActivo].Value = Item.Activo; }
public void MostrarItem(UltraGridRow Row) { Auditoria Auditoria = (Auditoria)Row.Tag; Row.Cells[colFecha].Value = Auditoria.Fecha; Row.Cells[colHora].Value = Auditoria.Hora; Row.Cells[colUsuario].Value = Auditoria.Usuario; Row.Cells[colAccion].Value = Auditoria.Accion; }
public static void SetButtonText(UltraGridRow row, GridButton button) { var colName = button.ToString(); var label = button.ToString(); if (row.Cells.IndexOf(colName) == -1) return; var buttonLabel = !string.IsNullOrEmpty(label) ? string.Format("[{0}]", label.ToLower()) : string.Empty; row.Cells[colName].Value = buttonLabel; }
private void listaMouseUp(object sender, MouseEventArgs e) { _rowClick = null; if (e.Button == MouseButtons.Right) { _rowClick = DataGridHelper.GetRowEvent(lista, e); if (_rowClick != null) contextMenuStrip1.Show(lista, e.X, e.Y); } }
private void changeCustOrder(string value,UltraGridRow row) { var q = from p in custordernoDt.AsEnumerable() where p["custorderno"].ToString() == value && p["customerid"].ToString() == ((ValueInfo)this.cmbCustomer.SelectedItem).ValueField select p; if (q.Count()>0){ row.Cells["customername"].Value = q.ToList<DataRow>()[0]["customername"]; row.Cells["factory"].Value = q.ToList<DataRow>()[0]["factory"]; row.Cells["cartonqty"].Value = q.ToList<DataRow>()[0]["cartonqty"]; } }
public void BandSteelTypeAndSpec(UltraGridRow row) { if (row.Cells["FS_COMMUTEDSTEELTYPE"].Value.ToString() == string.Empty) { row.Cells["FS_COMMUTEDSTEELTYPE"].Value = row.Cells["FS_STEELTYPE"].Value; } if (row.Cells["FS_COMMUTEDSPEC"].Value.ToString() == string.Empty) { row.Cells["FS_COMMUTEDSPEC"].Value = row.Cells["FS_SPEC"].Value; } }
private void ultraGrid1_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e) { UltraGridRow row = this.ultraGrid1.ActiveRow; if (null != row) { cmbShow.Text = row.Cells["cnvcJobName"].Value.ToString(); txtMemberName.Text = row.Cells["cnvcMemberName"].Value.ToString(); txtPaperNo.Text = row.Cells["cnvcPaperNo"].Value.ToString(); //txtMemberCardNo.Text = row.Cells["cnvcMemberCardNo"].Value.ToString(); btnOK.Enabled = true; } }
private void Grid_AfterRowRegionScroll(object sender, RowScrollRegionEventArgs e) { UltraGridRow firstRow = this.ActiveRowScrollRegion.FirstRow; if ((!(firstRow is UltraGridGroupByRow) && !this.GridLoading) && ((firstRow.Index + this.ActiveRowScrollRegion.VisibleRows.Count) >= this.Rows.Count)) { this.m_StartRow += this.m_PageSize; if ((this.m_StartRow < ((this.m_PageSize + this.Rows.Count) + 1)) && (this.m_StartRow >= this.Rows.Count)) { this.Refill(this.m_StartRow); } } }
public override AccessPointBrand GetSearchResult() { AccessPointBrand AccessPointBrand = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int AccessPointBrandId = Convert.ToInt32(activeRow.Cells[0].Value); AccessPointBrand = this.srvAccessPointBrand.GetById(AccessPointBrandId); } return(AccessPointBrand); }
public override BackupSoftwareBrand GetSearchResult() { BackupSoftwareBrand BackupSoftwareBrand = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int BackupSoftwareBrandId = Convert.ToInt32(activeRow.Cells[0].Value); BackupSoftwareBrand = this.srvBackupSoftwareBrand.GetById(BackupSoftwareBrandId); } return(BackupSoftwareBrand); }
public override Customer GetSearchResult() { Customer Customer = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int CustomerId = Convert.ToInt32(activeRow.Cells[0].Value); Customer = this.srvCustomer.GetById(CustomerId); } return(Customer); }
private void ubNuevaExistencia_Click(object sender, EventArgs e) { FrmSelectedEntity FrmSeleccionar = new FrmSelectedEntity(); Existencia Existencia = (Existencia)FrmSeleccionar.GetSelectedEntity(typeof(Existencia), "Existencia", ListaPreciosExistencia.FiltroExistencias); if (Existencia != null) { UltraGridRow Row = grillaExistencias.DisplayLayout.Bands[0].AddNew(); Row.Tag = ListaPreciosExistencia.AddItem(Existencia); ItemListaPreciosExistencia = (ItemListaPreciosExistencia)Row.Tag; MostrarItem(Row); } }
public override TelephonyProvider GetSearchResult() { TelephonyProvider TelephonyProvider = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int TelephonyProviderId = Convert.ToInt32(activeRow.Cells[0].Value); TelephonyProvider = this.srvTelephonyProvider.GetById(TelephonyProviderId); } return(TelephonyProvider); }
internal override Wholesaler GetSerchResult() { Wholesaler Wholesaler = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int WholesalerId = Convert.ToInt32(activeRow.Cells[0].Value); Wholesaler = this.srvWholesaler.GetById(WholesalerId); } return(Wholesaler); }
/// <summary> /// GetSelectedAssets /// ==================== /// /// Returns a list of the computers selected in this view /// </summary> /// <returns></returns> private List <Asset> GetSelectedComputers() { List <Asset> listComputers = new List <Asset>(); int selectedRowCount = auditGridView.Selected.Rows.Count; for (int isub = 0; isub < selectedRowCount; isub++) { UltraGridRow selectedRow = this.auditGridView.Selected.Rows[isub]; Asset thisComputer = selectedRow.Cells[0].Value as Asset; listComputers.Add(thisComputer); } return(listComputers); }
public override PrinterBrand GetSearchResult() { PrinterBrand PrinterBrand = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int PrinterBrandId = Convert.ToInt32(activeRow.Cells[0].Value); PrinterBrand = this.srvPrinterBrand.GetById(PrinterBrandId); } return(PrinterBrand); }
internal override Organization GetSerchResult() { Organization Organization = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int OrganizationId = Convert.ToInt32(activeRow.Cells[0].Value); Organization = this.srvOrganization.GetById(OrganizationId); } return(Organization); }
public override OpportunityStatus GetSearchResult() { OpportunityStatus asesor = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int asesorId = Convert.ToInt32(activeRow.Cells[0].Value); asesor = this.srvOpportunityStatus.GetById(asesorId); } return(asesor); }
private void btnAgregarDireccion_Click(object sender, EventArgs e) { FrmSeleccionarDireccion SeleccionarDireccion = new FrmSeleccionarDireccion(); ItemSocioNegocioDireccion ItemDireccion = SeleccionarDireccion.ObtenerDireccion(); if (ItemDireccion != null) { SocioNegocio.Direcciones.Add(ItemDireccion); UltraGridRow Row = GrillaDirecciones.DisplayLayout.Bands[0].AddNew(); Row.Tag = ItemDireccion; MostrarDireccion(Row); } }
public static List<string> CalculateRowList(UltraGridRow aUltraGridRow) { foreach ( string aString in from UltraGridCell cell in aUltraGridRow.Cells select cell.Value.ToString() into aString select aString + "\r\n") { ARowList.Add(aString); } return ARowList; }
public override Scheme GetSearchResult() { Scheme Scheme = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int SchemeId = Convert.ToInt32(activeRow.Cells[0].Value); Scheme = this.srvScheme.GetById(SchemeId); } return(Scheme); }
private UltraGridRow buildMergedGridRow(UltraGridRow row, UltraGridRow lastRow) { if (this.MergeColumnIndexList == null) { return(row); } ArrayList array = new ArrayList(); foreach (UltraGridCell cell in row.Cells) { array.Add(cell.Text); } if (lastRow != null) { bool equal = false; foreach (int[] indices in this.MergeColumnIndexList) { if (indices == null) { continue; } equal = true; foreach (int index in indices) { if (row.Cells[index].Text != lastRow.Cells[index].Text) { equal = false; break; } } if (equal) { foreach (int index in indices) { array[index] = ""; } } else { break; } } } return(new UltraGridRow(array.ToArray())); }
private void MergeCells() { if (this.gridWebGrid == null) { return; } if (this.gridWebGrid.Rows.Count == 0) { return; } /* 首先合并产线 */ for (int i = 0; i < this.gridWebGrid.Rows.Count - 1; i++) { UltraGridRow row = this.gridWebGrid.Rows[i]; for (int j = i + 1; j < this.gridWebGrid.Rows.Count; j++) { UltraGridRow row2 = this.gridWebGrid.Rows[j]; if (string.Compare(row.Cells.FromKey("StepSequenceCode").Text, row2.Cells.FromKey("StepSequenceCode").Text, true) == 0) { row.Cells.FromKey("StepSequenceCode").RowSpan += 1; } else { i = j - 1; break; } } } /* 根据产线的合并,合并产品 */ for (int i = 0; i < this.gridWebGrid.Rows.Count; i++) { UltraGridRow row = this.gridWebGrid.Rows[i]; int rowSpan = row.Cells.FromKey("StepSequenceCode").RowSpan; for (int j = i + 1; j < i + rowSpan; j++) { UltraGridRow row2 = this.gridWebGrid.Rows[j]; if (string.Compare(row.Cells.FromKey("ItemCode").Text, row2.Cells.FromKey("ItemCode").Text, true) == 0) { row.Cells.FromKey("ItemCode").RowSpan += 1; } else { row = this.gridWebGrid.Rows[j]; } } i = i + rowSpan - 1; } }
protected void ibnDeptDel_Click(object sender, ImageClickEventArgs e) { int cnt = UltraWebGrid1.Rows.Count; string dept_ref_id_list = string.Empty; for (int i = 0; i < cnt; i++) { UltraGridRow row = UltraWebGrid1.Rows[i]; TemplatedColumn selchk = (TemplatedColumn)row.Band.Columns.FromKey("selchk"); CheckBox cBox = (CheckBox)((CellItem)selchk.CellItems[row.BandIndex]).FindControl("cBox"); if (cBox.Checked) { dept_ref_id_list += "," + DataTypeUtility.GetValue(row.Cells.FromKey("DEPT_REF_ID").Value); } } if (dept_ref_id_list.Length > 0) { dept_ref_id_list = dept_ref_id_list.Remove(0, 1); } else { dept_ref_id_list = "-1"; } DataTable dtEmp = DataTypeUtility.FilterSortDataTable(DT_DEPTEMP, string.Format(" DEPT_REF_ID IN ({0}) ", dept_ref_id_list)); MicroBSC.Integration.MUL.Biz.Biz_Mul_Est_Emp BizMulEstEmp = new MicroBSC.Integration.MUL.Biz.Biz_Mul_Est_Emp(); string okMsg = BizMulEstEmp.RemoveEstEmp(dtEmp , COMP_ID , EST_ID , ESTTERM_REF_ID , ESTTERM_SUB_ID , rdoEstTypeList.SelectedValue); if (okMsg.Length == 0) { ltrScript.Text = JSHelper.GetAlertScript("정상 처리 되었습니다.", false); DoBinding_Dept(); } else { ltrScript.Text = JSHelper.GetAlertScript(okMsg); } }
private void ultraGrid1_BeforeRowInsert(object sender, BeforeRowInsertEventArgs e) { UltraGridRow objRow = this.ultraGrid1.ActiveRow; if (objRow == null) { return; } if (objRow.Cells["ClientName"].Value.ToString() == "") { objRow.Delete(false); e.Cancel = true; } }
private void ultraGrid1_DoubleClick(object sender, EventArgs e) { UltraGridRow ugr = this.ultraGrid1.ActiveRow; if (ugr == null) { return; } tbPrinter.Text = ugr.Cells["FS_PRINTTYPECODE"].Text.Trim(); tbDescribe.Text = ugr.Cells["FS_PRINTTYPEDESCRIBE"].Text.Trim(); tbPaperNum.Text = ugr.Cells["FN_PAPERNUM"].Text.Trim(); tbInkNum.Text = ugr.Cells["FN_INKNUM"].Text.Trim(); }
/// <summary> /// Called to display the full details of this action /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void viewDetailsToolStripMenuItem_Click(object sender, EventArgs e) { // Have we right-clicked on an item if (alertsGridView.Selected.Rows.Count != 1) { return; } UltraGridRow selectedRow = alertsGridView.Selected.Rows[0]; UltraGridCell objectCell = selectedRow.Cells["AlertObject"]; Alert alert = objectCell.Value as Alert; ViewDetails(alert); }
private void ubNuevoItem_Click(object sender, EventArgs e) { try { UltraGridRow RowNuevo = ugItems.DisplayLayout.Bands[0].AddNew(); ItemSalidaCaja item = SalidaCaja.AddItem(); item.Cantidad = 1; RowNuevo.Tag = item; } catch (Exception ex) { SoftException.Control(ex); } }
protected override object GetEditObject(UltraGridRow row) { if (_facade == null) { _facade = new TSModelFacadeFactory(base.DataProvider).CreateTSModelFacade(); } Model2ErrorCause relation = _facade.CreateNewModel2ErrorCause(); relation.ModelCode = this.txtModelCodeQuery.Text.Trim(); relation.ErrorCauseCode = row.Cells[1].Text; relation.MaintainUser = this.GetUserCode(); return(relation); }
public void MostrarItem(UltraGridRow Row) { ItemRendicionCotizacion Item = (ItemRendicionCotizacion)Row.Tag; Row.Cells[colCodigo].Value = Item.Codigo; Row.Cells[colDescripcion].Value = Item.Descripcion; Row.Cells[colUnidad].Value = Item.Unidad; Row.Cells[colCantidadCotizacion].Value = Item.CantidadCotizacion; Row.Cells[colPrecioCotizacion].Value = Item.PrecioCotizacion; Row.Cells[colTotalCotizacion].Value = Item.TotalCotizacion; Row.Cells[colCantidadReal].Value = Item.CantidadReal; Row.Cells[colPrecioReal].Value = Item.PrecioReal; Row.Cells[colTotalReal].Value = Item.TotalReal; }
private void ultraGridLotList_AfterSelectChange(object sender, Infragistics.Win.UltraWinGrid.AfterSelectChangeEventArgs e) { if (e.Type != typeof(Infragistics.Win.UltraWinGrid.UltraGridCell)) { return; } UltraGridRow selectedRow = this.ultraGridLotList.ActiveRow; this.clickLotNo = FormatHelper.PKCapitalFormat(selectedRow.Cells["LotNo"].Value.ToString()); this.labelCurrentLot.Text = this.clickLotNo; InitReworkRcard(); }
private void ultraGridDoc_AfterRowActivate(object sender, EventArgs e) { UltraGridRow row = this.ultraGridDoc.ActiveRow; if (row != null) { //this.txtFirstName.Text = row.Cells["First Name"].Text; id = row.Cells["Doctor_ID"].Text; name = row.Cells["FullName"].Text; address = row.Cells["Doc_Address"].Text; phone = row.Cells["Phone"].Text; // this.txtLastName.Text = row.Cells["Last Name"].Text; } }
private void ubNuevo_Click(object sender, EventArgs e) { try { AtributoSF atributo = new AtributoSF(); UltraGridRow Row = ugAtributos.DisplayLayout.Bands[0].AddNew(); Row.Tag = atributo; EntidadSF.Atributos.Add(atributo); } catch (Exception ex) { SoftException.Control(ex); } }
protected override object GetEditObject(UltraGridRow row) { if (_facade == null) { _facade = new FacadeFactory(base.DataProvider).CreateRMAFacade(); } Model2ErrorSymptom m2es = _facade.CreateNewModel2ErrorSymptom(); m2es.ModelCode = this.txtModelCodeQuery.Text.Trim(); m2es.SymptomCode = row.Cells.FromKey("ErrorSymptom").Text; m2es.MaintainUser = this.GetUserCode(); return(m2es); }
private void ubBajar_Click(object sender, EventArgs e) { UltraGridRow Row = ugColumnas.ActiveRow; if (Row != null && Row.Index < ugColumnas.Rows.Count - 1) { ColumnaPanel Columna = (ColumnaPanel)Row.Tag; Int32 Indice = Row.Index + 1; Panel.Columnas.RemoveAt(Indice - 1); Panel.Columnas.Insert(Indice, Columna); MostrarColumnas(); ugColumnas.Rows[Columna.Orden - 1].Activated = true; } }
protected override object GetEditObject(UltraGridRow row) { if (_facade == null) { _facade = new ReworkFacadeFactory(base.DataProvider).Create(); } ReworkSheet2Cause relation = this._facade.CreateNewReworkSheet2Cause(); relation.ReworkCode = this.txtReworkCode.Text.Trim(); relation.ReworkCauseCode = row.Cells[1].Text; relation.MaintainUser = this.GetUserCode(); return(relation); }
private void ultraGridDoctorList_AfterRowActivate(object sender, EventArgs e) { UltraGridRow row = this.ultraGridDoctorList.ActiveRow; if (row != null) { //this.txtFirstName.Text = row.Cells["First Name"].Text; id = row.Cells["DoctorIDD"].Text; // this.txtLastName.Text = row.Cells["Last Name"].Text; } else { } }
public bool ShouldCellsBeMerged(UltraGridRow row1,UltraGridRow row2, UltraGridColumn column) { // Test to make sure the Type is not DBNull since we allow the ShippedDate to be null if (row1.GetCellValue(column).GetType().ToString() != "System.DBNull" && row2.GetCellValue(column).GetType().ToString() != "System.DBNull") { string value1 = row1.GetCellValue(column).ToString(); string value2 = row2.GetCellValue(column).ToString(); // Merge cells according to the date portions of the underlying DateTime cell // values, ignoring any time portion. For example, "1/1/2004 10:30 AM" will be // merged with "1/1/2004 1:15 AM" since the dates are the same. return value1.Equals(value2); } else return false; }
private void setColors(UltraGridRow row_, double maxValue_) { foreach (UltraGridCell cell in row_.Cells) { if (cell.Appearance == null) return; cell.Appearance.Reset(); if (cell.Value is double) { cell.Appearance.BackColor = Singleton<SI.Controls.SpectrumColoursPositiveNegative>.Instance.GetColor((double)cell.Value, maxValue_); } } }
protected override void OnPreRender(EventArgs e) { foreach (Row row in _rows) { UltraGridRow ultraRow = new UltraGridRow(); foreach (Cell cell in row.Cells) { UltraGridCell ultraCell = new UltraGridCell(); ultraCell.Value = cell.Value; ultraRow.Cells.Add(ultraCell); } _grid.Rows.Add(ultraRow); } base.OnPreRender(e); }
/// <summary> /// Highight ô có dữ liệu không hợp lệ /// </summary> /// <param name="row">Dòng cần kiểm tra</param> /// <param name="inputTypes">Danh sách kiểu tương ứng với từng cột</param> /// <returns>True nếu có lỗi</returns> public static bool UltraGrid(UltraGridRow row, IList<InputType> inputTypes) { var result = false; HighlightGridCellClear(row); var listInputParam = new List<InputParam>(); for (var i = 0; i < row.Cells.Count; i++) { if (inputTypes[i] == InputType.NgayThang) { var ngaythang = DateTime.Parse(row.Cells[i].Value.ToString()).ToString("dd/MM/yyyy"); listInputParam.Add(new InputParam { Input = ngaythang, InputType = inputTypes[i] }); } else { listInputParam.Add(new InputParam { Input = row.Cells[i].Value.ToString(), InputType = inputTypes[i] }); } } var validate = new ValidateData(); validate.ValDataList(listInputParam); if (validate.Errors.Count > 0) { for (var i = 0; i < row.Cells.Count; i++) { if (!validate.Output[i].Result) { HighlightGridCellSet(row.Cells[i], validate.Output[i].MsgError); } } result = true; } return result; }
private static void HighlightGridCellClear(UltraGridRow row) { foreach (var cell in row.Cells) { HighlightGridCellClear(cell); } }
private void setRowLayout(UltraGridRow row) { var scadenza = row.ListObject as ScadenzaSpesaFiscaleDTO; if (scadenza != null) { if (!scadenza.RitenutaNONPagata) { row.Cells["DataPagamentoRitenuta"].Hidden = false; row.Cells["ImportoInteressi"].Hidden = false; row.Cells["ImportoSanzioni"].Hidden = false; } else { row.Cells["DataPagamentoRitenuta"].Hidden = true; row.Cells["ImportoInteressi"].Hidden = true; row.Cells["ImportoSanzioni"].Hidden = true; row.Cells["DataPagamentoRitenuta"].Value = null; } } }
private void Timkiemlop() { try { if (_newRow != null) _newRow.Selected = false; foreach ( var row in dgv_DanhSach.Rows.Where(row => row.Cells["MaLop"].Text.Equals(txtKhoa.Text, StringComparison.OrdinalIgnoreCase))) { dgv_DanhSach.ActiveRowScrollRegion.ScrollPosition = row.Index; row.Selected = true; _newRow = row; } } catch (Exception ex) { Log2File.LogExceptionToFile(ex); } }
public void MostrarServicio(UltraGridRow Row) { ItemPlantillaServicio Item = (ItemPlantillaServicio)Row.Tag; if (Item.Servicio != null) { AgregarUnidades(Row); Row.Cells[colNobre].Value = Item.Servicio.Nombre; Row.Cells[colUnidad].Value = Item.Unidad.Unidad.Codigo; } Row.Cells[colCantidad].Value = Item.Cantidad; }
public void MostrarItem(UltraGridRow Row) { ItemAccion Item = (ItemAccion)Row.Tag; Item.Orden = Row.Index + 1; if (Item.Ensamblado != null) { Row.Cells[colEnsamblado].Value = Item.Ensamblado.Nombre; } Row.Cells[colNombre].Value = Item.Nombre; Row.Cells[colClase].Value = Item.Clase; Row.Cells[colParametro].Value = Item.Parametro; Row.Cells[colExito].Value = Item.Exito; Row.Cells[colError].Value = Item.Error; Row.Cells[colOrden].Value = Item.Orden; }
private void setHiddenDatiFattura(UltraGridRow row) { row.Cells["DataVersamentoRitenuta"].Hidden = true; row.Cells["IdFornitore"].Hidden = true; row.Cells["NumeroDocumento"].Hidden = true; row.Cells["DataDocumento"].Hidden = true; row.Cells["ImportoRitenuta"].Hidden = true; row.Cells["InteressiRitenuta"].Hidden = true; row.Cells["SanzioniRitenuta"].Hidden = true; row.Cells["AliquotaRitenuta"].Hidden = true; row.Cells["ImportoIva"].Hidden = true; row.Cells["DataPagamento"].Hidden = true; row.Cells["ImportoFattura"].Hidden = true; row.Cells["AltreSpese"].Hidden = true; row.Cells["AltreSpeseEsenti"].Hidden = true; }
public void MostrarBanco(UltraGridRow Row) { ItemSocioNegocioBanco item = (ItemSocioNegocioBanco)Row.Tag; if (item.Banco != null) { Row.Cells[colBanco].Value = item.Banco.Nombre; } if (item.Moneda != null) { Row.Cells[colMoneda].Value = item.Moneda.Simbolo; } Row.Cells[colBancoDescripcion].Value = item.Descripcion; }
private void Timkiemsinhvien(object sender, string masinhvien) { try { if (_newRow != null) _newRow.Selected = false; foreach ( var row in dgv_DanhSach.Rows.Where(row => row.Cells["MaSV"].Value.ToString() == masinhvien)) { dgv_DanhSach.ActiveRowScrollRegion.ScrollPosition = row.Index; row.Selected = true; _newRow = row; } } catch (Exception ex) { Log2File.LogExceptionToFile(ex); } }
private void setSottoContoValueList(UltraGridRow row) { if (row.Band.Index == 0) { if (row.Cells["IdConto"].Value != null && ((int)row.Cells["IdConto"].Value) > 0) { var conto = getPianoContiService().GetById((int)row.Cells["IdConto"].Value, _esercizio.ID); if (conto != null) { var listUniqueKey = "SottoConti_" + conto.ID; if (listaConti.DisplayLayout.ValueLists.Exists(listUniqueKey)) listaConti.DisplayLayout.ValueLists.Remove(listUniqueKey); var sottoConti = conto.Codice == getPianoContiService().GetCodiceContoVersamentiCondomini() && conto.IdEsercizio != null ? getSottoContoCondomini() : getPianoContiService().GetSottoContiDataSource(conto, null); var valueList = DataSourceHelper.GetValueList(sottoConti, "ID", "DescrizioneCompleta", listUniqueKey); valueList.Key = listUniqueKey; listaConti.DisplayLayout.ValueLists.Add(valueList); row.Cells["IdSottoConto"].ValueList = listaConti.DisplayLayout.ValueLists[listUniqueKey]; if (sottoConti.Count == 1) row.Cells["IdSottoConto"].Value = sottoConti[0].ID; if (conto.Codice == getPianoContiService().GetCodiceContoFornitori() || conto.Codice == getPianoContiService().GetCodiceContoRitenuta()) { row.Cells["IdFornitore"].Hidden = false; row.Cells["IdFornitore"].ValueList = fornitoriDropDown; row.Cells["NumeroDocumento"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["DataDocumento"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["AliquotaRitenuta"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["ImportoIva"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["ImportoRitenuta"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["InteressiRitenuta"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["SanzioniRitenuta"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["ImportoFattura"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["AltreSpese"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["AltreSpeseEsenti"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["DataPagamento"].Hidden = !_isRequiredDatiFatturaBilancioApertura; row.Cells["DataVersamentoRitenuta"].Hidden = conto.Codice != getPianoContiService().GetCodiceContoRitenuta(); // Se nota di accredito non è ammesso inserire i dati relativi alla data di pagamento o interessi sanzioni ritenuta if(row.Cells["ImportoDare"].Value != null && row.Cells["ImportoDare"].Value != DBNull.Value && (decimal)row.Cells["ImportoDare"].Value > 0) { row.Cells["InteressiRitenuta"].Hidden = true; row.Cells["SanzioniRitenuta"].Hidden = true; row.Cells["DataPagamento"].Hidden = true; row.Cells["DataVersamentoRitenuta"].Hidden = true; } } else setHiddenDatiFattura(row); } } } }
private void SetEditAreaFromRowInfo(UltraGridRow Row) { try { if (Row == null) { return; } bool bPoint1 = false, bPoint2 = false; string strBatchNo = "", strSteel = "", strSpec = "", strLength = "", strOrderNo = "", strStandardNo = ""; string strSingleNum = "", strWeightLL = "", strNum1 = "", strFcFlag1 = "", strNum2 = "", strFcFlag2 = ""; string strWeightType = "", strCardType = "", strDouble = "", strPrintAddr = "", strPrintStdNo = "", strPrintSteel = ""; strBatchNo = Convert.ToString(Row.Cells["FS_BATCHNO"].Value).Trim(); strSteel = Convert.ToString(Row.Cells["FS_STEELTYPE"].Value).Trim(); strSpec = Convert.ToString(Row.Cells["FS_SPEC"].Value).Trim(); strLength = Convert.ToString(Row.Cells["FN_LENGTH"].Value).Trim(); strOrderNo = Convert.ToString(Row.Cells["FS_PRODUCTNO"].Value).Trim(); strStandardNo = Convert.ToString(Row.Cells["FS_STANDNO"].Value).Trim(); strSingleNum = Convert.ToString(Row.Cells["FN_SINGLENUM"].Value).Trim(); strWeightLL = Convert.ToString(Row.Cells["FN_SINGLEWEIGHT"].Value).Trim(); strWeightType = Convert.ToString(Row.Cells["FS_PRINTWEIGHTTYPE"].Value).Trim(); strCardType = Convert.ToString(Row.Cells["FS_PRINTTYPE"].Value).Trim(); strDouble = Convert.ToString(Row.Cells["FS_TWINSTYPE"].Value).Trim(); strPrintAddr = Convert.ToString(Row.Cells["FS_ADDRESSCHECK"].Value).Trim(); strPrintStdNo = Convert.ToString(Row.Cells["FS_STANDARDCHECK"].Value).Trim(); strPrintSteel = Convert.ToString(Row.Cells["FS_STEELTYPECHECK"].Value).Trim(); if (Convert.ToString(Row.Cells["FS_POINTID"].Value).Equals(CNST_BC_STATION_A)) { strNum1 = Convert.ToString(Row.Cells["FN_POINT_PLAN"].Value).Trim(); strFcFlag1 = Convert.ToString(Row.Cells["FS_FCLFLAG"].Value).Trim(); bPoint1 = true; } else if (Convert.ToString(Row.Cells["FS_POINTID"].Value).Equals(CNST_BC_STATION_B)) { strNum2 = Convert.ToString(Row.Cells["FN_POINT_PLAN"].Value).Trim(); strFcFlag2 = Convert.ToString(Row.Cells["FS_FCLFLAG"].Value).Trim(); bPoint2 = true; } Edt_BatchNo.Text = strBatchNo; cbEdt_Steel.Text = strSteel; cbEdt_Spec.Text = strSpec; cbEdt_Length.Text = strLength; Edt_OrderNo.Text = strOrderNo; cbEdt_StandardNo.Text = strStandardNo; cbEdt_CardType.Text = strCardType; try { if (!string.IsNullOrEmpty(strSingleNum)) Edt_SingleNum.Value = Convert.ToDecimal(strSingleNum); else Edt_SingleNum.Value = null; } catch { } try { if (!string.IsNullOrEmpty(strWeightLL)) Edt_WgtLL.Value = Convert.ToDecimal(strWeightLL); else Edt_WgtLL.Value = null; } catch { } string strValue = ""; try { strValue = (strFcFlag1.Equals("�dz�") ? "1" : ""); this.SetFC1(strValue); } catch { } try { if (!string.IsNullOrEmpty(strNum1)) Edt_Num1.Value = Convert.ToDecimal(strNum1); else Edt_Num1.Value = null; } catch { } finally { cbx_Point1.Checked = bPoint1; } try { strValue = (strFcFlag2.Equals("�dz�") ? "1" : ""); this.SetFC2(strValue); } catch { } try { if (!string.IsNullOrEmpty(strNum2)) Edt_Num2.Value = Convert.ToDecimal(strNum2); else Edt_Num2.Value = null; } catch { } finally { cbx_Point2.Checked = bPoint2; } this.SetPrintWeightType(strWeightType); this.TrueValue(strDouble, out strValue); this.SetDoubleCopies(strValue); this.TrueValue(strPrintAddr, out strValue); this.SetPrintAddr(strValue); this.TrueValue(strPrintStdNo, out strValue); this.SetPrintStdNo(strValue); this.TrueValue(strPrintSteel, out strValue); this.SetPrintSteel(strValue); } catch { } }
private void annullaPagamento(UltraGridRow row) { var pagamento = getPagamentoFatturaService().GetById(_ritenutaClick.IdPagamento.GetValueOrDefault()); if (CommonMessages.DisplayConfirm("Sei sicuro di volere eliminare il pagamento della fattura: " + pagamento.IdentificativoArchiviazione + " ?") == DialogResult.Yes) { var authMessage = getPagamentoFatturaService().IsAllowDeletePagamento(pagamento); if (string.IsNullOrEmpty(authMessage.FatalMessage)) { var result = DialogResult.Yes; if (!string.IsNullOrEmpty(authMessage.WarnMessage)) result = CommonMessages.DisplayConfirm("Attenzione:" + authMessage.WarnMessage + Environment.NewLine + "Vuoi confermare la eliminazione?"); if (result == DialogResult.Yes) { string message = getPagamentoFatturaService().DeletePagamento(pagamento); if (string.IsNullOrEmpty(message)) { row.Delete(false); CommonMessages.DisplayComplete("Il pagamento è stato correttamente eliminato"); } else CommonMessages.DisplayWarning("Si sono verificati i seguenti errori durante l'eliminazione del pagamento" + Environment.NewLine + Environment.NewLine + message); } } else CommonMessages.DisplayWarning("Non è ammessa la cancellazione del pagamento:" + Environment.NewLine + authMessage.FatalMessage); } }
public void AgregarUnidades(UltraGridRow Row) { ItemPlantillaServicio Item = (ItemPlantillaServicio)Row.Tag; ValueList List = new ValueList(); if (Item.Servicio != null) { Item.Unidad = Item.Servicio.UnidadBase; } foreach (ExistenciaUnidad Unidad in Item.Servicio.Unidades) { if (Item.Unidad == null & Unidad.EsUnidadBase) { Item.Unidad = Unidad; } List.ValueListItems.Add(Unidad, Unidad.Unidad.Codigo); } Row.Cells[colUnidad].ValueList = List; }
public void MostrarDireccion(UltraGridRow Row) { ItemSocioNegocioDireccion item = (ItemSocioNegocioDireccion)Row.Tag; Row.Cells[colDepartamento].Value = item.Departamento.Nombre; Row.Cells[colProvincia].Value = item.Provincia.Nombre; Row.Cells[colDistrito].Value = item.Distrito.Nombre; Row.Cells[colDireccion].Value = item.Direccion; Row.Cells[colDirEntrega].Value = item.EsDireccionEntrega; Row.Cells[colDirFactura].Value = item.EsDireccionFacturacion; }
private void listaMouseUp(object sender, MouseEventArgs e) { _ritenutaClick = null; if (e.Button == MouseButtons.Right) { _rowClick = DataGridHelper.GetCellEvent(listaRitenute, e); _ritenutaClick = DataGridHelper.GetCellEvent<RitenutaAccontoDTO>(listaRitenute, e); if (_ritenutaClick != null) contextMenuStrip1.Show(listaRitenute, e.X, e.Y); } }
public void MostrarContacto(UltraGridRow Row) { ItemSocioNegocioContacto item = (ItemSocioNegocioContacto)Row.Tag; Row.Cells[colContactoNombre].Value = item.Nombre; Row.Cells[colContactoCargo].Value = item.Cargo; Row.Cells[colContactoCorreo].Value = item.Correo; Row.Cells[colContactoTelefono].Value = item.Telefono; }
private void setImportoConto(UltraGridRow row) { try { if (row != null) { decimal importo = 0; foreach (var childRow in row.ChildBands[0].Rows) { if (childRow.Cells["ImportoPreventivo"].Value != null && childRow.Cells["ImportoPreventivo"].Value != DBNull.Value) importo += (decimal)childRow.Cells["ImportoPreventivo"].Value; } row.Cells["ImportoPreventivo"].Value = importo; } } catch (Exception ex) { _log.ErrorFormat("Errore nell'impostazione dell'importo - {0} - row:{1} - azienda:{2}", ex, Utility.GetMethodDescription(), row != null ? row.ToString() : "<NULL>", Security.Login.Instance.CurrentLogin().Azienda); throw; } }
private void ModificarDireccion(UltraGridRow Row) { ItemSocioNegocioDireccion ItemDireccion = (ItemSocioNegocioDireccion)Row.Tag; FrmSeleccionarDireccion SeleccionarDireccion = new FrmSeleccionarDireccion(); ItemDireccion = SeleccionarDireccion.ModificarDireccion(ItemDireccion); MostrarDireccion(Row); }
private void setSottoContoValueList(UltraGridRow row) { if (row.Band.Index == 0) { try { var versamento = row.ListObject as VersamentoSoggettoDTO; if (versamento != null && row.Cells.Exists("IdSottoConto")) { var idConto = versamento.IdConto; if (idConto > 0) { var idCondominio = versamento.IdCondominio; var idEsercizio = versamento.IdEsercizio; var conto = getConto(idConto, idCondominio, idEsercizio); if (conto != null) { var listUniqueKey = "SottoConti_" + conto.ID; if (listaVersamenti.DisplayLayout.ValueLists.Exists(listUniqueKey)) listaVersamenti.DisplayLayout.ValueLists.Remove(listUniqueKey); var sottoConti = getPianoContiService().GetSottoContiDataSource(conto, idEsercizio); var valueList = DataSourceHelper.GetValueList(sottoConti, "ID", "DescrizioneCompleta", listUniqueKey); valueList.Key = listUniqueKey; listaVersamenti.DisplayLayout.ValueLists.Add(valueList); row.Cells["IdSottoConto"].ValueList = listaVersamenti.DisplayLayout.ValueLists[listUniqueKey]; if (sottoConti.Count == 1) row.Cells["IdSottoConto"].Value = sottoConti[0].ID; } } } } catch (Exception ex) { _log.ErrorFormat("Errore durante la modifica di un campo in lista versamenti - {0} - esercizio:{1} - azienda:{2}", ex, Utility.GetMethodDescription(), _esercizio?.ID.ToString() ?? "<NULL>", Security.Login.Instance.CurrentLogin().Azienda); throw; } } }