private void Page_Load(object sender, System.EventArgs e) { this.numeDept.Text = Parameters.NumeDepartament; this.settings = Salaries.Configuration.ModuleConfig.GetSettings(); if (!this.IsPostBack) { UtilitiesDb utilDb = new UtilitiesDb(settings.ConnectionString); utilDb.CreateAngajatiPeDeptSelectBox(this.lstAngajati, Parameters.NumeDepartament); if (lstAngajati.Items.Count != 0) { Parameters.DataAngajat = lstAngajati.Items[0]; } else { Table t = new Table(); t.Attributes.Add("class", "tabBackground"); t.Attributes.Add("borderColor", "green"); t.Attributes.Add("cellSpacing", "6"); TableRow tr = new TableRow(); TableCell tc = new TableCell(); t.Rows.Add(new TableRow()); t.Rows[0].Cells.Add(new TableCell()); t.Rows[0].Cells[0].Text = " "; t.Rows[0].Cells[0].Attributes.Add("class", "NormalBlackBold"); tc.Text = "<font size='3'>Nu exista angajati asignati direct acestui departament!</font>"; tc.Font.Size = 3; tc.Attributes.Add("class", "NormalBlackBold"); tc.Attributes.Add("align", "center"); tr.Cells.Add(tc); t.Rows.Add(tr); t.Rows.Add(new TableRow()); t.Rows[2].Cells.Add(new TableCell()); t.Rows[2].Cells[0].Text = "<font size='3'>Va rugam incercati in subdepartamentele asociate.</font>"; t.Rows[2].Cells[0].Attributes.Add("class", "NormalBlackBold"); t.Rows[2].Cells[0].Attributes.Add("align", "center"); this.PlaceHolder1.Controls.Add(t); this.lstAngajati.Enabled = false; this.DropDownList1.Enabled = false; return; } this.lstAngajati.Enabled = true; this.DropDownList1.Enabled = true; } System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image(); img.ImageUrl = "MakeChart.aspx"; this.PlaceHolder1.Controls.Add(img); }