/// <summary> /// Listeaza permisele de munca /// </summary> private void LoadIstoricPermiseMunca() { try { listTable.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.IstoricPermisMunca istPermisMunca = new Salaries.Business.IstoricPermisMunca(); istPermisMunca.AngajatId = AngajatID; string[] arHeader = { "Serie", "Numar", "Data eliberare", "Valabil pana la", "Activ" }; string[] arCols = { "SeriePermisMunca", "NrPermisMunca", "PermMuncaDataEliberare", "PermMuncaDataExpirare", "Activ" }; ListTable objListTable = new ListTable(listTable, istPermisMunca.LoadIstoricPermiseMunca(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici un permis de munca asociat acestui angajat!"; string[] ar_OnClickParam = { AngajatID.ToString(), "PermisMuncaID", "SeriePermisMunca", "NrPermisMunca", "PermMuncaDataEliberare", "PermMuncaDataExpirare", "Activ" }; string[] ar_OnClickParamType = { "const", "dataset", "dataset", "dataset", "dataset", "dataset", "dataset" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectPermisMunca"; objListTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza concediile medicale /// </summary> private void LoadConcediiMedicale() { errorLit.Text = ""; try { DataSet dsConcediiMedicale = new DataSet(); Salaries.Business.NomenclatorConcediiMedicale nomenclatorConcediiMedicale = new NomenclatorConcediiMedicale(); dsConcediiMedicale = nomenclatorConcediiMedicale.GetConcediiMedicale(); listTable.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); string[] arHeader = { "Nr. minim angajati", "Nr. maxim angajati", "Nr. zile platite" }; string[] arCols = { "ValMinimAngajati", "ValMaximAngajati", "NrZilePlatite" }; ListTable objListTable = new ListTable(listTable, dsConcediiMedicale, arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista concedii medicale!"; string[] ar_OnClickParam = { "id_Criteriu", "ValMinimAngajati", "ValMaximAngajati", "NrZilePlatite" }; string[] ar_OnClickParamType = { "dataset", "dataset", "dataset", "dataset" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectFunctie"; objListTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza cartile de identitate /// </summary> private void LoadIstoricCartiIdentitate() { try { listTable.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.IstoricCartiIdentitate istCI = new Salaries.Business.IstoricCartiIdentitate(); istCI.AngajatId = AngajatID; string[] arHeader = { "CNP", "CNP anterior", "Serie", "Numar", "Eliberat de", "Data eliberare", "Valabil pana la", "Activ" }; string[] arCols = { "CNP", "CNPAnterior", "Serie", "Numar", "EliberatDe", "DataEliberarii", "ValabilPanaLa", "Activ" }; ListTable objListTable = new ListTable(listTable, istCI.LoadIstoricCartiIdentitate(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici o carte de identitate asociata acestui angajat!"; string[] ar_OnClickParam = { AngajatID.ToString(), "CarteIdentitateID", "CNP", "CNPAnterior", "Serie", "Numar", "EliberatDe", "DataEliberarii", "ValabilPanaLa", "Activ" }; string[] ar_OnClickParamType = { "const", "dataset", "dataset", "dataset", "dataset", "dataset", "dataset", "dataset", "dataset", "dataset" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectCarteIdentitate"; objListTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza concediile de odihna /// </summary> private void LoadFormIstoricCO() { try { listTable.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.IstoricConcediuOdihnaAngajat istCOA = new Salaries.Business.IstoricConcediuOdihnaAngajat(); istCOA.AngajatId = AngajatID; string[] arHeader = { "Data de inceput", "Data de sfarsit", "Observatii" }; string[] arCols = { "DataStart", "DataEnd", "Observatii" }; ListTable objListTable = new ListTable(listTable, istCOA.LoadIstoricCO(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici un concediu de odihna pentru acest angajat!"; objListTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Afiseaza lista conturilor la banci /// </summary> private void LoadConturiList() { try { listTable.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.ConturiAngajat objListConturi = new Salaries.Business.ConturiAngajat(); objListConturi.AngajatId = AngajatID; string[] arHeader = { "Activ", "Banca", "Filiala", "Cont", "Moneda" }; string[] arCols = { "Activ", "NumeBanca", "Filiala", "NumarCont", "Moneda" }; ListTable objListTable = new ListTable(listTable, objListConturi.LoadConturiBanca(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici un cont asociat acestui angajat!"; string[] ar_OnClickParam = { "Activ", "ContID", "BancaID", "NumarCont", "Moneda" }; string[] ar_OnClickParamType = { "dataset", "dataset", "dataset", "dataset", "dataset" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectCont"; objListTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Obtine lista caselor de asigurari si o afiseaza in tabelul primit ca prametru. /// </summary> /// <param name="tabel">Tabelul care va contine lista caselor de asigurari</param> private void AdaugaLista(ListTable listTable) { // numele campurilor din DataSet-ul asociat tabelului ale caror valori trebuie transmise atunci cand se selecteaza // o casa de asigurare (atunci cand se da click pe un rand din tabel) cu scopul de a afisa informatiile care o // caracterizeaza, in pagina de modificare casa de asigurari string[] cellOnClickParams = { "CasaDeAsigurariID" }; string[] cellOnClickParamsType = { "dataset" }; // metoda javascript apelata atunci cand se selecteaza un rand din tabel listTable.OnclickJSMethod = "SelectLine"; listTable.OnclickParams = cellOnClickParams; listTable.OnclickParamsType = cellOnClickParamsType; // se incearca obtinerea datelor din DataSet-ul asociat tabelului si afisarea lor try { // se construieste tabelul ce va contine lista caselor de asigurari listTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza NIF-urile unui angajat /// </summary> private void LoadIstoricNIFuri() { try { listTable.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border","1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.IstoricNIF istNIF = new Salaries.Business.IstoricNIF(); istNIF.AngajatId = AngajatID; string[] arHeader = { "Numar", "Activ"}; string[] arCols = { "NIF", "Activ"}; ListTable objListTable = new ListTable(listTable, istNIF.LoadIstoricNIFuri(), arHeader, arCols); objListTable.textForEmptyDataSet= "Nu exista nici un NIF asociat acestui angajat!"; string[] ar_OnClickParam = { AngajatID.ToString(), "NIFID", "NIF", "Activ" }; string[] ar_OnClickParamType = { "const", "dataset", "dataset", "dataset" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectNIF"; objListTable.DrawListTableWithoutDigits(); } catch(Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Procedura afiseaza alertele pentru un angajat /// </summary> private void LoadIstoricAlerte() { try { listTable.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.IstoricAlerte istAlerte = new Salaries.Business.IstoricAlerte(); istAlerte.AngajatId = AngajatID; string[] arHeader = { "Descriere", "Data expirare", "Interval alerta", "Activ" }; string[] arCols = { "Descriere", "DataExpirare", "PerioadaCritica", "Activ" }; ListTable objListTable = new ListTable(listTable, istAlerte.LoadInfoAlerta(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici o alerta speciala asociata acestui angajat!"; string[] ar_OnClickParam = { AngajatID.ToString(), "AlertaID", "Descriere", "DataExpirare", "PerioadaCritica", "Activ" }; string[] ar_OnClickParamType = { "const", "dataset", "dataset", "dataset", "dataset", "dataset" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectAlerta"; objListTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listarea titlurilor angajatilor /// </summary> public void ListareTitluriAngajati() { try { TableRow myRow = new TableRow(); TableCell myCell = new TableCell(); //titlul de la listare myCell.CssClass = "BigBlueBold"; myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Middle; myCell.Text = "Lista titlurilor existente"; myCell.Height = new Unit(50); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); // lista de banci existente myRow = new TableRow(); myCell = new TableCell(); myCell.Attributes.Add("width", "100%"); myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Top; Table listTable = new Table(); string[] tableHeader = { "Denumire", "Simbol" }; string[] tableCols = { "Denumire", "Simbol" }; Salaries.Business.AdminTitluriAngajati objAdminTitluriAngajati = new Salaries.Business.AdminTitluriAngajati(); ListTable objListTable = new ListTable(listTable, objAdminTitluriAngajati.LoadInfoTitluriAngajati(), tableHeader, tableCols); string[] ar_OnClickParam = { "TitluID" }; string[] ar_OnClickParamType = { "dataset" }; objListTable.OnclickJSMethod = "SelectLine"; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.DrawListTableWithoutDigits(); myCell.Controls.Add(listTable); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); td_editLine.Visible = false; add_form.Style.Add("display", "none"); btnEdit.Style.Add("display", "none"); td_addLine.Visible = true; add_buttonLine.Visible = true; tdTitle.InnerText = "Adaugare titlu angajat"; lblMessage.Text = ""; } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza persoanele in intretinere ale unui angajat /// </summary> private void LoadPersoaneList() { try { listTable.Rows.Clear(); Salaries.Business.AdminInvaliditati adminInvaliditati = new Salaries.Business.AdminInvaliditati(); ddlInvaliditate.DataSource = adminInvaliditati.LoadInfoInvaliditati(); ddlInvaliditate.DataValueField = "InvaliditateID"; ddlInvaliditate.DataTextField = "Nume"; ddlInvaliditate.DataBind(); // Adaugat: Anca Holostencu Salaries.Business.PersoanaInIntretinere tipuri = new PersoanaInIntretinere(); ddlTipPersoana.DataSource = tipuri.GetAllTipuriPersoaneInIntretinere(); ddlTipPersoana.DataValueField = "TipID"; ddlTipPersoana.DataTextField = "TipPersoana"; ddlTipPersoana.DataBind(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); // Modificat: Lungu Andreea 18.03.2008 - s-a adaugat campul activ string[] arHeader = { "Nume", "Prenume", "CNP", "Tip persoana", "Invaliditate", "Activ" }; string[] arCols = { "Nume", "Prenume", "CNP", "TipPersoana", "InvaliditateNume", "Activ" }; // Modificat: Anca Holostencu Salaries.Business.Angajat angajat = new Salaries.Business.Angajat(); angajat.AngajatId = AngajatID; DataSet ds = angajat.GetPersoaneInIntretinere(); ListTable objListTable = new ListTable(listTable, ds, arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici o persoana in intretinerea angajatului!"; string[] ar_OnClickParam = { "ID", "Nume", "Prenume", "CNP", "TipID", "InvaliditateID", "Activ" }; string[] ar_OnClickParamType = new string[ar_OnClickParam.Length]; for (int i = 0; i < ar_OnClickParamType.Length; i++) { ar_OnClickParamType[i] = "dataset"; } objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectPersoana"; objListTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Cu ajutorul metodei ListTipOreLucrate se genereaza tabelul ce va fi afisat. /// Acest tabel contine toate tipurile de ore lucrate existente in baza de date. /// </summary> private void ListTipOreLucrate() { try { list_form.Style.Add("display", ""); add_form.Style.Add("display", "none"); btnSalveaza.Visible = false; btnInapoi.Visible = false; txtTipIntervalID.Text = "0"; TableRow myRow = new TableRow(); TableCell myCell = new TableCell(); //titlul de la listare myCell.CssClass = "BigBlueBold"; myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Middle; myCell.Text = "Nomenclator tipuri ore lucrate"; myCell.Height = new Unit(50); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); // lista de impozite existente myRow = new TableRow(); myCell = new TableCell(); myCell.Attributes.Add("width", "100%"); myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Top; Table listTable = new Table(); string[] tableHeader = { "Denumire", "Procent", "Descriere", "Nr maxim ore", "Tip ora standard", "Modificabila ulterior", "Folosire curenta", "Bonuri de masa" }; string[] tableCols = { "Denumire", "Procent", "Descriere", "NrMaximOreSapt", "Standard", "Modificare", "Folosire", "BonuriMasa" }; ListTable objListTable = new ListTable(listTable, new Salaries.Business.NomenclatorTipOreLucrate().GetTipuriOreLucrate(), tableHeader, tableCols); objListTable.textForEmptyDataSet = "Nu exista date in nomenclatorul de tipuri de ore lucrate!"; string[] ar_OnClickParam = { "TipIntervalID" }; string[] ar_OnClickParamType = { "dataset" }; objListTable.OnclickJSMethod = "SelectTipOraLucrata"; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.DrawListTableWithoutDigits(); myCell.Controls.Add(listTable); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Cu ajutorul metodei ListBoli se genereaza tabelul ce va fi afisat. /// Acest tabel contine toate bolile existente in baza de date. /// </summary> private void ListBoli() { try { list_form.Style.Add("display", ""); add_form.Style.Add("display", "none"); btnSalveaza.Visible = false; btnInapoi.Visible = false; txtBoalaID.Text = "0"; TableRow myRow = new TableRow(); TableCell myCell = new TableCell(); //titlul de la listare myCell.CssClass = "BigBlueBold"; myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Middle; myCell.Text = "Nomenclator boli"; myCell.Height = new Unit(50); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); // lista de impozite existente myRow = new TableRow(); myCell = new TableCell(); myCell.Attributes.Add("width", "100%"); myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Top; Table listTable = new Table(); string[] tableHeader = { "Cod boala", "Categorie boala", "Procent", "Necesita Stagiu" }; string[] tableCols = { "Cod", "Categorie", "Procent", "Stagiu" }; ListTable objListTable = new ListTable(listTable, new Salaries.Business.NomenclatorBoli().GetBoli(), tableHeader, tableCols); objListTable.textForEmptyDataSet = "Nu exista date in nomenclatorul de boli!"; string[] ar_OnClickParam = { "BoalaID" }; string[] ar_OnClickParamType = { "dataset" }; objListTable.OnclickJSMethod = "SelectBoala"; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.DrawListTableWithoutDigits(); myCell.Controls.Add(listTable); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza referintele unui angajat /// </summary> private void LoadFormReferinte() { try { settings = Salaries.Configuration.ModuleConfig.GetSettings(); UtilitiesDb utilDb = new UtilitiesDb(settings.ConnectionString); listTable.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.IstoricReferinte ReferinteList = new Salaries.Business.IstoricReferinte(); ReferinteList.AngajatId = AngajatID; string[] arHeader = { "Titlu", "Descriere", "Data" }; string[] arCols = { "Titlu", "Descriere", "Data" }; ListTable objListTable = new ListTable(listTable, ReferinteList.LoadReferinte(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici o referinta asociata acestui angajat!"; string[] ar_OnClickParam = { "ReferintaID", "Titlu", "Data", "Descriere" }; string[] ar_OnClickParamType = { "dataset", "dataset", "dataset", "dataset" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectReferinta"; objListTable.DrawListTableWithoutDigits(); for (int i = 1; i < listTable.Rows.Count - 1; i++) { TableRow r = listTable.Rows[i]; if (r.Cells.Count == 4) { string Descriere = r.Cells[2].Text; if (Descriere.Length > this.MaxDescriere) { Descriere = Descriere.Substring(0, MaxDescriere) + "..."; } r.Cells[2].Text = Descriere; r.Cells[2].Attributes["alt"] = Descriere; } } } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza functiile unui angajat /// </summary> private void LoadIstoricFunctii() { try { listTable.Rows.Clear(); //daca toate functiile au cod Siemens atasat Salaries.Business.AdminFunctii functie = new Salaries.Business.AdminFunctii(); if (functie.CheckIfToateFunctiileAuCodSiemens()) { //este afisat in dropdownlist codul Siemens - numele functiei lstFunctie.DataSource = functie.LoadInfoCodSiemensNumeFunctie(); } //altfel else { //este afisat in dropdownlist codul COR - numele functiei lstFunctie.DataSource = functie.LoadInfoCodCORNumeFunctie(); } lstFunctie.DataValueField = "FunctieID"; lstFunctie.DataTextField = "CodNume"; lstFunctie.DataBind(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.IstoricFunctie istFunctie = new Salaries.Business.IstoricFunctie(); istFunctie.AngajatId = AngajatID; string[] arHeader = { "Functie", "Norma lucru", "Data start" }; string[] arCols = { "Nume", "NormaLucru", "DataStart" }; ListTable objListTable = new ListTable(listTable, istFunctie.LoadIstoricFunctii(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici o functie asociata acestui angajat!"; string[] ar_OnClickParam = { "FunctieID", "DataStart", AngajatID.ToString() }; string[] ar_OnClickParamType = { "dataset", "dataset", "const" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectFunctie"; objListTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Lista angajatorilor /// </summary> public void ListareAngajatori() { try { TableRow myRow = new TableRow(); TableCell myCell = new TableCell(); //titlul de la listare myCell.CssClass = "BigBlueBold"; myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Middle; myCell.Text = "Lista angajatorilor existenti"; myCell.Height = new Unit(50); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); // lista de banci existente myRow = new TableRow(); myCell = new TableCell(); myCell.Attributes.Add("width", "100%"); myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Top; Table listTable = new Table(); string[] tableHeader = { "Denumire", "CUI / CNP", "Nr. inreg. ", "Telefon" }; string[] tableCols = { "Denumire", "CUI_CNP", "NrInregORC", "Telefon" }; Salaries.Business.AdminAngajator angajator = new Salaries.Business.AdminAngajator(); ListTable objListTable = new ListTable(listTable, angajator.LoadInfoAngajatori(), tableHeader, tableCols); string[] ar_OnClickParam = { "AngajatorID" }; string[] ar_OnClickParamType = { "dataset" }; objListTable.OnclickJSMethod = "SelectAngajator"; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.DrawListTableWithoutDigits(); myCell.Controls.Add(listTable); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza departamentele angajatului /// </summary> private void LoadFormIstoricDepartamente() { try { listTable.Rows.Clear(); lstDepartament.Items.Clear(); settings = Salaries.Configuration.ModuleConfig.GetSettings(); UtilitiesDb utilDb = new UtilitiesDb(settings.ConnectionString); utilDb.CreateDepartamenteSelectBox(0, 0, lstDepartament); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.IstoricDepartament istDept = new Salaries.Business.IstoricDepartament(); istDept.AngajatId = AngajatID; string[] arHeader = { "Departament", "Data start" }; string[] arCols = { "DenumireCompleta", "DataStart" }; ListTable objListTable = new ListTable(listTable, istDept.LoadIstoricDepartament(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici un departament asociat acestui angajat!"; string[] ar_OnClickParam = { "DepartamentID", "DataStart", AngajatID.ToString() }; string[] ar_OnClickParamType = { "dataset", "dataset", "const" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectDepartament"; objListTable.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza sarbatorile legale /// </summary> private void LoadSarbatoriLegale() { try { listTable.Rows.Clear(); Salaries.Business.SarbatoriLegale sarbatori = new Salaries.Business.SarbatoriLegale(); DataSet ds = sarbatori.LoadSarbatoriLegale(); lstFunctie.DataSource = ds; lstFunctie.DataValueField = "Data"; lstFunctie.DataTextField = "Denumirea"; lstFunctie.DataBind(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border","1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); string[] arHeader = {"Data", "Denumirea", "Descrierea"}; string[] arCols = {"Data", "Denumirea", "Descrierea"}; ListTable objListTable = new ListTable(listTable, ds, arHeader, arCols); objListTable.textForEmptyDataSet= "Nu exista sarbatori legale!"; string[] ar_OnClickParam = {"Data", "Denumirea", "Descrierea"}; string[] ar_OnClickParamType = {"dataset", "dataset", "dataset"}; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectFunctie"; objListTable.DrawListTableWithoutDigits(); } catch(Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Afiseaza lista cu checkup-uri /// </summary> private void LoadFormCheckupuri() { try { settings = Salaries.Configuration.ModuleConfig.GetSettings(); UtilitiesDb utilDb = new UtilitiesDb(settings.ConnectionString); listTable.Rows.Clear(); //Modificat:Muntean Raluca Cristina - am adaugat ca parametru si id-ul angajatorului utilDb.CreateAngajatiSelectBoxEx(this.lstResponsabil, this.GetAngajator()); Salaries.Business.Angajat objAngajat = new Salaries.Business.Angajat(); objAngajat.AngajatId = AngajatID; objAngajat.LoadAngajat(); this.lstResponsabil.SelectedValue = "-1"; if (objAngajat.SefId.ToString() != "-1") { if (lstResponsabil.Items.FindByValue(this.SefID.ToString()) != null) { this.lstResponsabil.SelectedValue = this.SefID.ToString(); } } listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.Checkupuri checkupList = new Salaries.Business.Checkupuri(); checkupList.AngajatId = AngajatID; string[] arHeader = { "Necesar Instruire", "Data urmatorului", "Responsabil", "Data efectuarii", "Fisier Checkup", "Tip Fisier" }; string[] arCols = { "NecesarInstruire", "DataUrmatorului", "NumeIntreg", "DataEfectuarii", "CheckupFile", "CheckupID" }; ListTable objListTable = new ListTable(listTable, checkupList.LoadCheckupuriAngajat(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici un checkup asociat acestui angajat!"; string[] ar_OnClickParam = { AngajatID.ToString(), "CheckupID", "NecesarInstruire", "DataEfectuarii", "ResponsabilID", "DataUrmatorului", "CheckupFile" }; string[] ar_OnClickParamType = { "const", "dataset", "dataset", "dataset", "dataset", "dataset", "dataset" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectCheckup"; objListTable.DrawListTableWithoutDigits(); for (int i = 1; i < listTable.Rows.Count - 1; i++) { TableRow r = listTable.Rows[i]; //Daca linia nu este separator (are mai multe celule) if (r.Cells.Count >= 6) { if (r.Cells[3].Text == "") { r.Cells[3].Text = "NU ESTE ANGAJAT AL FIRMEI"; } string name = "Checkup_" + r.Cells[6].Text + "_" + r.Cells[5].Text; string FullPath = GetCheckupPath() + "//" + name; if (Session["Recrutori"].ToString() == "Recrutori") { if (r.Cells[5].Text.Length == 0) { r.Cells[5].Text = " nu exista "; r.Cells[6].Text = "n/a"; } else { r.Cells[6].Text = "<img src='../utils/ShowIcon.aspx?AngajatID=" + this.AngajatID + "&CheckupID=" + r.Cells[6].Text + "&file=" + r.Cells[5].Text + "'>"; } } else { if (r.Cells[5].Text.Length == 0) { r.Cells[5].Text = " nu exista "; r.Cells[6].Text = "n/a"; } else { r.Cells[6].Text = "<img src='utils/ShowIcon.aspx?AngajatID=" + this.AngajatID + "&CheckupID=" + r.Cells[6].Text + "&file=" + r.Cells[5].Text + "'>"; } } } } } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listeaza training-urile unui angajat /// </summary> private void LoadFormIstoricTraining() { try { settings = Salaries.Configuration.ModuleConfig.GetSettings(); UtilitiesDb utilDb = new UtilitiesDb(settings.ConnectionString); utilDb.CreateInternalTrainingSelectBox(this.lstTraining); if (this.lstTraining.Items.Count == 0) { this.tipTraining.Items.RemoveAt(0); } utilDb.CreateExternalTrainingSelectBox(this.lstTraining2); if (this.lstTraining2.Items.Count == 0) { this.tipTraining.Items.RemoveAt(1); } listTable.Rows.Clear(); listTable2.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); listTable2.Attributes.Add("width", "100%"); listTable2.Style.Add("border", "1px solid #20b2aa"); listTable2.Attributes.Add("cellpadding", "0"); listTable2.Attributes.Add("cellspacing", "1"); Salaries.Business.IstoricTraining istTraining = new Salaries.Business.IstoricTraining(); istTraining.AngajatId = AngajatID; string[] arHeader = { "Tip Training", "Descriere", "Diploma", "Data start", "Data end" }; string[] arCols = { "Nume", "Descriere", "Diploma", "DataStart", "DataEnd" }; ListTable objListTable = new ListTable(listTable, istTraining.LoadIstoricTraining(true), arHeader, arCols); ListTable objListTable2 = new ListTable(listTable2, istTraining.LoadIstoricTraining(false), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici un training intern asociat acestui angajat!"; objListTable2.textForEmptyDataSet = "Nu exista nici un training extern asociat acestui angajat!"; string[] ar_OnClickParam = { "IstoricTrainingID", "Intern", "TrainingID", "DataStart", "DataEnd", AngajatID.ToString() }; string[] ar_OnClickParamType = { "dataset", "dataset", "dataset", "dataset", "dataset", "const" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectTraining"; objListTable2.OnclickParams = ar_OnClickParam; objListTable2.OnclickParamsType = ar_OnClickParamType; objListTable2.OnclickJSMethod = "SelectTraining"; objListTable.DrawListTableWithoutDigits(); objListTable2.DrawListTableWithoutDigits(); } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listare tipuri de variabile globale /// </summary> public void ListareTipuriVariabileGlobale() { try { TableRow myRow = new TableRow(); TableCell myCell = new TableCell(); //titlul de la listare myCell.CssClass = "BigBlueBold"; myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Middle; myCell.Text = "Lista tipurilor de variabile globale existente"; myCell.Height = new Unit(50); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); // lista de domenii de activitate existente myRow = new TableRow(); myCell = new TableCell(); myCell.Attributes.Add("width", "100%"); myCell.HorizontalAlign = HorizontalAlign.Center; myCell.VerticalAlign = VerticalAlign.Top; Table listTable = new Table(); string[] tableHeader = { "Cod", "Denumire", "Descriere" }; string[] tableCols = { "Cod", "Denumire", "Descriere" }; VariabileGlobale objVariabileGlobale = new VariabileGlobale(); ListTable objListTable = new ListTable(listTable, objVariabileGlobale.GetAllVariabileGloale(), tableHeader, tableCols); string[] ar_OnClickParam = { "VariabilaGlobalaID" }; string[] ar_OnClickParamType = { "dataset" }; objListTable.OnclickJSMethod = "SelectLine"; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.DrawListTableWithoutDigits(); myCell.Controls.Add(listTable); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); td_editLine.Visible = false; add_form.Style.Add("display", "none"); btnEdit.Style.Add("display", "none"); td_addLine.Visible = true; add_buttonLine.Visible = true; tdTitle.InnerText = "Adaugare tip de variabila globala nou"; // in cazul in care era activat mesajul de avertizare, acesta trebuie dezactivat if (lblMessage.Visible == true) { lblMessage.Visible = false; } } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }
/// <summary> /// Listarea evaluarilor psihologice /// </summary> private void LoadFormEvaluariPsihologice() { try { Salaries.Business.AdminTipuriRapoarte tipuriRapoarte = new Salaries.Business.AdminTipuriRapoarte(); lstTipRaportID.Items.Clear(); lstTipRaportID.DataSource = tipuriRapoarte.LoadInfoTipuriRapoarte(); lstTipRaportID.DataTextField = "Denumire"; lstTipRaportID.DataValueField = "TipRaportID"; lstTipRaportID.DataBind(); listTable.Rows.Clear(); listTable.Attributes.Add("width", "100%"); listTable.Style.Add("border", "1px solid #20b2aa"); listTable.Attributes.Add("cellpadding", "0"); listTable.Attributes.Add("cellspacing", "1"); Salaries.Business.EvaluariPsihologice evaluarePsihologicaList = new Salaries.Business.EvaluariPsihologice(); evaluarePsihologicaList.AngajatId = AngajatID; string[] arHeader = { "Data efectuarii", "Tip Raport", "Fisier Evaluare", "Tip Fisier" }; string[] arCols = { "Data", "DenumireTipRaport", "Raport", "EvalPsihologicaID" }; ListTable objListTable = new ListTable(listTable, evaluarePsihologicaList.LoadEvaluariPsihologiceAngajat(), arHeader, arCols); objListTable.textForEmptyDataSet = "Nu exista nici o evaluare psihologica asociata acestui angajat!"; string[] ar_OnClickParam = { AngajatID.ToString(), "EvalPsihologicaID", "Data", "TipRaportID", "Raport" }; string[] ar_OnClickParamType = { "const", "dataset", "dataset", "dataset", "dataset" }; objListTable.OnclickParams = ar_OnClickParam; objListTable.OnclickParamsType = ar_OnClickParamType; objListTable.OnclickJSMethod = "SelectEvaluarePsihologica"; objListTable.DrawListTableWithoutDigits(); for (int i = 1; i < listTable.Rows.Count - 1; i++) { TableRow r = listTable.Rows[i]; if (r.Cells.Count >= 5) { string name = "EvaluarePsihologica_" + r.Cells[4].Text + "_" + r.Cells[3].Text; string FullPath = GetEvaluarePsihologicaPath() + "//" + name; if (Session["Recrutori"].ToString() == "Recrutori") { if (r.Cells[3].Text.Length == 0) { r.Cells[3].Text = " nu exista "; r.Cells[4].Text = "n/a"; } else { r.Cells[4].Text = "<img src='../utils/ShowIcon.aspx?AngajatID=" + this.AngajatID + "&EvaluarePsihologicaID=" + r.Cells[4].Text + "&file=" + r.Cells[3].Text + "'>"; } } else { if (r.Cells[3].Text.Length == 0) { r.Cells[3].Text = " nu exista "; r.Cells[4].Text = "n/a"; } else { r.Cells[4].Text = "<img src='utils/ShowIcon.aspx?AngajatID=" + this.AngajatID + "&EvaluarePsihologicaID=" + r.Cells[4].Text + "&file=" + r.Cells[3].Text + "'>"; } } } } } catch (Exception ex) { litError.Text = "The following error occurred: <br>"; litError.Text += ex.Message; } }