/// <summary>
        /// Daca pagina de administrare a fost deschisa din alta pagina cream functia care va face refresh la combo-ul cu tipuri rapoarte
        /// </summary>
        private void CreateRefreshFunction()
        {
            string outStr = "";

            //cream scriptul care va contine functia de refresh
            //ne bazam pe faptul ca se cunoaste numele selectului care contine tipurile de rapoarte
            //initial se sterg toate intrarile din combo
            outStr += "<script> \r\n function RefreshParentPage() \r\n" +
                      "{ \r\n" +
                      "window.opener.DeleteTipuriRapoarteCombo(); \r\n" +
                      " FillTipuriRapoarteCOmbo(); \r\n" +
                      "} \r\n";

            outStr += " function FillTipuriRapoarteCOmbo() \r\n" +
                      "{ \r\n";
            //acum se creeaza functie care adauga categoriile din recordset
            //se foloseste o functie din parent page... FillTipRaportCombo
            Salaries.Business.AdminTipuriRapoarte objAdminTipuriRapoarte = new Salaries.Business.AdminTipuriRapoarte();

            foreach (DataRow dataRow in objAdminTipuriRapoarte.LoadInfoTipuriRapoarte().Tables[0].Rows)
            {
                outStr += "window.opener.FillTipRaportCombo('" +
                          dataRow["Denumire"].ToString() + "'," +
                          dataRow["TipRaportID"].ToString() + ");";
            }


            outStr += "} \r\n" +
                      "</script>";

            Response.Write(outStr);
        }
        /// <summary>
        /// Listarea tipurilor de rapoarte
        /// </summary>
        public void ListareTipuriRapoarte()
        {
            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 rapoarte existente";
                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 = { "Denumire", "Descriere" };
                string[] tableCols   = { "Denumire", "Descriere" };

                Salaries.Business.AdminTipuriRapoarte objAdminTipuriRapoarte = new Salaries.Business.AdminTipuriRapoarte();
                ListTable objListTable = new ListTable(listTable, objAdminTipuriRapoarte.LoadInfoTipuriRapoarte(), tableHeader, tableCols);

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

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

                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 raport";
            }
            catch (Exception ex)
            {
                litError.Text  = "The following error occurred: <br>";
                litError.Text += ex.Message;
            }
        }
Пример #3
0
        /// <summary>
        /// Listarea evaluarilor psihologice
        /// </summary>
        private void LoadFormEvaluariPsihologice()
        {
            try
            {
                Salaries.Business.AdminTipuriRapoarte tipuriRapoarte = new Salaries.Business.AdminTipuriRapoarte();

                lstTipRaportID.Items.Clear();
                lstTipRaportID.DataSource     = tipuriRapoarte.LoadInfoTipuriRapoarte();
                lstTipRaportID.DataTextField  = "Denumire";
                lstTipRaportID.DataValueField = "TipRaportID";
                lstTipRaportID.DataBind();

                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");

                Salaries.Business.EvaluariPsihologice evaluarePsihologicaList = new Salaries.Business.EvaluariPsihologice();
                evaluarePsihologicaList.AngajatId = AngajatID;

                string[] arHeader = { "Data efectuarii", "Tip Raport", "Fisier Evaluare", "Tip Fisier" };
                string[] arCols   = { "Data", "DenumireTipRaport", "Raport", "EvalPsihologicaID" };

                ListTable objListTable = new ListTable(listTable, evaluarePsihologicaList.LoadEvaluariPsihologiceAngajat(), arHeader, arCols);

                objListTable.textForEmptyDataSet = "Nu exista nici o evaluare psihologica asociata acestui angajat!";

                string[] ar_OnClickParam     = { AngajatID.ToString(), "EvalPsihologicaID", "Data", "TipRaportID", "Raport" };
                string[] ar_OnClickParamType = { "const", "dataset", "dataset", "dataset", "dataset" };

                objListTable.OnclickParams     = ar_OnClickParam;
                objListTable.OnclickParamsType = ar_OnClickParamType;
                objListTable.OnclickJSMethod   = "SelectEvaluarePsihologica";

                objListTable.DrawListTableWithoutDigits();

                for (int i = 1; i < listTable.Rows.Count - 1; i++)
                {
                    TableRow r = listTable.Rows[i];
                    if (r.Cells.Count >= 5)
                    {
                        string name     = "EvaluarePsihologica_" + r.Cells[4].Text + "_" + r.Cells[3].Text;
                        string FullPath = GetEvaluarePsihologicaPath() + "//" + name;

                        if (Session["Recrutori"].ToString() == "Recrutori")
                        {
                            if (r.Cells[3].Text.Length == 0)
                            {
                                r.Cells[3].Text = " nu exista "; r.Cells[4].Text = "n/a";
                            }
                            else
                            {
                                r.Cells[4].Text = "<img src='../utils/ShowIcon.aspx?AngajatID=" + this.AngajatID + "&EvaluarePsihologicaID=" + r.Cells[4].Text + "&file=" + r.Cells[3].Text + "'>";
                            }
                        }
                        else
                        {
                            if (r.Cells[3].Text.Length == 0)
                            {
                                r.Cells[3].Text = " nu exista "; r.Cells[4].Text = "n/a";
                            }
                            else
                            {
                                r.Cells[4].Text = "<img src='utils/ShowIcon.aspx?AngajatID=" + this.AngajatID + "&EvaluarePsihologicaID=" + r.Cells[4].Text + "&file=" + r.Cells[3].Text + "'>";
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                litError.Text  = "The following error occurred: <br>";
                litError.Text += ex.Message;
            }
        }