/// <summary> /// Procedura genereaza situatia lunara unui angajat care a fost lichidat /// </summary> public void GenerareSituatieLunaraAngajatLichidat() { Salaries.Business.Angajat angajat = new Salaries.Business.Angajat(); angajat.AngajatId = AngajatID; angajat.LoadAngajat(); //este obtinuta prima zi a lunii active Salaries.Business.Luni luna = new Salaries.Business.Luni(angajat.AngajatorId, settings); Salaries.Data.LunaData lunaActiva = luna.GetLunaActiva(); Salaries.Business.PontajAngajat pontajAngajat = new Salaries.Business.PontajAngajat(this.AngajatID, settings); DataSet dsIntervaleAngajat = pontajAngajat.GetIntervaleAngajat(lunaActiva.LunaId); //daca nu au fost initializate orele unui angajat, se face aceasta initializare if (dsIntervaleAngajat.Tables[0].Rows.Count == 0) { //intervale angajat IntervaleAngajat intervAng = new IntervaleAngajat(AngajatID, settings); //sunt intializate orele lucrate de catre angajat intervAng.InitializeOreLucrateLunaAngajat(lunaActiva.Data, angajat.DataDeLa, angajat.DataLichidare); } //situatia lunara a unui angajat Salaries.Business.SituatieLunaraAngajat situatieLunaraAng = new Salaries.Business.SituatieLunaraAngajat(AngajatID, settings); //se genereaza situatia lunara a angajatului situatieLunaraAng.GenerareSituatieLunaraAngajatLichidat(lunaActiva.LunaId, angajat.AngajatorId); }
/// <summary> /// Se calculeaza media zilnica a concediului de odihna a angajatului, in cazul in care sunt /// suficiente date in baza de date si este scrisa valoarea pe Javascript. /// </summary> /// <remarks> /// Autor: Cristina Muntean /// Data: 14.03.2006 /// </remarks> private void CalculMedieZilnicaConcediuOdihna() { Salaries.Business.Angajat angajat = new Salaries.Business.Angajat(); angajat.AngajatId = GetAngajat(); // ID-ul lunii curente int lunaID = this.GetCurrentMonth(); // Media zilnica aferenta concediului de odihna al angajatului. double medieZilnicaConcediuOdihna = 0; // Media zilnica aferenta concediului de boala al angajatului. //double medieZilnicaConcediuBoala = 0; //double medieZilnicaContinuareConcediuBoala = 0; //Modificat: Lungu Andreea //Data: 12.09.2008 //Descriere: Se calculeaza ci media zilnica a continuarii concediului medical pentru ca // aceasta nu coincide cu media zilnica a concediului medical calculata pentru luna corespunzatoare. medieZilnicaConcediuOdihna = angajat.GetMedieZilnicaConcediuDeOdihna(lunaID); //double medieZilnicaConcediuBoala = angajat.GetMedieZilnicaConcediuDeBoala(lunaID); //double medieZilnicaContinuareConcediuBoala = angajat.GetMedieZilnicaContinuareConcediuDeBoala(lunaID); // Este scrisa variabila pe javascript Response.Write("<script> var medieZilnicaCO = '" + medieZilnicaConcediuOdihna + "'; </script>"); //Response.Write("<script> var medieZilnicaCB = '" + medieZilnicaConcediuBoala + "'; </script>"); //Response.Write("<script> var medieZilnicaCCB = '" + medieZilnicaContinuareConcediuBoala + "'; </script>"); }
/// <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> /// Procedura reinitializeaza o luna /// </summary> /// <param name="dataSarbatoare"></param> /// <param name="sarbatoare"></param> private void ReinitializeazaLuna( DateTime dataSarbatoare, bool sarbatoare) { ErrHandler.MyErrHandler.WriteError("Admin_NomenclatorSarbatoriLegale.ascx - start - ReinitializeazaLuna() - " + dataSarbatoare.ToShortDateString() + " - " + sarbatoare.ToString()); //seteaza in tm_zile data ca fiind sarbatoare SetDataTipSarbatoare(dataSarbatoare, sarbatoare); //reinitializare ore (normale si suplimentare) din luna activa pt toti angajatii activi Salaries.Business.Angajat angajat = new Salaries.Business.Angajat(); angajat.CategorieId = -1; angajat.AngajatorId = GetAngajator(); //Modificat:Muntean Raluca Cristina - am adaugat ca parametru si id-ul angajatorului DataSet ds = angajat.GetAllAngajati();//toti angajatii activi foreach( DataRow dr in ds.Tables[ 0 ].Rows ) { ReinitializeOreLunaActivaAngajat( long.Parse( dr[ "AngajatID" ].ToString())); } ErrHandler.MyErrHandler.WriteError("Admin_NomenclatorSarbatoriLegale.ascx - end - ReinitializeazaLuna() - " + dataSarbatoare.ToShortDateString() + " - " + sarbatoare.ToString()); }
/// <summary> /// 0 - nu a depasit nr de zile anuale; /// 10 - a depasit nr de zile anuale /// </summary> /// <param name="DataStart">Data de inceput a intervalului</param> /// <param name="DataEnd">Data de sfarsit a intervalului</param> /// <param name="IntervalID">Id-ul intervalului</param> /// <returns>Returneaza rezultatul verificarii</returns> public int VerificareDepasireZileCOAn(DateTime dataStart, DateTime dataEnd, int intervalID) { Salaries.Business.Angajat ang = new Salaries.Business.Angajat(); ang.AngajatId = AngajatID; ang.LoadAngajat(); PontajAngajat pontajAngajat = new PontajAngajat(this.AngajatID); DateTime primaZiAn = new DateTime(dataStart.Year, 1, 1); DateTime ultimaZiAn = new DateTime(dataStart.Year, 12, 31); int nrZileDisponibile = pontajAngajat.GetAngajatNrZileCODisponibileAn(primaZiAn, ultimaZiAn, ang.AngajatorId); int nrZileLuateAn = pontajAngajat.GetAngajatNrZileCOLuateAn(primaZiAn, ultimaZiAn, intervalID); int nrZileConcediuNou = pontajAngajat.GetNrZileLucratoareInterval(dataStart, dataEnd); //Modificat: Oprescu Claudia //Descriere: S-a adaugat si numarul de zile de concediu suplimentar int retVal = nrZileDisponibile + ang.NrZileCOSupl < (nrZileLuateAn + nrZileConcediuNou) ? 10 : 0; return(retVal); }
/// <summary> /// Genereaza situatia lunara /// </summary> private void GenerareaSituatieiLunare() { SiemensTM.Classes.SituatieAngajat situatieLunaraAng; switch (actionGenerareSituatieLunara) { case "generareSituatieLunaraAngajat": //Modified: Cristina Raluca Muntean //se genereaza situatia lunara a unui angajat //se apeleaza aceasta metoda pentru ca in cazul in care nu a fost initializata luna, sa se faca si aceasta operatie situatieLunaraAng = new SiemensTM.Classes.SituatieAngajat(this.GetAngajat()); situatieLunaraAng.GenerareSituatieLunaraAngajat(); //Oprescu Claudia //se face redirectare la pagina cu situatia unui angajat Response.Redirect("Salarii.aspx?Tab=Pontaj&Option=situatie_lunara"); break; case "generareSituatieLunaraTotiAngajatii": //Modificat:Muntean Raluca Cristina - am adaugat ca parametru si id-ul angajatorului Salaries.Business.Angajat angajat = new Salaries.Business.Angajat(); angajat.AngajatorId = GetAngajator(); angajat.CategorieId = -1; DataSet ds = angajat.GetAllAngajati(); foreach (DataRow dr in ds.Tables[0].Rows) { //Modified: Cristina Raluca Muntean //se genereaza situatia lunara a unui angajat //se apeleaza aceasta metoda pentru ca in cazul in care nu a fost initializata luna, sa se faca si aceasta operatie situatieLunaraAng = new SiemensTM.Classes.SituatieAngajat(long.Parse(dr["AngajatID"].ToString())); situatieLunaraAng.GenerareSituatieLunaraAngajat(); } break; default: break; } ((System.Web.UI.HtmlControls.HtmlInputHidden)Page.FindControl("ActionGenerareSituatieLunaraValue")).Value = ""; }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); GenerareaSituatieiLunare(); string Option = this.Page.Request.Params["Option"]; if (Option == null) { Option = "situatie_lunara"; } switch (Option) { case "situatie_lunara": EnableAngajatCurent(true); //Se actualizeaza variabila care specifica modificarea situatiei lunare a unui angajat Session["ModificaSituatie"] = ""; SituatieLunaraAngajati mySituatie = (SituatieLunaraAngajati)LoadControl("SituatieLunaraAngajati.ascx"); this.Center.Controls.Add(mySituatie); break; case "initializare_luna": //luna activa a angajatorului Salaries.Business.Luni luni = new Salaries.Business.Luni(this.GetAngajator()); Salaries.Data.LunaData lunaData = luni.GetLunaActiva(); //daca luna selectata de utilizator este luna activa atunci link-ul este activ, altfel acesta devine inactiv if (this.GetCurrentMonth() == lunaData.LunaId) { EnableAngajatCurent(false); InitializareLuna myInit = (InitializareLuna)LoadControl("InitializareLuna.ascx"); this.Center.Controls.Add(myInit); } else { Response.Write("<script>alert(\"Luna selectata este inactiva! \\nInitializarea se poate face doar in luna activa! \");</script>"); EnableAngajatCurent(true); SituatieLunaraAngajati mySituatie1 = (SituatieLunaraAngajati)LoadControl("SituatieLunaraAngajati.ascx"); this.Center.Controls.Add(mySituatie1); } break; case "pontaj_individual": EnableAngajatCurent(true); PontajModule myPontaj = (PontajModule)LoadControl("Pontaj/PontajModule.ascx"); myPontaj.AngajatorID = this.GetAngajator(); myPontaj.CurrentMonthID = this.GetCurrentMonth(); this.Center.Controls.Add(myPontaj); break; case "lichidare_angajat": try { //luna activa a angajatorului Salaries.Business.Luni luna = new Salaries.Business.Luni(this.GetAngajator()); Salaries.Data.LunaData lunaActiva = luna.GetLunaActiva(); //daca luna selectata de utilizator este luna activa atunci link-ul este activ, altfel acesta devine inactiv if (this.GetCurrentMonth() == lunaActiva.LunaId) { Salaries.Business.Angajat objAngajat = new Salaries.Business.Angajat(); objAngajat.AngajatId = GetAngajat(); objAngajat.LoadAngajat(); EnableAngajatCurent(true); LichidareAngajat lichidare = (LichidareAngajat)LoadControl("LichidareAngajat.ascx"); lichidare.objAngajat = objAngajat; this.Center.Controls.Add(lichidare); } else { Response.Write("<script>alert(\"Luna selectata este inactiva! \\nUn angajat poate fi lichidat numai in luna activa! \");</script>"); EnableAngajatCurent(true); SituatieLunaraAngajati mySituatie1 = (SituatieLunaraAngajati)LoadControl("SituatieLunaraAngajati.ascx"); this.Center.Controls.Add(mySituatie1); } } catch (Exception ex) { Response.Write("Error loading employee data: <br>"); Response.Write(ex.Message); Response.End(); } break; case "retineri_recurente_angajat": EnableAngajatCurent(true); RetineriAngajat myRetineri = (RetineriAngajat)LoadControl("RetineriAngajat.ascx"); myRetineri.AngajatID = GetAngajat(); this.Center.Controls.Add(myRetineri); break; case "import": EnableAngajatCurent(false); ImportPontaj myImport = (ImportPontaj)LoadControl("ImportPontaj.ascx"); this.Center.Controls.Add(myImport); break; case "import_delegatii": EnableAngajatCurent(false); ImportDelegatii importDel = (ImportDelegatii)LoadControl("ImportDelegatii.ascx"); this.Center.Controls.Add(importDel); break; case "trimitere_fluturasi": EnableAngajatCurent(false); TrimitereFluturasi trimFlut = (TrimitereFluturasi)LoadControl("TrimitereFluturasi.ascx"); this.Center.Controls.Add(trimFlut); break; case "sincronizare_date_angajati": EnableAngajatCurent(false); SincronizareDateAngajati sinc = (SincronizareDateAngajati)LoadControl("SincronizareDateAngajati.ascx"); //ImportSalarii myImport = (ImportSalarii) LoadControl("ImportSalarii.ascx"); this.Center.Controls.Add(sinc); break; } //poate strica //Modificat: Oprescu Claudia //Descriere: Se seteaza un angajat numai daca exista in control date if (this.angajatDDL.Items.Count > 0) { this.SetAngajat(long.Parse(angajatDDL.SelectedValue)); // Se calculeaza valoarea mediei zilnice si se scrie valoarea pe Javascript. CalculMedieZilnicaConcediuOdihna(); } }
private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { //se obtine tipul de autentificare la aplicatie string authentication = Salaries.Configuration.CryptographyClass.getSettingsWithoutDecode("authentication"); //virtual path string path = Page.Request.FilePath; char separator = '/'; string [] pathArr = path.Split(separator); int nr = pathArr.Length; //autentificare de tip windows if (authentication == "1") { //user-ul loginat user = new WindowsPrincipal(WindowsIdentity.GetCurrent()); //user-ul loginat nu are dreptul sa acceseze aceasta pagina este redirectat catre o pagina care sa il instiinteze de acest lucru if (!Salaries.Business.Authentication.HasUserRightsOnPage(pathArr[nr - 1], user)) { ErrHandler.MyErrHandler.WriteError("EditAngajat_Recrutori.aspx - autentificare windows fara drepturi - " + user.Identity.Name); Server.Transfer("../Unauthorized.aspx"); } } //autenticiare cu user si parola else { try { string nume = Session["Nume"].ToString(); string parola = Session["Parola"].ToString(); int angajatorId = int.Parse(Session["AngajatorId"].ToString()); //user-ul loginat nu are dreptul sa acceseze aceasta pagina este redirectat catre o pagina care sa il instiinteze de acest lucru if (!Salaries.Business.Authentication.HasUserRightsOnPage(pathArr[nr - 1], nume, parola, angajatorId)) { ErrHandler.MyErrHandler.WriteError("EditAngajat_Recrutori.aspx - autentificare user name fara drepturi - " + nume + ", " + angajatorId); Server.Transfer("../Unauthorized.aspx"); } } catch (Exception exc) { Response.Redirect("../index.aspx"); } } } idAngajat = Convert.ToInt32(Request.QueryString["id"]); string myCmd = Request.QueryString["cmd"]; mainTable.Attributes.Add("width", "100%"); mainTable.Attributes.Add("height", "100%"); mainTable.Attributes.Add("border", "0"); mainTable.Attributes.Add("cellpadding", "0"); mainTable.Attributes.Add("cellspacing", "0"); TableRow myRow; TableRow mySecondRow; TableCell myCell; // al doilea table.. care va contine 2 linii - taskuri si control centru Table secondTable = new Table(); secondTable.Attributes.Add("width", "100%"); secondTable.Attributes.Add("height", "100%"); secondTable.Attributes.Add("border", "0"); secondTable.Attributes.Add("cellpadding", "0"); secondTable.Attributes.Add("cellspacing", "0"); try { objAngajat = new Salaries.Business.Angajat(); objAngajat.AngajatId = idAngajat; objAngajat.LoadAngajat(); } catch (Exception ex) { Response.Write("Error loading employee data: <br>"); Response.Write(ex.Message); Response.End(); } // se adauga partea stanga myRow = new TableRow(); myCell = new TableCell(); myCell = new TableCell(); myCell.RowSpan = 3; myCell.Width = new Unit(310, UnitType.Pixel); myEditAngajatLeft = (EditAngajatLeft)LoadControl("../EditAngajatLeft.ascx"); myEditAngajatLeft.XmlSursa = "../Navigare/EditAngajat_LeftNavigation_Recrutori.xml"; myEditAngajatLeft.AngajatID = idAngajat; myEditAngajatLeft.objAngajat = objAngajat; myCell.Attributes.Add("valign", "top"); myCell.Controls.Add(myEditAngajatLeft); myRow.Cells.Add(myCell); // se adauga partea dreapta mySecondRow = new TableRow(); myCell = new TableCell(); EditAngajatUp myEditAngajatUp = (EditAngajatUp)LoadControl("../EditAngajatUp.ascx"); myCell.Attributes.Add("valign", "top"); myCell.Attributes.Add("height", "10"); myEditAngajatUp.AngajatID = idAngajat; myCell.Controls.Add(myEditAngajatUp); mySecondRow.Cells.Add(myCell); secondTable.Rows.Add(mySecondRow); // se adauga a doua linie din tabel.. ce contine controlul mySecondRow = new TableRow(); myCell = new TableCell(); myCell.Attributes.Add("valign", "top"); myCell.Attributes.Add("height", "100%"); myCell.Attributes.Add("align", "center"); Session["Recrutori"] = "Recrutori"; switch (myCmd) { case "date_personale": case null: EditAngajatDatePersonale myEditControl = (EditAngajatDatePersonale)LoadControl("../EditTasks/EditAngajatDatePersonale.ascx"); myEditControl.objAngajat = objAngajat; myCell.Controls.Add(myEditControl); break; // // Artiom Modificat //case "date_angajare": // // var control = LoadControl("EditTasks/EditAngajatDateAngajare.ascx"); // // EditAngajatDateAngajare myEditDateAngajatControl = (EditAngajatDateAngajare) control; // EditAngajatDateAngajare myEditDateAngajatControl = (EditAngajatDateAngajare)LoadControl("../EditTasks/EditAngajatDateAngajare.ascx"); // myEditDateAngajatControl.objAngajat = objAngajat; // myCell.Controls.Add(myEditDateAngajatControl); // break; case "istoric_carte_identitate": EditTasks.IstoricCartiIdentitate myIstoricCartiIdentitate = (EditTasks.IstoricCartiIdentitate)LoadControl("../EditTasks/IstoricCartiIdentitate.ascx"); myIstoricCartiIdentitate.AngajatID = objAngajat.AngajatId; myCell.Controls.Add(myIstoricCartiIdentitate); break; case "istoric_departamente": IstoricDepartamente myIstoricDepartamenteControl = (IstoricDepartamente)LoadControl("../EditTasks/IstoricDepartamente.ascx"); myIstoricDepartamenteControl.AngajatID = objAngajat.AngajatId; myCell.Controls.Add(myIstoricDepartamenteControl); break; case "fisa_postului": fisa_postului myfisapostului = (fisa_postului)LoadControl("../Comunicari/fisa_postului.ascx"); myfisapostului.objAngajat = objAngajat; myCell.Controls.Add(myfisapostului); break; case "change_poza": ChangePoza myChangePoza = (ChangePoza)LoadControl("../EditTasks/ChangePoza.ascx"); myChangePoza.AngajatID = objAngajat.AngajatId; myCell.Controls.Add(myChangePoza); break; case "istoric_functii": IstoricFunctii myIstoricFunctii = (IstoricFunctii)LoadControl("../EditTasks/IstoricFunctii.ascx"); myIstoricFunctii.AngajatID = objAngajat.AngajatId; myCell.Controls.Add(myIstoricFunctii); break; case "istoric_training": IstoricTraininguri myIstoricTraininguri = (IstoricTraininguri)LoadControl("../EditTasks/IstoricTraininguri.ascx"); myIstoricTraininguri.AngajatID = objAngajat.AngajatId; myCell.Controls.Add(myIstoricTraininguri); break; case "checkupuri": CheckupuriAngajat myCheckup = (CheckupuriAngajat)LoadControl("../EditTasks/CheckupuriAngajat.ascx"); myCheckup.AngajatID = objAngajat.AngajatId; myCheckup.SefID = objAngajat.SefId; myCell.Controls.Add(myCheckup); break; case "evaluari_psihologice": EvaluariPsihologiceAngajat myEval = (EvaluariPsihologiceAngajat)LoadControl("../EditTasks/EvaluariPsihologiceAngajat.ascx"); myEval.AngajatID = objAngajat.AngajatId; myCell.Controls.Add(myEval); break; case "istoric_referinte": ReferinteAngajat myReferinte = (ReferinteAngajat)LoadControl("../EditTasks/ReferinteAngajat.ascx"); myReferinte.AngajatID = objAngajat.AngajatId; myCell.Controls.Add(myReferinte); break; default: myCell.Text = "<img src=\"images/1x1.gif\" width=\"100%\" height=\"100%\">"; break; } mySecondRow.Cells.Add(myCell); secondTable.Rows.Add(mySecondRow); // se adauga al doilea tabel la primul myCell = new TableCell(); myCell.Controls.Add(secondTable); myCell.Attributes.Add("height", "100%"); myCell.Attributes.Add("width", "100%"); myRow.Cells.Add(myCell); mainTable.Rows.Add(myRow); }
/// <summary> /// Functie necesara pentru verificarea existentei datelor necesate functionarii pontajului. /// Daca aceste date nu sunt disponibile, atunci link-ul 'Pontaj' nu este accesibil /// </summary> /// <returns>Returneaza true daca datele sunt disponibile si false altfel</returns> public bool IsPontajAvailable() { DataSet ds; //Verificam daca exista intrari in nomenclator boli NomenclatorBoli nb = new NomenclatorBoli(); ds = nb.GetBoli(); if (ds.Tables[0].Rows.Count == 0) { return(false); } else { ds.Clear(); } //Verificam daca exista intrari in nomenclator tipurie ore lucrate NomenclatorTipOreLucrate ntol = new NomenclatorTipOreLucrate(); ds = ntol.GetTipuriOreLucrate(); if (ds.Tables[0].Rows.Count == 0) { return(false); } else { ds.Clear(); } //Verificam daca exista intrari in nomenclator tipuri absente NomenclatorTipAbsente nta = new NomenclatorTipAbsente(); ds = nta.GetTipuriAbsente(); if (ds.Tables[0].Rows.Count == 0) { return(false); } else { ds.Clear(); } //Verificam daca angajatorul curent are luna activa int idAngajator = int.Parse(Session["AngajatorID"].ToString()); Salaries.Business.Luni objLuni = new Salaries.Business.Luni(idAngajator); DataSet myDs = objLuni.GetLunaActivaDataSet(); string idLunaActiva; int lunaID = 0; if (myDs.Tables[0].Rows.Count == 0) { return(false); } else { idLunaActiva = myDs.Tables[0].Rows[0][0].ToString(); lunaID = int.Parse(myDs.Tables[0].Rows[0]["LunaID"].ToString()); myDs.Clear(); } //Verificam daca exista zile pt luna activa in table tm_zile objLuni.id = lunaID; myDs = objLuni.ExistaZilePentruLunaActiva(); if (myDs.Tables[0].Rows.Count == 0) { return(false); } else { myDs.Clear(); } //Verficicam daca exista angajati pt angajatorul curent //Pentru ca exista un singur angajator nu mai este necesar parametrul pentru idAngajator //Este suficient sa se selecteze toti angajatii pentru a verifica daca exista angajati la angajatorul curent Salaries.Business.Angajat angajat = new Salaries.Business.Angajat(); myDs = angajat.GetAngajatIDAll(); if (myDs.Tables[0].Rows.Count == 0) { return(false); } return(true); }