Exemple #1
0
        /// <summary>
        /// Adauga o evaluare psihologica
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAdaugaEvaluarePsihologica_Click(object sender, System.EventArgs e)
        {
            try
            {
                string name = this.fileEvaluarePsihologica.PostedFile.FileName;
                name = name.Substring(name.LastIndexOf("\\") + 1);

                Salaries.Business.EvaluariPsihologice evaluare = new Salaries.Business.EvaluariPsihologice();
                evaluare.EvaluarePsihologicaId = 0;
                evaluare.Data        = Utilities.ConvertText2DateTime(txtData.Text);
                evaluare.TipRaportId = int.Parse(lstTipRaportID.SelectedValue);
                evaluare.AngajatId   = AngajatID;
                evaluare.Raport      = name;

                int NewID = evaluare.InsertEvaloarePsihologica();
                name = "EvaluarePsihologica_" + NewID + "_" + name;
                File_handler(this.fileEvaluarePsihologica, name, this.GetEvaluarePsihologicaPath() + "\\" + this.AngajatID);
            }
            catch (Exception ex)
            {
                litError.Text  = "The following error occurred: <br>";
                litError.Text += ex.Message;
            }

            LoadFormEvaluariPsihologice();
        }
Exemple #2
0
        /// <summary>
        /// Sterge o evaluare psihologica
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnStergeDate_Click(object sender, System.EventArgs e)
        {
            try
            {
                Salaries.Business.EvaluariPsihologice evaluare = new Salaries.Business.EvaluariPsihologice();
                evaluare.EvaluarePsihologicaId = int.Parse(EvaluarePsihologicaID.Value);
                evaluare.DeleteEvaloarePsihologica();
            }
            catch (Exception ex)
            {
                litError.Text  = "The following error occurred: <br>";
                litError.Text += ex.Message;
            }

            LoadFormEvaluariPsihologice();
        }
Exemple #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;
            }
        }