Ejemplo n.º 1
0
        private String Insert(string numePrenume, int idAngajat, DateTime dataInceput, DateTime dataSfarsit, int idTipAbsenta, string observatii)
        {
            string msg = "";
            //tip interval???
            IntervaleAbsenteAngajat interval = new IntervaleAbsenteAngajat(idAngajat);

            Salaries.Business.Angajat ang = new Salaries.Business.Angajat();
            ang.AngajatId = idAngajat;
            //oare trebuie sa fac load angajat????
            double medieZilnicaConcediuOdihna          = ang.GetMedieZilnicaConcediuDeOdihna(lunaID);
            double medieZilnicaConcediuBoala           = ang.GetMedieZilnicaConcediuDeBoala(lunaID);
            double medieZilnicaContinuareConcediuBoala = ang.GetMedieZilnicaContinuareConcediuDeBoala(lunaID);

            // ca la insert interval absenta
            //SiemensTM.Module.Intervale intervUC = new SiemensTM.Module.Intervale();
            //intervUC.AngajatID = idAngajat;
            //bool continuareAbsenta = intervUC.VerificaContinuareAbsenta( idTipAbsenta, dataInceput );
            //int boalaID = -1;
            //if( FolosesteBoli( idTipAbsenta ))
            //{
            //	boalaID = int.Parse( ((System.Web.UI.HtmlControls.HtmlInputHidden)Page.FindControl( "TipBoalaAbsente1" )).Value );
            //}
            //IntervaleAbsenteAngajat intervAbs = new IntervaleAbsenteAngajat( idAngajat );
            //if( continuareAbsenta || ( !intervUC.VerificaTipContinuareAbsenta( idTipAbsenta, intervAbs )))
            //{
            //	bool tipContinuareAbsenta = intervUC.VerificaTipContinuareAbsenta( idTipAbsenta,new IntervaleAbsenteAngajat( idAngajat ));
            //	if( tipContinuareAbsenta)
            //		new IntervaleAngajat( idAngajat ).DeleteTemporarIntervaleAngajatPerioada( dataInceput, dataSfarsit, false);
            new IntervaleAbsenteAngajat(idAngajat).InsertIntervalAbsenteAngajat(idTipAbsenta, dataInceput, dataSfarsit, observatii, -1, false, 0, "", "", false, "", "", DateTime.Today, "", "", "", "");
            //}
            //else
            //{
            //	msg += "Pentru angajatul  " + numePrenume + " continuarea absentei medicale nu se poate lega de concediul medical!" + Environment.NewLine ;
            //}
            return(msg);
        }