Пример #1
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            string script_text = "<script>var ctrlID = \"" + this.UniqueID + "\"</script>";

            Response.Write(script_text);
            LoadConturiList();

            Salaries.Business.AdminBanci banci = new Salaries.Business.AdminBanci();
            lstBanca.DataSource     = banci.GetBanci();
            lstBanca.DataValueField = "BancaID";
            lstBanca.DataTextField  = "NumeBanca";
            lstBanca.DataBind();

            btnStergeDate.Attributes.Add("onclick", "return CheckDelete('Doriti sa stergeti acest cont?')");

            string[] textTabs = { "Lista conturi", "Adauga cont nou" };
            Utilities.CreateHeaderWithTabs(tableTabs, textTabs, "", true);
        }
Пример #2
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // Tipurile de completare ale carnetelor de munca.
            Salaries.Business.AdminTipuriCompletareCarnete tipCompletareCarnete = new Salaries.Business.AdminTipuriCompletareCarnete();
            tipCompletareCarnete.AngajatorId = GetAngajator();

            // Lista bancilor.
            Salaries.Business.AdminBanci banci = new Salaries.Business.AdminBanci();

            string[] textTabs = { "Date angajator", "Conturi bancare", "Adresa angajator", "Domenii de activitate", "Punct de lucru" };
            Utilities.CreateHeaderWithTabsForAdminAngajator(tableTabs, textTabs, "../", true);

            settings = Salaries.Configuration.ModuleConfig.GetSettings();

            UtilitiesDb utilDb = new UtilitiesDb(settings.ConnectionString);

            // Sunt facute invizibile textbox-urile
            txtHiddenDomDeActPpID.Style.Add("display", "none");
            txtHiddenDomDeActListID.Style.Add("display", "none");
            txtHiddenPunctLucru.Style.Add("display", "none");

            //Lungu Andreea 28.05.2008
            //este populat dropdownlist-ul ce contine casele de asigurari
            DataSet dsCaseDeAsig = new DataSet();

            Salaries.Business.CasaDeAsigurari casaAsig = new Salaries.Business.CasaDeAsigurari();
            // Lista caselor de asigurari ale unui angajator.
            dsCaseDeAsig = casaAsig.GetAllCasaDeAsigurari();
            drpCaseDeAsigurari.DataSource     = dsCaseDeAsig;
            drpCaseDeAsigurari.DataTextField  = "Denumire";
            drpCaseDeAsigurari.DataValueField = "CasaDeAsigurariID";
            drpCaseDeAsigurari.DataBind();

            //tara
            Salaries.Business.AdminTari tari = new Salaries.Business.AdminTari();
            lstDTara.DataSource     = tari.LoadInfoTariCuJudete();
            lstDTara.DataTextField  = "NumeTara";
            lstDTara.DataValueField = "TaraID";
            lstDTara.DataBind();
            if (txtTaraHidden.Value != "")
            {
                lstDTara.SelectedValue = txtTaraHidden.Value;
            }

            //judetul
            Salaries.Business.AdminJudete judete = new Salaries.Business.AdminJudete();
            judete.TaraId            = int.Parse(lstDTara.SelectedValue);
            lstDJudet.DataSource     = judete.GetAllJudeteTara();
            lstDJudet.DataTextField  = "NumeCompus";
            lstDJudet.DataValueField = "JudetID";
            lstDJudet.DataBind();
            if (txtJudetSectorHidden.Value != "")
            {
                lstDJudet.SelectedValue = txtJudetSectorHidden.Value;
            }

            // Listarea tipurilor de completare a carnetelor de munca.
            lstTipCompletare.DataSource     = tipCompletareCarnete.GetTipuriCompletareCarnete();
            lstTipCompletare.DataTextField  = "ModCompletare";
            lstTipCompletare.DataValueField = "CompletareCarneteValoriID";
            lstTipCompletare.DataBind();

            if (txtTipCompletareHidden.Value != "")
            {
                lstTipCompletare.SelectedValue = txtTipCompletareHidden.Value;
            }

            // Listare banci.
            drpBanci.DataSource     = banci.GetBanci();
            drpBanci.DataTextField  = "NumeBanca";
            drpBanci.DataValueField = "BancaID";
            drpBanci.DataBind();

            // Listare domenii de activitate ale angajatorului
            ListareDomeniiDeActivitate();

            txtTaraHidden.Value          = txtTaraHidden.Value == "" ? lstDTara.SelectedValue : txtTaraHidden.Value;
            txtJudetSectorHidden.Value   = txtJudetSectorHidden.Value == "" ? lstDJudet.SelectedValue : txtJudetSectorHidden.Value;
            txtTipCompletareHidden.Value = txtTipCompletareHidden.Value == "" ? lstTipCompletare.SelectedValue : txtTipCompletareHidden.Value;

            ListareAngajatori();
        }
        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))
             *              {
             *                      Response.Redirect("../Unauthorized.aspx");
             *              }
             *      }
             *      //autentificare cu user si parola
             *      else
             *      {
             *              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))
             *              {
             *                      Response.Redirect("../Unauthorized.aspx");
             *              }
             *      }
             * }*/

            Salaries.Business.AdminSalariiLuni salarii = new Salaries.Business.AdminSalariiLuni();
            DataSet ds = salarii.LoadInfoLuniSalariiUnion();

            ds.Tables[0].Rows.RemoveAt(0);
            lstLuna.DataSource     = ds;
            lstLuna.DataTextField  = "Denumire";
            lstLuna.DataValueField = "LunaTextID";
            lstLuna.DataBind();

            int an = DateTime.Now.Year;

            for (int i = an - 5; i <= an + 5; i++)
            {
                lstAn.Items.Add(new ListItem(i + "", i + ""));
            }

            // Lista bancilor.
            Salaries.Business.AdminBanci banci = new Salaries.Business.AdminBanci();

            string[] textTabs = { "Date angajator", "Conturi angajator", "Adresa angajator", "Domenii de activitate", "Punct de lucru", "Reprezentanti legali" };
            Utilities.CreateHeaderWithTabsForAdminAngajator(tableTabs, textTabs, "../", true);

            settings = Salaries.Configuration.ModuleConfig.GetSettings();

            UtilitiesDb utilDb = new UtilitiesDb(settings.ConnectionString);

            // Sunt facute invizibile textbox-urile
            txtHiddenDomDeActPpID.Style.Add("display", "none");
            txtHiddenDomDeActListID.Style.Add("display", "none");
            txtHiddenPunctLucru.Style.Add("display", "none");

            //tara
            Salaries.Business.AdminTari tari = new Salaries.Business.AdminTari();
            lstDTara.DataSource     = tari.LoadInfoTariCuJudete();
            lstDTara.DataTextField  = "NumeTara";
            lstDTara.DataValueField = "TaraID";
            lstDTara.DataBind();
            if (txtTaraHidden.Value != "")
            {
                lstDTara.SelectedValue = txtTaraHidden.Value;
            }

            //judetul
            Salaries.Business.AdminJudete judete = new Salaries.Business.AdminJudete();
            judete.TaraId            = int.Parse(lstDTara.SelectedValue);
            lstDJudet.DataSource     = judete.GetAllJudeteTara();
            lstDJudet.DataTextField  = "NumeCompus";
            lstDJudet.DataValueField = "JudetID";
            lstDJudet.DataBind();
            if (txtJudetSectorHidden.Value != "")
            {
                lstDJudet.SelectedValue = txtJudetSectorHidden.Value;
            }

            // Listare banci.
            drpBanci.DataSource     = banci.GetBanci();
            drpBanci.DataTextField  = "NumeBanca";
            drpBanci.DataValueField = "BancaID";
            drpBanci.DataBind();

            // Listare domenii de activitate ale angajatorului
            ListareDomeniiDeActivitate();

            txtTaraHidden.Value        = txtTaraHidden.Value == "" ? lstDTara.SelectedValue : txtTaraHidden.Value;
            txtJudetSectorHidden.Value = txtJudetSectorHidden.Value == "" ? lstDJudet.SelectedValue : txtJudetSectorHidden.Value;
            txtHiddenLuna.Value        = txtHiddenLuna.Value == "" ? lstLuna.SelectedValue : txtHiddenLuna.Value;
            txtHiddenAn.Value          = txtHiddenAn.Value == "" ? lstAn.SelectedValue : txtHiddenAn.Value;

            //Lungu Andreea 28.05.2008
            //este populat dropdownlist-ul ce contine casele de asigurari
            DataSet dsCaseDeAsig = new DataSet();

            Salaries.Business.CasaDeAsigurari casaAsig = new Salaries.Business.CasaDeAsigurari();
            // Lista caselor de asigurari ale unui angajator.
            dsCaseDeAsig = casaAsig.GetAllCasaDeAsigurari();
            drpCaseDeAsigurari.DataSource     = dsCaseDeAsig;
            drpCaseDeAsigurari.DataTextField  = "Denumire";
            drpCaseDeAsigurari.DataValueField = "CasaDeAsigurariID";
            drpCaseDeAsigurari.DataBind();

            //Lungu Andreea 19.08.2008
            //este populat dropdownlist-ul ce contine functiile reprzentantilor legali
            DataSet dsFunctiiReprez = new DataSet();

            //Lista functiilor reprezentantilor legali ale unui angajator.
            Salaries.Business.AdminAngajator angajator = new Salaries.Business.AdminAngajator();
            dsFunctiiReprez                 = angajator.GetAllFunctiiReprez();
            drpFunctiiReprez.DataSource     = dsFunctiiReprez;
            drpFunctiiReprez.DataTextField  = "NumeFunctie";
            drpFunctiiReprez.DataValueField = "FunctieReprezID";
            drpFunctiiReprez.DataBind();
            txtHiddenNrFunctii.Value = drpFunctiiReprez.Items.Count.ToString();
        }