private void DgvListaLocatii_StergereLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BLocatii locatieDeSters = this.dgvListaLocatii.Rows[pIndexRand].Tag as BLocatii; if (locatieDeSters != null) { if (Mesaj.Confirmare(this.GetFormParinte(), BMultiLingv.getElementById(BMultiLingv.EnumDictionar.ConfirmatiStergerea), locatieDeSters.Denumire)) { locatieDeSters.Close(true, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Stergere), null); ConstruiesteRanduriDGV(); } } } 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(); } }
private void DgvListaLocatii_EditareLinie(CCL.UI.DataGridViewPersonalizat pDGVSender, int pIndexRand) { if (this.lSeIncarca) { return; } try { incepeIncarcarea(); BLocatii locatieDeModificat = this.dgvListaLocatii.Rows[pIndexRand].Tag as BLocatii; if (locatieDeModificat != null) { if (FormDetaliuLocatie.Afiseaza(this.GetFormParinte(), locatieDeModificat)) { incarcaRand(this.dgvListaLocatii.Rows[pIndexRand], locatieDeModificat); } } } catch (Exception ex) { GestiuneErori.AfiseazaMesaj(this.GetFormParinte(), ex); } finally { finalizeazaIncarcarea(); } }
public static void Imprima(Form pEcranParinte, BClientiFacturi pFactura) { if (pFactura == null) { return; } lFactura = pFactura; lLocatieFiscala = BLocatii.GetLocatieCurenta(); //Selectam imprimanta using (PrintDocument imprimanta = SetupThePrinting(pEcranParinte, pFactura.ToStringImprimare())) { if (imprimanta != null) { lLiniiRegistru = pFactura.GetListaLucrari(null); using (PrintPreviewDialog ppDialog = new PrintPreviewDialog()) { ppDialog.ShowIcon = false; ppDialog.Document = imprimanta; CCL.UI.IHMUtile.DeschideEcran(pEcranParinte, ppDialog); } } } }
public static bool Afiseaza(Form pEcranPariente, BLocatii pLocatie) { using (FormDetaliuLocatie ecran = new FormDetaliuLocatie(pLocatie)) { ecran.AplicaPreferinteleUtilizatorului(); return(CCL.UI.IHMUtile.DeschideEcran(pEcranPariente, ecran)); } }
private void incarcaRand(DataGridViewRow pRand, BLocatii pElem) { pRand.Tag = pElem; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGV.colDenumire.ToString()].Value = pElem.Denumire; pRand.Cells[EnumColoaneDGV.colInitiala.ToString()].Value = pElem.InitialaLocatie; pRand.Cells[EnumColoaneDGV.colDenumireFiscala.ToString()].Value = pElem.DenumireFiscala; pRand.Cells[EnumColoaneDGV.colInfoContact.ToString()].Value = pElem.InfoContact; DataGridViewPersonalizat.InitCelulaStergere(pRand); }
internal bool Salveaza() { bool esteValid = BLocatii.SuntInformatiileNecesareCoerente(this.txtDenumireLocatie.Text, this.cboTipLocatie.SelectedIndex); if (this.lLocatie == null) { if (esteValid) { BLocatii.Add(this.txtDenumireLocatie.Text, this.cboTipLocatie.SelectedIndex, 0, 0, 0, 0, 0, this.txtTelefonMobilLocatie.Text, this.txtFaxLocatie.Text, this.txtSkypeLocatie.Text, this.txtContYMLocatie.Text, this.txtMailLocatie.Text, this.txtPaginaWebLocatie.Text, this.txtInfoContactLocatie.Text, this.picLogoLocatie.ImageLocation, 0, this.txtDenumireFiscalaLocatie.Text, getTipFiscalitate(), this.txtCodFiscalLocatie.Text, this.txtNrInregistrareLocatie.Text, this.txtIbanLocatie.Text, this.txtBancaLocatie.Text, this.txtReprezentantLegalLocatie.Text, this.txtCalitateReprezentantLocatie.Text, this.txtSerieChitanteLocatie.Text, CUtil.GetAsInt32(this.txtNrInregistrareLocatie.Text), this.txtSerieFacturiLocatie.Text, 0, this.chkTvaLocatie.Checked, this.txtInitialaLocatie.Text, 0, this.ctrlGestiuneCuloareLocatie.CuloareARGB, null); } else { seteazaAlerta(); } } else { this.lLocatie.Denumire = this.txtDenumireLocatie.Text; this.lLocatie.InitialaLocatie = this.txtInitialaLocatie.Text; this.lLocatie.TipLocatie = this.cboTipLocatie.SelectedIndex; this.lLocatie.Culoare = this.ctrlGestiuneCuloareLocatie.CuloareARGB; this.lLocatie.InfoContact = this.txtInfoContactLocatie.Text; this.lLocatie.AdresaMail = this.txtMailLocatie.Text; this.lLocatie.ContSkype = this.txtSkypeLocatie.Text; this.lLocatie.Fax = this.txtFaxLocatie.Text; this.lLocatie.ContYM = this.txtContYMLocatie.Text; this.lLocatie.PaginaWeb = this.txtPaginaWebLocatie.Text; this.lLocatie.TelefonMobil = this.txtTelefonMobilLocatie.Text; this.lLocatie.DenumireFiscala = this.txtDenumireFiscalaLocatie.Text; this.lLocatie.Logo = this.picLogoLocatie.ImageLocation; this.lLocatie.TipFiscalitate = getTipFiscalitate(); this.lLocatie.PlatitorDeTVA = this.chkTvaLocatie.Checked; this.lLocatie.CodFiscal = this.txtCodFiscalLocatie.Text; this.lLocatie.NumarInregistrare = this.txtNrInregistrareLocatie.Text; this.lLocatie.ContIBAN = this.txtIbanLocatie.Text; this.lLocatie.DenumireBanca = this.txtBancaLocatie.Text; this.lLocatie.ReprezentantLegal = this.txtReprezentantLegalLocatie.Text; this.lLocatie.CalitateReprezentantLegal = this.txtCalitateReprezentantLocatie.Text; this.lLocatie.SerieChitante = this.txtSerieChitanteLocatie.Text; this.lLocatie.NumarUltimaChitanta = CUtil.GetAsInt32(this.txtNrUltimaChitantaLocatie.Text); this.lLocatie.SerieFacturi = this.txtSerieFacturiLocatie.Text; this.lLocatie.NumarUltimaFactura = CUtil.GetAsInt32(this.txtNrUltimaFacturaLocatie.Text); if (esteValid) { this.lLocatie.UpdateAll(); } else { seteazaAlerta(); } } return(esteValid); }
private FormDetaliuLocatie(BLocatii pLocatie) { this.DoubleBuffered = true; InitializeComponent(); this.lLocatie = pLocatie; if (!CCL.UI.IHMUtile.SuntemInDebug()) { adaugaHandlere(); initTextML(); this.CentratCuDeplasare(); } }
private void ConstruiesteRanduriDGV() { this.dgvListaLocatii.IncepeContructieRanduri(); var listaElem = BLocatii.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Activa, null); //Incarcam lista foreach (var elem in listaElem) { incarcaRand(this.dgvListaLocatii.Rows[this.dgvListaLocatii.Rows.Add()], elem); } this.dgvListaLocatii.FinalizeazaContructieRanduri(); this.lblTotalLocatii.Text = BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Total) + this.dgvListaLocatii.RowCount.ToString(); }
private FormDetaliuLocatie(BLocatii pLocatie) { this.DoubleBuffered = true; InitializeComponent(); this.picLogoLocatie.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.lLocatie = pLocatie; if (!CCL.UI.IHMUtile.SuntemInDebug()) { adaugaHandlere(); initTextML(); this.CentratCuDeplasare(); } }
private void incarcaRand(DataGridViewRow pRand, BLocatii pElem) { pRand.Tag = pElem; DataGridViewPersonalizat.InitCelulaEditare(pRand, this.lEcranInModificare); pRand.Cells[EnumColoaneDGV.colDenumire.ToString()].Value = pElem.Denumire; //pRand.Cells[EnumColoaneDGV.colInitiala.ToString()].Value = pElem.InitialaLocatie; pRand.Cells[EnumColoaneDGV.colDenumireFiscala.ToString()].Value = pElem.DenumireFiscala; pRand.Cells[EnumColoaneDGV.colInfoContact.ToString()].Value = pElem.InfoContact; pRand.Cells[EnumColoaneDGV.colSerieFacturi.ToString()].Value = pElem.SerieFacturi; pRand.Cells[EnumColoaneDGV.colNumarulUltimeiFacturi.ToString()].Value = pElem.NumarUltimaFactura; pRand.Cells[EnumColoaneDGV.colSerieChitante.ToString()].Value = pElem.SerieChitante; pRand.Cells[EnumColoaneDGV.colNumarulUltimeiChitante.ToString()].Value = pElem.NumarUltimaChitanta; DataGridViewPersonalizat.InitCelulaStergere(pRand); }
public void Fiscalizeaza(IDbTransaction pTranzactie) { IDbTransaction Tranzactie = null; try { if (pTranzactie == null) { Tranzactie = CCL.DAL.CCerereSQL.GetTransactionOnConnection(); } else { Tranzactie = pTranzactie; } BLocatii firma = BLocatii.GetLocatieCurenta(); this.SerieFactura = firma.SerieFacturi; this.NumarFactura = firma.NumarUltimaFactura + 1; this.UpdateAll(Tranzactie); firma.NumarUltimaFactura = this.NumarFactura; firma.UpdateAll(Tranzactie); if (pTranzactie == null) { //Facem Comit tranzactiei doar daca aceasta nu a fost transmisa in parametru. Altfel comitul va fi gestionat de functia apelanta CCL.DAL.CCerereSQL.CloseTransactionOnConnection(Tranzactie, true); } } catch (Exception) { if ((pTranzactie == null) && (Tranzactie != null)) { CCL.DAL.CCerereSQL.CloseTransactionOnConnection(Tranzactie, false); } throw; } }
public static bool Afiseaza(Form pEcranPariente, BLocatii pLocatie) { if (pLocatie == null) { string denumire = CCL.UI.IHMUtile.GetTextSimpluUtilizator(pEcranPariente, BMultiLingv.getElementById(BMultiLingv.EnumDictionar.Denumire), BLocatii.StructCampuriTabela.DenumireMaxLength); if (string.IsNullOrEmpty(denumire)) { return(false); } else { int idLocatieAdaugata = BLocatii.Add(denumire, null); pLocatie = new BLocatii(idLocatieAdaugata, null); } } using (FormDetaliuLocatie ecran = new FormDetaliuLocatie(pLocatie)) { ecran.AplicaPreferinteleUtilizatorului(); return(CCL.UI.IHMUtile.DeschideEcran(pEcranPariente, ecran)); } }
private void ConstruiesteRanduriDGV() { var listaElem = BLocatii.GetListByParam(CDL.iStomaLab.CDefinitiiComune.EnumStare.Toate, null); if (listaElem.ContineElementeDeactivate()) { this.btnActiviInactivi.Visible = true; } else { this.btnActiviInactivi.Visible = false; this.btnActiviInactivi.Selectat = false; } if (!this.btnActiviInactivi.Selectat) { ConstruiesteRanduriDGV(listaElem.GetListaActive()); } else { ConstruiesteRanduriDGV(listaElem.GetListaInactive()); } }
public void Initializeaza(BLocatii pLocatie) { base.InitializeazaVariabileleGenerale(); incepeIncarcarea(); this.lLocatie = pLocatie; initListe(); if (this.lLocatie == null) { this.txtDenumireLocatie.Goleste(); this.txtInitialaLocatie.Goleste(); this.txtLocatie.Goleste(); this.ctrlGestiuneCuloareLocatie.Goleste(); this.txtInfoContactLocatie.Goleste(); this.txtMailLocatie.Goleste(); this.txtSkypeLocatie.Goleste(); this.txtFaxLocatie.Goleste(); this.txtTelefonMobilLocatie.Goleste(); this.txtContYMLocatie.Goleste(); this.txtPaginaWebLocatie.Goleste(); this.txtDenumireFiscalaLocatie.Goleste(); this.chkTvaLocatie.Checked = false; this.rbCmiLocatie.Checked = false; this.rbSrlLocatie.Checked = false; this.txtCodFiscalLocatie.Goleste(); this.txtNrInregistrareLocatie.Goleste(); this.txtIbanLocatie.Goleste(); this.txtIbanLocatie.CapitalizeazaPrimaLitera = true; this.txtCalitateReprezentantLocatie.CapitalizeazaPrimaLitera = true; this.txtBancaLocatie.Goleste(); this.txtReprezentantLegalLocatie.Goleste(); this.txtCalitateReprezentantLocatie.Goleste(); this.txtSerieChitanteLocatie.Goleste(); this.txtNrUltimaChitantaLocatie.Goleste(); this.txtSerieFacturiLocatie.Goleste(); this.txtNrUltimaFacturaLocatie.Goleste(); } else { this.txtDenumireLocatie.Text = pLocatie.Denumire; this.txtInitialaLocatie.Text = pLocatie.InitialaLocatie; this.cboTipLocatie.SelectedIndex = pLocatie.TipLocatie; this.ctrlGestiuneCuloareLocatie.Initializeaza(pLocatie.Culoare); this.txtInfoContactLocatie.Text = pLocatie.InfoContact; this.txtMailLocatie.Text = pLocatie.AdresaMail; this.txtSkypeLocatie.Text = pLocatie.ContSkype; this.txtFaxLocatie.Text = pLocatie.Fax; this.txtTelefonMobilLocatie.Text = pLocatie.TelefonMobil; this.txtContYMLocatie.Text = pLocatie.ContYM; this.txtPaginaWebLocatie.Text = pLocatie.PaginaWeb; if (!string.IsNullOrEmpty(this.lLocatie.Logo)) { this.picLogoLocatie.Image = CCL.UI.Imagini.GetThumbnailImage(CCL.UI.IHMUtile.getImagineDinFisier(lLocatie.Logo), 90, 90, true); } this.txtDenumireFiscalaLocatie.Text = pLocatie.DenumireFiscala; this.chkTvaLocatie.Checked = pLocatie.PlatitorDeTVA; this.rbCmiLocatie.Checked = pLocatie.TipFiscalitate == 1 ? true : false; this.rbSrlLocatie.Checked = pLocatie.TipFiscalitate == 2 ? true : false; this.txtCodFiscalLocatie.Text = pLocatie.CodFiscal; this.txtNrInregistrareLocatie.Text = pLocatie.NumarInregistrare; this.txtIbanLocatie.Text = pLocatie.ContIBAN; this.txtBancaLocatie.Text = pLocatie.DenumireBanca; this.txtReprezentantLegalLocatie.Text = pLocatie.ReprezentantLegal; this.txtCalitateReprezentantLocatie.Text = pLocatie.CalitateReprezentantLegal; this.txtSerieChitanteLocatie.Text = pLocatie.SerieChitante; this.txtNrUltimaChitantaLocatie.Text = pLocatie.NumarUltimaChitanta.ToString(); this.txtSerieFacturiLocatie.Text = pLocatie.SerieFacturi; this.txtNrUltimaFacturaLocatie.Text = pLocatie.NumarUltimaFactura.ToString(); } finalizeazaIncarcarea(); }
private void bwBDD_DoWork(object sender, DoWorkEventArgs e) { try { this.bwBDD.ReportProgress(1, (int)EnumScripturi.CreareBDD); //Recuperam informatiile de pe iStoma doar daca reusim sa cream baza de date CGestiuneIO.creazaBDD(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.lNumeBDD, this.chkServerulEstePeAcestCalculator.Checked); string parolaHash = CSecuritate.GetMd5Hash(this.lParolaISTOMA); //recuperam scripturile de creare Dictionary <EnumScripturi, byte[]> dictScripturi = new Dictionary <EnumScripturi, byte[]>(); //0 = nume //1 = prenume //2 = cnp //3 = versiune BDD //4 = denumire cabinet //5 = nr tel //6 = mail //7 = site //8 = data de nastere zzLLaaaa //9 = limba vorbita //10 = tara clientului List <string> detaliiUser = null; this.bwBDD.ReportProgress(5, (int)EnumScripturi.RecuperareInformatii); //ne legam la serviciu iStoma.VerificareSoapClient servVerif = new iStoma.VerificareSoapClient(); dictScripturi.Add(EnumScripturi.Tabele, servVerif.IncarcaTabele(this.lCodClient, parolaHash)); dictScripturi.Add(EnumScripturi.View, servVerif.IncarcaView(this.lCodClient, parolaHash)); dictScripturi.Add(EnumScripturi.PS, servVerif.IncarcaPS(this.lCodClient, parolaHash)); dictScripturi.Add(EnumScripturi.Tari, servVerif.IncarcaTari(this.lCodClient, parolaHash)); dictScripturi.Add(EnumScripturi.Regiuni, servVerif.IncarcaRegiuni(this.lCodClient, parolaHash)); dictScripturi.Add(EnumScripturi.Localitati, servVerif.IncarcaLocalitati(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.CP, servVerif.IncarcaCP(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.COR, servVerif.IncarcaCOR(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.CAEN, servVerif.IncarcaCAEN(this.lCodClient, parolaHash)); dictScripturi.Add(EnumScripturi.SMTP, servVerif.IncarcaSMTP(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.Drepturi, servVerif.IncarcaDrepturi(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.Meniu, servVerif.IncarcaMeniu(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.Citate, servVerif.IncarcaCitate(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.MultiLingv, servVerif.IncarcaMultiLingv(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.Afectiuni, servVerif.IncarcaAfectiuni(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.OrganeArtificiale, servVerif.IncarcaOrganeArtificiale(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.ProduseGestiune, servVerif.IncarcaProduseGestiune(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.Interventii, servVerif.IncarcaInterventii(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.TratamenteAdministrative, servVerif.IncarcaTratamenteAdministrative(this.lCodClient, parolaHash)); //dictScripturi.Add(EnumScripturi.EvenimenteCalendaristice, servVerif.IncarcaEvenimenteCalendaristice(this.lCodClient, parolaHash)); detaliiUser = servVerif.GetInformatiiClient(this.lCodClient, parolaHash); BMultiLingv.EnumLimba limbaUtilizator = BMultiLingv.EnumLimba.Romana; int idTaraClient = BTari.ConstIDRomania; //LIMBA try { if (detaliiUser.Count > 9) { limbaUtilizator = (BMultiLingv.EnumLimba)Convert.ToInt32(detaliiUser[9]); } } catch (Exception) { } //TARA try { if (detaliiUser.Count > 9) { idTaraClient = Convert.ToInt32(detaliiUser[10]); } } catch (Exception) { } //List<string> listaRecomandari = servVerif.IncarcaRecomandari(this.lCodClient, parolaHash); servVerif.Close(); string continutFisierSQL = string.Empty; this.bwBDD.ReportProgress(10, (int)EnumScripturi.Tabele); //Tabele continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.Tabele]); CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); this.bwBDD.ReportProgress(13, (int)EnumScripturi.View); //View continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.View]); CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL, "-$$$-"); this.bwBDD.ReportProgress(16, (int)EnumScripturi.PS); //PS continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.PS]); CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL, "-$$$-"); this.bwBDD.ReportProgress(20, (int)EnumScripturi.Tari); //Populam tabelele nou create //TARI continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.Tari]); CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); this.bwBDD.ReportProgress(23, (int)EnumScripturi.Regiuni); //REGIUNI continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.Regiuni]); CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); this.bwBDD.ReportProgress(28, (int)EnumScripturi.Localitati); //LOCALITATI continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.Localitati]); CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL, "-$$$-"); //this.bwBDD.ReportProgress(35, (int)EnumScripturi.CP); ////CODURI POSTALE //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.CP]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL, "-$$$-"); //this.bwBDD.ReportProgress(45, (int)EnumScripturi.COR); ////CODURI COR //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.COR]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL, "-$$$-"); //this.bwBDD.ReportProgress(55, (int)EnumScripturi.CAEN); ////CODURI CAEN //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.CAEN]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL, "-$$$-"); //this.bwBDD.ReportProgress(65, (int)EnumScripturi.Drepturi); ////DREPTURI //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.Drepturi]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); this.bwBDD.ReportProgress(67, (int)EnumScripturi.SMTP); //SMTP continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.SMTP]); CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); this.bwBDD.ReportProgress(70, (int)EnumScripturi.Citate); ////CITATE //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.Citate]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); //this.bwBDD.ReportProgress(73, (int)EnumScripturi.MultiLingv); ////MULTI LINGV //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.MultiLingv]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL, "-$$$-"); //this.bwBDD.ReportProgress(78, (int)EnumScripturi.Meniu); ////MENIU //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.Meniu]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); //this.bwBDD.ReportProgress(80, (int)EnumScripturi.Afectiuni); //Activam conexiunea la noua BDD seteazaConexiuneBDD(); ////Adaugam specialitatea Medicina dentara "Medicină dentară" //int idSpecialitateStomatologica = BLL.General.Comune.BSpecialitati.Add(BLL.General.BMultiLingvPC.getElementById(BLL.General.BMultiLingv.EnumDictionar.MedicinaDentara), false, true, false, false, true, true, null); ////ADAUGAM AFECTIUNILE SPECIFICE ACESTEI SPECIALITATI //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.Afectiuni]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); //this.bwBDD.ReportProgress(82, (int)EnumScripturi.OrganeArtificiale); ////ADAUGAM ORGANELE ARTIFICIALE //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.OrganeArtificiale]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); //this.bwBDD.ReportProgress(85, (int)EnumScripturi.ProduseGestiune); ////ADAUGAM PRODUSELE DE GESTIUNE //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.ProduseGestiune]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); //this.bwBDD.ReportProgress(87, (int)EnumScripturi.Interventii); ////ADAUGAM INTERVENTIILE //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.Interventii]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); //Setam versiunea BDD CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, string.Format("INSERT INTO VersiuniBDD_TD(tVersiune) VALUES ('{0}')", detaliiUser[3])); //Adaugam utilizatorul cu specialitatea stomatolog int idUser = BUtilizator.Add(this.lCodClient, this.lParolaISTOMA, detaliiUser[0], detaliiUser[1], detaliiUser[2]); //Actualizam informatiile clientului cu cele pe care ni le-a furnizat BUtilizator userCreat = BUtilizator.GetById(idUser, null); userCreat.TelefonMobil = detaliiUser[5]; userCreat.AdresaMail = detaliiUser[6]; userCreat.PaginaWeb = detaliiUser[7]; userCreat.Titulatura = CDefinitiiComune.EnumTitulatura.Doctor; userCreat.DataNastere = CUtil.getDateFromString(detaliiUser[8]); //userCreat.Rol = BUtilizator.EnumRolUtilizator.Medic; userCreat.NumarOrdine = 1; //userCreat.UltimaOptiuneAccesata = BLL.General.BMeniu.EnumOptiune.SetariInitiale; userCreat.UpdateAll(null); //this.bwBDD.ReportProgress(95, (int)EnumScripturi.TratamenteAdministrative); ////ADAUGAM TRATAMENTELE ADMINISTRATIVE //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.TratamenteAdministrative]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL, "-$$$-"); //this.bwBDD.ReportProgress(96, (int)EnumScripturi.EvenimenteCalendaristice); ////EVENIMENTE CALENDARISTICE - Avem nevoie de utilizator //continutFisierSQL = CGestiuneIO.DeCompreseazaText(dictScripturi[EnumScripturi.EvenimenteCalendaristice]); //CGestiuneIO.executaFisierSQL(this.lNumeServer, this.lNumeInstanta, this.lNumeUser, this.lParolaSQL, this.chkServerulEstePeAcestCalculator.Checked, this.lNumeBDD, continutFisierSQL); //string numeRadacinaDefault = "Clinica de stomatologie"; //string numeGrupDefault = "Grup"; string numeSediuDefault = "Stoma"; //string numeSectieDefault = "Medicină dentară"; //string numeCabinet1Default = "Cabinet 1"; //Adaugam locatia medicala (Asociatie + grup + sediu + uf) //string numeRadacina = detaliiUser[4]; string numeSediu = detaliiUser[4]; //if (string.IsNullOrEmpty(numeRadacina)) // numeRadacina = numeRadacinaDefault; if (string.IsNullOrEmpty(numeSediu)) { numeSediu = numeSediuDefault; } int idSediu = BLocatii.Add(numeSediu, null); //Adaugam adresa sediului BAdrese.Add(BAdrese.EnumTipAdresa.Principala, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, idTaraClient, -1, -1, string.Empty, string.Empty, CDefinitiiComune.EnumTipObiect.Locatie, idSediu, null); //Vom considera ca radacina este locatia fiscala BLocatii sediu = new BLocatii(idSediu, null); //Setam tel si email pt sediu sediu.TelefonMobil = detaliiUser[5]; sediu.AdresaMail = detaliiUser[6]; sediu.PaginaWeb = detaliiUser[7]; sediu.UpdateAll(); } catch (Exception ex) { this.lExceptie = ex.Message; } }