private void ctrlValidareAnulare_Validare(object sender, EventArgs e) { try { if (!this.txtSugestie.AreValoare()) { this.txtSugestie.Focus(); } else { int id = IHMUtile._AccesTotal.CereFunctionalitate(1, "Sugestie", CUtil.InlocuiesteDiacriticeHTML(string.Concat(this.txtSugestie.Text, CConstante.LinieNoua, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.VaMultumim), CConstante.LinieNoua, this.lUtilizatorConectat.ToStringPoliticos())), 2); if (id > 0) { Mesaj.Informare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.VaMultumim), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Sugestie)); //IHMUtile._AccesTotal.Notifica(CCL.UI.Imagini.GetDenumireAplicatie(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Sugestie), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.VaMultumim), false); } inchideEcranul(System.Windows.Forms.DialogResult.OK); } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } }
private void BtnValidare_Click(object sender, EventArgs e) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BUtilizator utilizator = this.dgvListaUtilizatori.Rows[this.dgvListaUtilizatori.CurrentCell.RowIndex].Tag as BUtilizator; if (utilizator != null) { this.lUtilizator = utilizator; this.inchideEcranulOK(); } else { Mesaj.Informare(this, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.SelectatiTehnicianul), string.Empty); } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
private void BtnFiscalizeaza_Click(object sender, EventArgs e) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BLocatii firma = BLocatii.GetLocatieCurenta(); string serieFactura = firma.SerieFacturi; if (serieFactura == string.Empty) { Mesaj.Informare(this.GetFormParinte(), string.Format("{0}: {1}", BMultiLingv.getElementById(BMultiLingv.EnumDictionar.NuExistaSerieFacturaAlocataPeLocatie), firma.Denumire), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Facturare)); } else { this.lFactura.Fiscalizeaza(null); inchideEcranulOK(); } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
bool SalveazaEtapele() { bool esteSalvat = false; foreach (DataGridViewRow rand in this.dgvListaEtape.Rows) { DateTime dataInceput = CUtil.GetAsDate(this.dgvListaEtape.Rows[rand.Index].Cells[EnumColoaneDGV.colDataInceput.ToString()].Tag); DateTime dataSfarsit = CUtil.GetAsDate(this.dgvListaEtape.Rows[rand.Index].Cells[EnumColoaneDGV.colDataSfarsit.ToString()].Tag); int idUtilizator = CUtil.GetAsInt32(this.dgvListaEtape.Rows[rand.Index].Cells[EnumColoaneDGV.colTehnician.ToString()].Tag); BClientiComenziEtape listaLucrariEtapa = this.dgvListaEtape.Rows[rand.Index].Cells[EnumColoaneDGV.colDenumireEtapa.ToString()].Tag as BClientiComenziEtape; BLucrariEtape lucrareEtapa = this.dgvListaEtape.Rows[rand.Index].Cells[EnumColoaneDGV.colDenumireEtapa.ToString()].Tag as BLucrariEtape; if (listaLucrariEtapa == null) { if (lucrareEtapa == null) { BEtape etapa = this.dgvListaEtape.Rows[rand.Index].Cells[EnumColoaneDGV.colDenumireEtapa.ToString()].Tag as BEtape; if (etapa != null && dataInceput != CConstante.DataNula && dataSfarsit != CConstante.DataNula && idUtilizator != 0) { SalveazaComandaEtape(etapa, dataInceput, dataSfarsit, idUtilizator); esteSalvat = true; } } else { if (lucrareEtapa != null && dataInceput != CConstante.DataNula && dataSfarsit != CConstante.DataNula && idUtilizator != 0) { SalveazaComandaEtape(lucrareEtapa, dataInceput, dataSfarsit, idUtilizator); esteSalvat = true; } } } else { if (listaLucrariEtapa != null && dataInceput != CConstante.DataNula && dataSfarsit != CConstante.DataNula && idUtilizator != 0) { SalveazaComandaEtape(listaLucrariEtapa, dataInceput, dataSfarsit, idUtilizator); esteSalvat = true; } } } if (esteSalvat == false) { Mesaj.Informare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.InformatiiIncomplete), string.Empty); } return(esteSalvat); }
private void DgvComenzi_StergereLinie(DataGridViewPersonalizat pDGVSender, int pIndexRand) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BClientiComenzi comandaDeSters = pDGVSender.Rows[pIndexRand].Tag as BClientiComenzi; if (comandaDeSters != null) { if (!this.btnActiviInactivi.Selectat) { if (comandaDeSters.IdFactura > 0) { Mesaj.Informare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.LucrarileFacturateNuPotFiSterse), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere)); } else { if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), null)) { comandaDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Inchidere), null); ConstruiesteRanduriDGV(); } } } else { if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiReactivarea), string.Empty)) { comandaDeSters.Close(false, string.Empty, null); ConstruiesteRanduriDGV(); } } } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
private void TxtCodDeBare_AfterUpdate(Control sender, string sNumeProprietateAtasata, string sNouaValoare) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); if (this.txtCodDeBare.AreValoare()) { int idLucrare = Convert.ToInt32(this.txtCodDeBare.Text); BClientiComenzi comanda = null; try { comanda = new BClientiComenzi(idLucrare); } catch (Exception) { //Afisam ca nu am gasit lucrarea Mesaj.Informare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.LucrareaNuAFostGasitaInSistem), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ScanatiCodulDeBare)); } if (comanda != null) { TablouDeBord.Clienti.FormDetaliuComanda.Afiseaza(this.GetFormParinte(), comanda, comanda.GetClient(), comanda.GetLucrare(null)); this.Close(); } } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
private void BtnModificaTehnician_Click(object sender, EventArgs e) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BColectieClientiComenziEtape listaEtapeBifate = this.dgvListaEtape.GetListaObiecteBifate <BColectieClientiComenziEtape, BClientiComenziEtape>(); if (listaEtapeBifate.Count > 0) { if (FormListaUtilizatori.Afiseaza(this.GetFormParinte(), CDefinitiiComune.EnumRol.Tehnician, 750, 250) && FormListaUtilizatori._SUtilizator != null) { foreach (var rand in this.dgvListaEtape.GetListaLiniiSelectate()) { rand.Cells[EnumColoaneDGV.colTehnician.ToString()].Value = FormListaUtilizatori._SUtilizator.GetNumeCompletUtilizator(); rand.Cells[EnumColoaneDGV.colTehnician.ToString()].Tag = FormListaUtilizatori._SUtilizator.Id; } } } else { Mesaj.Informare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.InformareSelectareLinie), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Etape)); } this.panelOptiuni.Visible = false; } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
private void CtrlValidareAnulare_Validare(object sender, EventArgs e) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); if (this.dgvListaLucrari.SelectedRow != null) { Tuple <BListaPreturiStandard, BListaPreturiClienti> elemLinie = this.dgvListaLucrari.SelectedRow.Tag as Tuple <BListaPreturiStandard, BListaPreturiClienti>; if (elemLinie != null) { this.lLucrare = elemLinie.Item1; if (this.lLucrare != null) { inchideEcranulOK(); } } } else { Mesaj.Informare(this, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.SelectatiOLucrareDinLista), string.Empty); } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }