/// <summary>
        /// Lista tipurilor de completare carnete
        /// </summary>
        public void ListareTipuriCompletareCarnete()
        {
            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 completare a carnetelor de munca";
                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 = { "Descriere", "Cod", "Procent" };
                string[] tableCols   = { "ModCompletare", "Cod", "Procent" };

                Salaries.Business.AdminTipuriCompletareCarnete objAdminTipuriCompletare = new Salaries.Business.AdminTipuriCompletareCarnete();
                objAdminTipuriCompletare.AngajatorId = GetAngajator();
                ListTable objListTable = new ListTable(listTable, objAdminTipuriCompletare.LoadInfoTipuriCompletare(), tableHeader, tableCols);

                string[] ar_OnClickParam     = { "CompletareCarneteValoriID" };
                string[] ar_OnClickParamType = { "dataset" };

                objListTable.OnclickJSMethod   = "SelectLine";
                objListTable.OnclickParams     = ar_OnClickParam;
                objListTable.OnclickParamsType = ar_OnClickParamType;
                objListTable.DrawListTableWithDigits(4);

                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 completare carnete de munca";
            }
            catch (Exception ex)
            {
                litError.Text  = "The following error occurred: <br>";
                litError.Text += ex.Message;
            }
        }
Exemplo n.º 2
0
        public void ListareInvaliditati()
        {
            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 invaliditatilor existente";
                myCell.Height          = new Unit(50);
                myRow.Cells.Add(myCell);
                mainTable.Rows.Add(myRow);

                // lista de invaliditati 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", "Coeficient", "Descriere" };
                string[] tableCols   = { "Nume", "Coeficient", "Descriere" };

                Salaries.Business.AdminInvaliditati objAdminInvaliditati = new Salaries.Business.AdminInvaliditati();
                ListTable objListTable = new ListTable(listTable, objAdminInvaliditati.LoadInfoInvaliditati(), tableHeader, tableCols);

                string[] ar_OnClickParam     = { "InvaliditateID" };
                string[] ar_OnClickParamType = { "dataset" };

                objListTable.OnclickJSMethod   = "SelectLine";
                objListTable.OnclickParams     = ar_OnClickParam;
                objListTable.OnclickParamsType = ar_OnClickParamType;
                objListTable.DrawListTableWithDigits();

                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 invaliditate";
            }
            catch (Exception ex)
            {
                litError.Text  = "The following error occurred: <br>";
                litError.Text += ex.Message;
            }
        }
        /// <summary>
        ///		Cu ajutorul metodei ListTipAbsente se genereaza tabelul ce va fi afisat.
        ///		Acest tabel contine toate tipurile de absente existente in baza de date.
        /// </summary>
        private void ListTipAbsente()
        {
            try
            {
                list_form.Style.Add("display", "");
                add_form.Style.Add("display", "none");
                btnSalveaza.Visible  = false;
                btnInapoi.Visible    = false;
                txtTipAbsentaID.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 absente";
                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", "Cod", "Procent", "Descriere", "Absenta medicala", "Modificabila ulterior", "Folosire curenta", "Absenta lucratoare" };
                string[]  tableCols    = { "Denumire", "CodAbsenta", "Procent", "Descriere", "Medical", "Modificare", "Folosire", "Lucratoare" };
                ListTable objListTable = new ListTable(listTable, new Salaries.Business.NomenclatorTipAbsente().GetTipuriAbsente(), tableHeader, tableCols);

                objListTable.textForEmptyDataSet = "Nu exista date in nomenclatorul de tipuri de absente!";

                string[] ar_OnClickParam     = { "TipAbsentaID" };
                string[] ar_OnClickParamType = { "dataset" };

                objListTable.OnclickJSMethod   = "SelectTipAbsenta";
                objListTable.OnclickParams     = ar_OnClickParam;
                objListTable.OnclickParamsType = ar_OnClickParamType;
                objListTable.DrawListTableWithDigits();

                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;
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Este obtinuta lista lunilor(denumire, procent inflatie,..) pentru anul selectat in dropdownlist
        /// </summary>
        private void LoadInflatieList()
        {
            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");


                string[] arHeader = { "Denumire", "ProcentInflatie" };
                string[] arCols   = { "Denumire", "ProcentInflatie" };

                lunaId = this.GetCurrentMonth();                //id-ul lunii curente

                Salaries.Business.Luni luni = new Salaries.Business.Luni(this.AngajatorID, lunaId);

                //anul selectat de utilizator
                int an = int.Parse(drpAni.SelectedItem.Text);

                //returneaza lunile din anul dat ca parametru pentru care sunt calculate salariile
                //in baza de date
                //DataSet ds=luni.GetLuniSal_Salarii(an);
                DataSet ds = luni.GetLuniSal_Luni(an, this.AngajatorID);

                ListTable objListTable = new ListTable(listTable, ds, arHeader, arCols);
                objListTable.textForEmptyDataSet = "Nu exista date!";

                string[] ar_OnClickParam = { "Denumire", "ProcentInflatie" };

                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.DrawListTableWithDigits(4);
            }
            catch (Exception ex)
            {
                litError.Text  = "The following error occurred: <br>";
                litError.Text += ex.Message;
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Listarea valorilor pentru variabilele globale
        /// </summary>
        private void LoadVariabileGlobaleList()
        {
            try
            {
                list_form.Style.Add("display", "");
                add_form.Style.Add("display", "none");
                btnSalveaza.Visible        = false;
                btnInapoi.Visible          = false;
                txtVariabilaGlobalaID.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            = "Lista variabile salarizare";
                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[] arHeader = { "Tip constanta", "Valoare" };
                string[] arCols   = { "Denumire", "Valoare" };

                //id-ul lunii curente
                lunaId = this.GetCurrentMonth();

                Salaries.Business.Luni luni = new Salaries.Business.Luni(this.AngajatorID, lunaId);

                //anul selectat de utilizator
                int luna = int.Parse(drpPerioada.SelectedItem.Value);

                //returneaza lunile din anul dat ca parametru pentru care sunt calculate salariile
                Salaries.Business.VariabileGlobaleValori objVariabilaGlobala = new Salaries.Business.VariabileGlobaleValori();
                DataSet ds = objVariabilaGlobala.GetAllVariabileGlobaleValoriPeLuna(luna);

                ListTable objListTable = new ListTable(listTable, ds, arHeader, arCols);
                objListTable.textForEmptyDataSet = "Nu exista date!";

                string[] ar_OnClickParam     = { "ID" };
                string[] ar_OnClickParamType = { "dataset" };

                objListTable.OnclickJSMethod   = "SelectVariabilaGlobala";
                objListTable.OnclickParams     = ar_OnClickParam;
                objListTable.OnclickParamsType = ar_OnClickParamType;
                objListTable.DrawListTableWithDigits();

                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;
            }
        }