Ejemplo n.º 1
0
        /// <summary>
        /// Este efectuat calculul final al salariilor
        /// </summary>
        public void ProcessSalariiFinal()
        {
            //sunt sterse din baza de date salariile calculate inainte de inchiderea lunii
            Salaries.Data.Process     processSalarii = new Data.Process(settings.ConnectionString);
            Salaries.Business.Angajat angajat        = new Salaries.Business.Angajat();
            //sunt preluate toate id-urile angajatilor
            angajat.AngajatorId = angajatorID;
            ArrayList alAng = angajat.GetSal_SituatieLunaraAngajatiIDs(lunaID);
            int       tot = alAng.Count, prev = Parameters.Task_PercentDone, current = 0;

            foreach (int angajatID in alAng)
            {
                //este sters salariul angajatului pe o anumita luna
                current++;
                Parameters.Task_PercentDone = prev + (int)(current * 10 / tot);
                processSalarii.DeleteSalariuLuna(lunaID, angajatID);
            }

            //sunt calculate salariile si sunt introduse datele in baza de date
            ProcessSalariiIntermediar();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Este efectuat calculul salariului unui angajat
 /// </summary>
 /// <param name="angajatID">Id-ul angajatului</param>
 public void ProcessSalariuAngajat(int angajatID)
 {
     Data.Process processSalariu = new Data.Process(settings.ConnectionString);
     processSalariu.ProcessSalariuAngajat(lunaID, angajatID);
 }