Exemplo n.º 1
0
        /// <summary>
        /// Creates the left cell which contains the breadcrumbs itself.
        /// </summary>
        private TableCell CreateLeftCell()
        {
            TableCell td  = null;
            Label     lbl = null;

            try
            {
                td       = new TableCell();
                td.Width = ColumnWidth;
                int i     = 0;
                int count = UserContext.Breadcrumbs.Count;

                foreach (Micajah.Common.Bll.Action item in UserContext.Breadcrumbs)
                {
                    if (i == (count - 1))
                    {
                        lbl          = new Label();
                        lbl.CssClass = "L";
                        lbl.Text     = item.CustomName;
                        td.Controls.Add(lbl);
                    }
                    else
                    {
                        using (HyperLink link = new HyperLink())
                        {
                            link.Text        = item.CustomName;
                            link.NavigateUrl = item.CustomAbsoluteNavigateUrl;
                            link.ToolTip     = item.CustomDescription;

                            td.Controls.Add(link);
                        }

                        using (LiteralControl literal = new LiteralControl("&nbsp;&nbsp;|&nbsp;&nbsp;"))
                        {
                            td.Controls.Add(literal);
                        }
                    }
                    i++;
                }

                return(td);
            }
            finally
            {
                if (td != null)
                {
                    td.Dispose();
                }
                if (lbl != null)
                {
                    lbl.Dispose();
                }
            }
        }
Exemplo n.º 2
0
    private void AddSeparator(Table tblSeparator)
    {
        TableRow  tblRowSeparator  = new TableRow();
        TableCell tblCellSeparator = new TableCell();

        tblCellSeparator.Attributes.Add("class", "separator1");
        tblRowSeparator.Cells.Add(tblCellSeparator);
        tblSeparator.Rows.Add(tblRowSeparator);
        this.Controls.Add(tblSeparator);
        tblCellSeparator.Dispose();
        tblRowSeparator.Dispose();
    }
Exemplo n.º 3
0
        private Table CreateOtherMenusAsTable()
        {
            if (m_OtherMenuItems.Count > 0)
            {
                Table     table = null;
                TableRow  tr    = null;
                TableCell td    = null;

                try
                {
                    table          = new Table();
                    table.CssClass = "Mp_Om";

                    foreach (Micajah.Common.Bll.Action item in m_OtherMenuItems)
                    {
                        tr = new TableRow();
                        td = new TableCell();
                        td.Controls.Add(CreateItemLink(item));
                        tr.Cells.Add(td);
                        table.Rows.Add(tr);
                    }
                }
                finally
                {
                    if (table != null)
                    {
                        table.Dispose();
                    }
                    if (tr != null)
                    {
                        tr.Dispose();
                    }
                    if (td != null)
                    {
                        td.Dispose();
                    }
                }

                return(table);
            }
            return(null);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Name:Page_Load
        /// Description:Dynamic Table is created and linkbutton is created based on previous page item's selected.
        ///             And when linkbutton clicked according to postbackurl is open in browser.
        /// Author:Monal Shah
        /// Created Date:2010/10/20
        /// </summary>
        public void createTable()
        {
            try
            {
                string   s          = Request.QueryString["id"].ToString().TrimEnd(',');
                string[] splitvalue = s.Split(',');

                Panel1.Controls.Clear();
                objTable = new Table();
                Panel1.Controls.Add(objTable);
                for (int i = 0; i < splitvalue.Length; i++)
                {
                    objTableRow         = new TableRow();
                    objTableRow.ID      = "Row" + Convert.ToString(i);
                    objCell             = new TableCell();
                    objCell.ID          = "Row" + Convert.ToString(i) + Convert.ToString("Cell0");
                    objCell.BorderStyle = BorderStyle.Groove;
                    objLnk    = new LinkButton();
                    objLnk.ID = "Lnk_" + i;
                    if (i % 2 == 0)
                    {
                        objLnk.Text = splitvalue[i];
                        objCell.Controls.Add(objLnk);
                        objLnk.PostBackUrl = splitvalue[i + 1];
                        objTableRow.Controls.Add(objCell);
                        objTable.Controls.Add(objTableRow);
                    }
                }
            }
            catch (Exception)
            {
                Response.Redirect("Error.aspx");
            }
            finally
            {
                objCell.Dispose();
                objTableRow.Dispose();
                objTable.Dispose();
            }
        }
Exemplo n.º 5
0
    private void AddCommentBlock(string text)
    {
        Table tbl = new Table();

        tbl.Attributes.Add("width", "100%");
        tbl.BorderWidth = 0;
        tbl.CellSpacing = 0;

        TableRow  tblRow  = new TableRow();
        TableCell tblCell = new TableCell();

        tblCell.Text       = text;
        tblCell.ColumnSpan = 2;
        tblCell.Height     = 20;
        tblCell.Attributes.Add("class", "td01");
        tblRow.Cells.Add(tblCell);
        tbl.Rows.Add(tblRow);
        tblCell.Dispose();
        tblRow.Dispose();
        this.Controls.Add(tbl);
        tbl.Dispose();
    }
Exemplo n.º 6
0
    private void AddCompetencyBlock(string text, bool evaluatedPeoble)
    {
        Table tbl = new Table();

        tbl.Attributes.Add("width", "100%");
        tbl.BorderWidth = 0;
        tbl.CellSpacing = 0;
        //tbl.CellPadding = 3;

        TableRow  tblRow  = new TableRow();
        TableCell tblCell = new TableCell();

        tblCell.Text       = text;
        tblCell.ColumnSpan = 2;
        tblCell.Height     = 20;
        tblCell.Attributes.Add("class", "td01");
        tblRow.Cells.Add(tblCell);
        tbl.Rows.Add(tblRow);
        tblCell.Dispose();
        tblRow.Dispose();

        if (evaluatedPeoble)
        {
            TableRow  tblRowE   = new TableRow();
            TableCell tblCellE  = new TableCell();
            TableCell tblCellE1 = new TableCell();
            tblCellE.Width = cellWidth + 6;
            tblCellE1.Attributes.Add("class", "td03");
            tblCellE1.Text = "Personas a Evaluar (" + (fields.Count - 4).ToString() + ")";
            tblRowE.Cells.AddRange(new TableCell[] { tblCellE1 });
            tbl.Rows.Add(tblRowE);
            tblCellE.Dispose();
            tblRowE.Dispose();
        }
        this.Controls.Add(tbl);
        tbl.Dispose();
    }
        protected virtual void PrepareControlHierarchy()
        {
            Table child = new Table {
                CellSpacing = 0,
                CellPadding = 0,
                BorderWidth = 0,
                CssClass    = this.TableCssClass
            };
            TableRow  row  = new TableRow();
            TableCell cell = new TableCell();

            cell.Controls.Add(this.m_ValidateCodeInput);
            row.Cells.Add(cell);
            cell.Dispose();
            TableCell cell2 = new TableCell();

            cell2.Controls.Add(this.m_ValidateCodeImage);
            row.Cells.Add(cell2);
            cell2.Dispose();
            child.Rows.Add(row);
            this.Controls.Add(child);
            row.Dispose();
            child.Dispose();
        }
Exemplo n.º 8
0
    protected override void OnInit(EventArgs e)
    {
        String connectionString = ConfigurationManager.AppSettings["ConnectionString"];

        SqlConnection sqlConnect = new SqlConnection(connectionString);
        SqlCommand cmd = new SqlCommand();
        SqlDataReader reader;
        cmd.Connection = sqlConnect;
        cmd.CommandText = "Retrieve_MMRALL";
        cmd.CommandType = CommandType.StoredProcedure;

        var Tableheader = new System.Web.UI.WebControls.TableRow
        {
            Cells = {
                        new TableCell { Text = "MRID" },
                        new TableCell { Text = "Defect Name" },
                        new TableCell { Text = "Tester" },
                        new TableCell { Text = "Date Found" },
                        new TableCell { Text = "Severity" },
                        new TableCell { Text = "Status" },
                        new TableCell { Text = "Steps to recreate" },
                        new TableCell { Text = "Comments" },
                        new TableCell { Text = "Assigned Developer" },
                        new TableCell { Text = "Update" }

                }
        };

        MMR.Rows.Add(Tableheader);

        sqlConnect.Open();
        cmd.ExecuteNonQuery();
        reader = cmd.ExecuteReader();
        int i = 1;

        try
        {

            while (reader.Read())
            {
                Button Update = new Button();
                Update.Text = "Update";
                Update.ID = i.ToString();
                Update.Click += new EventHandler(this.Update_Click);
                Update.OnClientClick = buttonID(Update.ID);

                var DataCell = new TableCell();
                var TableRow = new TableRow
                {
                    Cells = {

                        new TableCell { Text = reader["MRID"].ToString() },
                        new TableCell { Text = reader["Defect"].ToString() },
                        new TableCell { Text = reader["Tester"].ToString() },
                        new TableCell { Text = reader["DateFound"].ToString() },
                        new TableCell { Text = reader["Severity"].ToString() },
                        new TableCell { Text = reader["Condition"].ToString() },
                        new TableCell { Text = reader["Steps"].ToString() },
                        new TableCell { Text = reader["Comment"].ToString() },
                        new TableCell { Text = reader["Developer"].ToString() },

                }
                };

                DataCell.Controls.Add(Update);

                TableRow.Cells.Add(DataCell);

              //Response.Write(Update.ID);

                MMR.Rows.Add(TableRow);
                i++;

                DataCell.Dispose();
                TableRow.Dispose();
            }

        }
        catch (Exception f)
        {
            Console.Write(f.Message);
        }
        finally
        {
        sqlConnect.Close();
        }
    }
Exemplo n.º 9
0
        private TableRow[] CreateDetailMenuRows(ActionCollection items, bool root)
        {
            List <TableRow> list            = new List <TableRow>();
            TableRow        tr              = null;
            TableCell       td              = null;
            int             cellIndex       = 0;
            bool            isAlternatedRow = false;

            try
            {
                foreach (Micajah.Common.Bll.Action item in items)
                {
                    bool rootAndGroup = (root && item.GroupInDetailMenu);
                    if ((cellIndex == 0) || rootAndGroup)
                    {
                        if (rootAndGroup)
                        {
                            if (tr != null)
                            {
                                cellIndex       = 0;
                                isAlternatedRow = false;
                            }
                        }
                        else
                        {
                            isAlternatedRow = (!isAlternatedRow);
                        }

                        tr = new TableRow();
                        list.Add(tr);
                    }

                    td = new TableCell();
                    string cssClass = GetItemCssClass(isAlternatedRow, item.HighlightInDetailMenu, rootAndGroup);
                    if (!string.IsNullOrEmpty(cssClass))
                    {
                        td.CssClass = cssClass;
                    }
                    td.Controls.Add(CreateItem(item, root));
                    tr.Cells.Add(td);

                    if (rootAndGroup)
                    {
                        if (this.RepeatColumnsInternal > 1)
                        {
                            td.ColumnSpan = this.RepeatColumnsInternal;
                        }
                        list.AddRange(CreateDetailMenuRows(item.GetAvailableChildActions(m_ActionIdList, m_IsFrameworkAdmin, m_IsAuthenticated), false));
                    }
                    else
                    {
                        cellIndex++;
                        if (cellIndex == this.RepeatColumnsInternal)
                        {
                            cellIndex = 0;
                        }
                    }
                }

                ProcessDetailMenuRows(list);
            }
            finally
            {
                if (tr != null)
                {
                    tr.Dispose();
                }
                if (td != null)
                {
                    td.Dispose();
                }
            }

            return(list.ToArray());
        }
Exemplo n.º 10
0
        protected void InitializeControls()
        {
            this.panel = new Panel();

            Table table = new Table();

            try {
                TableRow  row1, row2, row3;
                TableCell cell;
                table.Rows.Add(row1 = new TableRow());
                table.Rows.Add(row2 = new TableRow());
                table.Rows.Add(row3 = new TableRow());

                // top row, left cell
                cell = new TableCell();
                try {
                    this.label           = new HtmlGenericControl("label");
                    this.label.InnerText = LabelTextDefault;
                    cell.Controls.Add(this.label);
                    row1.Cells.Add(cell);
                } catch {
                    cell.Dispose();
                    throw;
                }

                // top row, middle cell
                cell = new TableCell();
                try {
                    cell.Controls.Add(new InPlaceControl(this));
                    row1.Cells.Add(cell);
                } catch {
                    cell.Dispose();
                    throw;
                }

                // top row, right cell
                cell = new TableCell();
                try {
                    this.loginButton                 = new Button();
                    this.loginButton.ID              = this.ID + "_loginButton";
                    this.loginButton.Text            = ButtonTextDefault;
                    this.loginButton.ToolTip         = ButtonToolTipDefault;
                    this.loginButton.Click          += this.LoginButton_Click;
                    this.loginButton.ValidationGroup = ValidationGroupDefault;
#if !Mono
                    this.panel.DefaultButton = this.loginButton.ID;
#endif
                    cell.Controls.Add(this.loginButton);
                    row1.Cells.Add(cell);
                } catch {
                    cell.Dispose();
                    throw;
                }

                // middle row, left cell
                row2.Cells.Add(new TableCell());

                // middle row, middle cell
                cell = new TableCell();
                try {
                    cell.Style[HtmlTextWriterStyle.Color]    = "gray";
                    cell.Style[HtmlTextWriterStyle.FontSize] = "smaller";
                    this.requiredValidator = new RequiredFieldValidator();
                    this.requiredValidator.ErrorMessage    = RequiredTextDefault + RequiredTextSuffix;
                    this.requiredValidator.Text            = RequiredTextDefault + RequiredTextSuffix;
                    this.requiredValidator.Display         = ValidatorDisplay.Dynamic;
                    this.requiredValidator.ValidationGroup = ValidationGroupDefault;
                    cell.Controls.Add(this.requiredValidator);
                    this.identifierFormatValidator = new CustomValidator();
                    this.identifierFormatValidator.ErrorMessage    = UriFormatTextDefault + RequiredTextSuffix;
                    this.identifierFormatValidator.Text            = UriFormatTextDefault + RequiredTextSuffix;
                    this.identifierFormatValidator.ServerValidate += this.IdentifierFormatValidator_ServerValidate;
                    this.identifierFormatValidator.Enabled         = UriValidatorEnabledDefault;
                    this.identifierFormatValidator.Display         = ValidatorDisplay.Dynamic;
                    this.identifierFormatValidator.ValidationGroup = ValidationGroupDefault;
                    cell.Controls.Add(this.identifierFormatValidator);
                    this.errorLabel = new Label();
                    this.errorLabel.EnableViewState = false;
                    this.errorLabel.ForeColor       = System.Drawing.Color.Red;
                    this.errorLabel.Style[HtmlTextWriterStyle.Display] = "block";                     // puts it on its own line
                    this.errorLabel.Visible = false;
                    cell.Controls.Add(this.errorLabel);
                    this.examplePrefixLabel      = new Label();
                    this.examplePrefixLabel.Text = ExamplePrefixDefault;
                    cell.Controls.Add(this.examplePrefixLabel);
                    cell.Controls.Add(new LiteralControl(" "));
                    this.exampleUrlLabel           = new Label();
                    this.exampleUrlLabel.Font.Bold = true;
                    this.exampleUrlLabel.Text      = ExampleUrlDefault;
                    cell.Controls.Add(this.exampleUrlLabel);
                    row2.Cells.Add(cell);
                } catch {
                    cell.Dispose();
                    throw;
                }

                // middle row, right cell
                cell = new TableCell();
                try {
                    cell.Style[HtmlTextWriterStyle.Color]     = "gray";
                    cell.Style[HtmlTextWriterStyle.FontSize]  = "smaller";
                    cell.Style[HtmlTextWriterStyle.TextAlign] = "center";
                    this.registerLink             = new HyperLink();
                    this.registerLink.Text        = RegisterTextDefault;
                    this.registerLink.ToolTip     = RegisterToolTipDefault;
                    this.registerLink.NavigateUrl = RegisterUrlDefault;
                    this.registerLink.Visible     = RegisterVisibleDefault;
                    cell.Controls.Add(this.registerLink);
                    row2.Cells.Add(cell);
                } catch {
                    cell.Dispose();
                    throw;
                }

                // bottom row, left cell
                cell = new TableCell();
                row3.Cells.Add(cell);

                // bottom row, middle cell
                cell = new TableCell();
                try {
                    this.rememberMeCheckBox                 = new CheckBox();
                    this.rememberMeCheckBox.Text            = RememberMeTextDefault;
                    this.rememberMeCheckBox.Checked         = this.UsePersistentCookie != LogOnPersistence.Session;
                    this.rememberMeCheckBox.Visible         = RememberMeVisibleDefault;
                    this.rememberMeCheckBox.CheckedChanged += this.RememberMeCheckBox_CheckedChanged;
                    cell.Controls.Add(this.rememberMeCheckBox);
                    row3.Cells.Add(cell);
                } catch {
                    cell.Dispose();
                    throw;
                }

                // bottom row, right cell
                cell = new TableCell();
                try {
                    row3.Cells.Add(cell);
                } catch {
                    cell.Dispose();
                    throw;
                }

                // this sets all the controls' tab indexes
                this.TabIndex = TabIndexDefault;

                this.panel.Controls.Add(table);
            } catch {
                table.Dispose();
                throw;
            }

            this.idselectorJavascript = new Literal();
            this.panel.Controls.Add(this.idselectorJavascript);
        }
Exemplo n.º 11
0
    public void Build(IList <ManagementIndicatorsDetail> details, Table tabla, string fullName, string letter)
    {
        //cabecera
        TableRow  tblRowEvaluated  = new TableRow();
        TableCell tblCellEvaluated = new TableCell();
        TableRow  tblRowHeader     = new TableRow();
        TableCell tblCell1         = new TableCell();
        TableCell tblCell2         = new TableCell();
        TableCell tblCell3         = new TableCell();
        TableCell tblCell4         = new TableCell();

        tblCellEvaluated.Text       = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(fullName.Trim().ToLower());
        tblCellEvaluated.ColumnSpan = 4;
        tblCellEvaluated.Attributes.Add("class", "td01");
        tblRowEvaluated.Cells.Add(tblCellEvaluated);
        tabla.Rows.Add(tblRowEvaluated);
        tblCellEvaluated.Dispose();
        tblRowEvaluated.Dispose();

        tblRowHeader.Attributes.Add("class", "td03");

        tblCell1.Attributes.Add("width", "68%");
        tblCell1.Text = "Descripción";
        tblCell2.Text = "Ponderación 100%";
        tblCell3.Text = "Unidad de Medida";
        tblCell4.Text = "Resultado Logrado %";

        tblRowHeader.Cells.AddRange(new TableCell[] { tblCell1, tblCell2, tblCell3, tblCell4 });
        tabla.Rows.Add(tblRowHeader);

        tblCell1.Dispose();
        tblCell2.Dispose();
        tblCell3.Dispose();
        tblCell4.Dispose();
        tblRowHeader.Dispose();
        //fin cabecera

        //Filas comienzo
        int rowId = 0;

        foreach (ManagementIndicatorsDetail d in details)
        {
            TableRow tblRow = new TableRow();
            for (int i = 1; i < 5; i++)
            {
                bool      resultOnly = !(d.Code == 0);
                TableCell tblCell    = new TableCell();
                switch (i)
                {
                case 1:
                    if (d.Status == "true" && d.Code == 0)
                    {
                        TextBox txtDescription = new TextBox();
                        txtDescription.Text = d.Properties[i].ToString();
                        txtDescription.Attributes["firstLine"]  = (d == details[0]).ToString();
                        txtDescription.Attributes["class"]      = "text1 d";
                        txtDescription.Attributes["onkeypress"] = "k(event)";
                        txtDescription.Attributes["onpaste"]    = "k(event)";
                        txtDescription.Attributes["onblur"]     = "b(this)";
                        txtDescription.Attributes["onfocus"]    = "f(this)";
                        HttpResponse   myHttpReponse    = Response;
                        HtmlTextWriter myHtmlTextWriter = new HtmlTextWriter(myHttpReponse.Output);
                        txtDescription.Attributes.AddAttributes(myHtmlTextWriter);
                        tblCell.Attributes.Add("class", "td02r");
                        txtDescription.ID     = "";
                        txtDescription.Width  = Unit.Percentage(98);
                        txtDescription.Height = 18;
                        txtDescription.SkinID = i.ToString() + "_" + d.NetworkAssessmentId.ToString() + "_" + d.ResultVariableId.ToString();
                        tblCell.Controls.Add(txtDescription);
                        txtDescription.Dispose();
                    }
                    else
                    {
                        tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(d.Properties[i].ToString().Trim().ToLower());
                        tblCell.Attributes.Add("class", "td02");
                    };
                    break;

                case 2:
                    if (d.Status == "true" && d.Code == 0)
                    {
                        TextBox txtWeight = new TextBox();
                        txtWeight.Text = (d.Properties[i].ToString() == "0") ? string.Empty: d.Properties[i].ToString();
                        txtWeight.Attributes["class"]      = "textbox w";
                        txtWeight.Attributes["firstLine"]  = (d == details[0]).ToString();
                        txtWeight.Attributes["onkeypress"] = "k(event)";
                        txtWeight.Attributes["onblur"]     = "b(this)";
                        txtWeight.Attributes["onfocus"]    = "f(this)";
                        HttpResponse   myHttpReponse    = Response;
                        HtmlTextWriter myHtmlTextWriter = new HtmlTextWriter(myHttpReponse.Output);
                        txtWeight.Attributes.AddAttributes(myHtmlTextWriter);
                        tblCell.Attributes.Add("class", "td02r");
                        txtWeight.ID     = "";
                        txtWeight.Width  = Unit.Percentage(95);
                        txtWeight.Height = 18;
                        txtWeight.SkinID = i.ToString() + "_" + d.NetworkAssessmentId.ToString() + "_" + d.ResultVariableId.ToString();

                        tblCell.Controls.Add(txtWeight);
                        txtWeight.Dispose();
                    }
                    else
                    {
                        tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(d.Properties[i].ToString().Trim().ToLower());
                        tblCell.Attributes.Add("class", "tdr");
                    };
                    break;

                case 4:
                    if (d.Status == "true")
                    {
                        TextBox txtValue = new TextBox();
                        txtValue.Text = (d.Properties[i].ToString() == "0") ? string.Empty : d.Properties[i].ToString();
                        txtValue.Attributes["firstLine"]  = (d == details[0]).ToString();
                        txtValue.Attributes["resultOnly"] = resultOnly.ToString();
                        txtValue.Attributes["class"]      = "textbox v";
                        txtValue.Attributes["onkeypress"] = "return k(event)";
                        txtValue.Attributes["onblur"]     = "b(this)";
                        txtValue.Attributes["onfocus"]    = "f(this)";
                        HttpResponse   myHttpReponse    = Response;
                        HtmlTextWriter myHtmlTextWriter = new HtmlTextWriter(myHttpReponse.Output);
                        txtValue.Attributes.AddAttributes(myHtmlTextWriter);
                        tblCell.Attributes.Add("class", "td02r");
                        txtValue.ID     = "";
                        txtValue.Width  = Unit.Percentage(95);
                        txtValue.Height = 18;
                        txtValue.SkinID = i.ToString() + "_" + d.NetworkAssessmentId.ToString() + "_" + d.ResultVariableId.ToString();
                        tblCell.Controls.Add(txtValue);
                        txtValue.Dispose();
                    }
                    else
                    {
                        tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(d.Properties[i].ToString().Trim().ToLower());
                        tblCell.Attributes.Add("class", "tdr");

                        if (group8)
                        {
                            tblCell.BackColor = System.Drawing.Color.Gray;
                            tblCell.ForeColor = System.Drawing.Color.Gray;
                        }
                    };
                    break;

                default:
                    tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(d.Properties[i].ToString().Trim().ToLower());
                    tblCell.Attributes.Add("class", "td02c");
                    break;
                }



                tblRow.Cells.Add(tblCell);
                tblCell.Dispose();
            }

            tabla.Rows.Add(tblRow);
            tblRow.Dispose();
            rowId++;
        }

        //Fin Filas


        //arma pie y el separador/
        TableRow    tblRowFoot   = new TableRow();
        TableCell   tblCellFoot1 = new TableCell();
        TableCell   tblCellFoot2 = new TableCell();
        HiddenField txtLetter    = new HiddenField();

        tblCellFoot1.Text = "Resultado obtenido:";
        tblCellFoot1.Attributes.Add("class", "textor");
        tblCellFoot1.ColumnSpan = 3;
        tblCellFoot2.Text       = letter.Split('_')[0];
        if (group8)
        {
            tblCellFoot2.Text      = "D";
            tblCellFoot2.BackColor = System.Drawing.Color.Gray;
            tblCellFoot2.ForeColor = System.Drawing.Color.Gray;
        }
        txtLetter.Value = letter;
        txtLetter.ID    = tabla.ID + "_l";
        this.Controls.Add(txtLetter);
        tblCellFoot2.Attributes.Add("class", "td03");
        tblRowFoot.Cells.AddRange(new TableCell[] { tblCellFoot1, tblCellFoot2 });
        tabla.Rows.Add(tblRowFoot);
        tblCellFoot1.Dispose();
        tblCellFoot2.Dispose();
        txtLetter.Dispose();
        tblRowFoot.Dispose();

        TableRow  tblRowSeparator  = new TableRow();
        TableCell tblCellSeparator = new TableCell();

        tblCellSeparator.Text = "&nbsp;";
        tblRowSeparator.Cells.Add(tblCellSeparator);
        tabla.Rows.Add(tblRowSeparator);
        tblCellSeparator.Dispose();
        tblRowSeparator.Dispose();
        //fin arma pie
    }
Exemplo n.º 12
0
    private void Build(object[] d)
    {
        string _style = "";
        int    color  = 0;
        Table  tbl    = new Table();

        tbl.Attributes.Add("width", "100%");
        tbl.BorderWidth = 1;
        tbl.CellSpacing = 1;
        tbl.CellPadding = 0;
        tbl.ID          = "tbl_" + tblID.ToString();

        TableRow  tblRowEvaluated  = new TableRow();
        TableCell tblCellEvaluated = new TableCell();

        tblCellEvaluated.Text       = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(d[1].ToString().Trim().ToLower());
        tblCellEvaluated.ColumnSpan = 3;
        tblCellEvaluated.Attributes.Add("class", "td01");
        tblRowEvaluated.Cells.Add(tblCellEvaluated);
        tbl.Rows.Add(tblRowEvaluated);
        tblCellEvaluated.Dispose();
        tblRowEvaluated.Dispose();

        TableRow tblRow1 = new TableRow();
        TableRow tblRow2 = new TableRow();
        TableRow tblRow3 = new TableRow();
        TableRow tblRow4 = new TableRow();

        TableCell tblCell1 = new TableCell();
        TableCell tblCell2 = new TableCell();
        TableCell tblCell3 = new TableCell();

        tblCell2.Text = "Qué mejorar";
        tblCell3.Text = "Cómo";
        tblCell2.Attributes.Add("class", "td03");
        tblCell3.Attributes.Add("class", "td03");

        TableCell tblCell11 = new TableCell();
        TableCell tblCell21 = new TableCell();
        TableCell tblCell31 = new TableCell();

        tblCell11.Width = 100;
        tblCell11.Text  = "70%  On The Job";
        tblCell11.Attributes.Add("class", "td03");
        tblCell21.Attributes.Add("class", "td02");
        tblCell31.Attributes.Add("class", "td02");

        TextBox txt1 = new TextBox();

        txt1.Text = d[2].ToString();
        if (txt1.Text.Trim().Length > 0)
        {
            color++;
        }
        ;
        txt1.Attributes["class"]   = "tM";
        txt1.Attributes["onblur"]  = "_o(this, '" + tbl.ClientID + "')";
        txt1.Attributes["onfocus"] = "_i(this)";
        txt1.Attributes["onkeyup"] = "_k(event, '" + tbl.ClientID + "')";
        txt1.Rows     = 3;
        txt1.TextMode = TextBoxMode.MultiLine;
        txt1.Width    = Unit.Percentage(98);
        //txt1.ReadOnly = (d[8].ToString() == "t") ? false : true;
        txt1.ReadOnly = true;
        txt1.SkinID   = d[0].ToString();
        tblCell21.Controls.Add(txt1);

        //TextBox txt11 = new TextBox();
        //txt11.Text = d[3].ToString();
        //if (txt11.Text.Trim().Length > 0) { color++; };
        //txt11.Attributes["class"] = "tM";
        //txt11.Attributes["onblur"] = "_o(this, '" + tbl.ClientID + "')";
        //txt11.Attributes["onfocus"] = "_i(this)";
        //txt11.Attributes["onkeyup"] = "_k(event, '" + tbl.ClientID + "')";
        //txt11.Rows = 3;
        //txt11.TextMode = TextBoxMode.MultiLine;
        //txt11.Width = Unit.Percentage(98);
        ////txt11.ReadOnly = (d[8].ToString() == "t") ? false : true;
        //txt11.ReadOnly = true;
        //txt11.SkinID = d[0].ToString();
        //tblCell31.Controls.Add(txt11);

        DropDownList ddl1 = new DropDownList();

        ddl1.Attributes["onchange"] = "_k(event, '" + tbl.ClientID + "')";
        ddl1.Enabled = (d[8].ToString() == "t") ? true : false;
        ddl1.Items.Add("<< Seleccione una competencia a mejorar >>");
        ddl1.Items.Add("Compañerismo");
        ddl1.Items.Add("Esfuerzo");
        ddl1.Items.Add("Prueba");
        tblCell21.Controls.Add(ddl1);

        tblCell21.Controls.Add(new LiteralControl("<br />"));

        DropDownList ddl2 = new DropDownList();

        ddl2.Attributes["onchange"] = "_k(event, '" + tbl.ClientID + "')";
        ddl2.Enabled = (d[8].ToString() == "t") ? true : false;
        ddl2.Items.Add("<< Seleccione una competencia a mejorar >>");
        ddl2.Items.Add("Compañerismo");
        ddl2.Items.Add("Esfuerzo");
        ddl2.Items.Add("Prueba");
        tblCell21.Controls.Add(ddl2);

        TableCell tblCell111 = new TableCell();
        TableCell tblCell211 = new TableCell();
        TableCell tblCell311 = new TableCell();

        tblCell111.Width = 100;
        tblCell111.Text  = "Competencias Técnicas";
        tblCell111.Attributes.Add("class", "td03");
        tblCell211.Attributes.Add("class", "td02");
        tblCell311.Attributes.Add("class", "td02");
        TextBox txt2 = new TextBox();

        txt2.Text = d[4].ToString();
        if (txt2.Text.Trim().Length > 0)
        {
            color++;
        }
        ;
        txt2.Attributes["class"]   = "tM";
        txt2.Attributes["onblur"]  = "_o(this, '" + tbl.ClientID + "')";
        txt2.Attributes["onfocus"] = "_i(this)";
        txt2.Attributes["onkeyup"] = "_k(event, '" + tbl.ClientID + "')";
        txt2.Rows     = 3;
        txt2.TextMode = TextBoxMode.MultiLine;
        txt2.Width    = Unit.Percentage(98);
        //txt2.ReadOnly = (d[8].ToString() == "t") ? false : true;
        txt2.ReadOnly = true;
        txt2.SkinID   = d[0].ToString();
        tblCell211.Controls.Add(txt2);
        TextBox txt21 = new TextBox();

        txt21.Text = d[5].ToString();
        if (txt21.Text.Trim().Length > 0)
        {
            color++;
        }
        ;
        txt21.Attributes["class"]   = "tM";
        txt21.Attributes["onblur"]  = "_o(this, '" + tbl.ClientID + "')";
        txt21.Attributes["onfocus"] = "_i(this)";
        txt21.Attributes["onkeyup"] = "_k(event, '" + tbl.ClientID + "')";
        txt21.Rows     = 3;
        txt21.TextMode = TextBoxMode.MultiLine;
        txt21.Width    = Unit.Percentage(98);
        //txt21.ReadOnly = (d[8].ToString() == "t") ? false : true;
        txt21.ReadOnly = true;
        txt21.SkinID   = d[0].ToString();
        tblCell311.Controls.Add(txt21);

        TableCell tblCell1111 = new TableCell();
        TableCell tblCell2111 = new TableCell();
        TableCell tblCell3111 = new TableCell();

        tblCell1111.Width = 100;
        tblCell1111.Text  = "Aspectos Actitudinales";
        tblCell1111.Attributes.Add("class", "td03");
        tblCell2111.Attributes.Add("class", "td02");
        tblCell3111.Attributes.Add("class", "td02");
        TextBox txt3 = new TextBox();

        txt3.Text = d[6].ToString();
        if (txt3.Text.Trim().Length > 0)
        {
            color++;
        }
        ;
        txt3.Attributes["class"]   = "tM";
        txt3.Attributes["onblur"]  = "_o(this, '" + tbl.ClientID + "')";
        txt3.Attributes["onfocus"] = "_i(this)";
        txt3.Attributes["onkeyup"] = "_k(event, '" + tbl.ClientID + "')";
        txt3.Rows     = 3;
        txt3.TextMode = TextBoxMode.MultiLine;
        txt3.Width    = Unit.Percentage(98);
        //txt3.ReadOnly = (d[8].ToString() == "t") ? false : true;
        txt3.ReadOnly = true;
        txt3.SkinID   = d[0].ToString();
        tblCell2111.Controls.Add(txt3);
        TextBox txt31 = new TextBox();

        txt31.Text = d[7].ToString();
        if (txt31.Text.Trim().Length > 0)
        {
            color++;
        }
        ;
        txt31.Attributes["class"]   = "tM";
        txt31.Attributes["onblur"]  = "_o(this, '" + tbl.ClientID + "')";
        txt31.Attributes["onfocus"] = "_i(this)";
        txt31.Attributes["onkeyup"] = "_k(event, '" + tbl.ClientID + "')";
        txt31.Rows     = 3;
        txt31.TextMode = TextBoxMode.MultiLine;
        txt31.Width    = Unit.Percentage(98);
        //txt31.ReadOnly = (d[8].ToString() == "t") ? false : true;
        txt31.ReadOnly = true;
        txt31.SkinID   = d[0].ToString();
        tblCell3111.Controls.Add(txt31);

        tblRow1.Cells.AddRange(new TableCell[] { tblCell1, tblCell2, tblCell3 });
        tblRow2.Cells.AddRange(new TableCell[] { tblCell11, tblCell21, tblCell31 });
        tblRow3.Cells.AddRange(new TableCell[] { tblCell111, tblCell211, tblCell311 });
        tblRow4.Cells.AddRange(new TableCell[] { tblCell1111, tblCell2111, tblCell3111 });

        TableRow tblRowColor = new TableRow();

        TableCell tblCellColor  = new TableCell();
        TableCell tblCellColorL = new TableCell();

        tblCellColorL.ColumnSpan = 2;

        if (color == 6)
        {
            //Button btn = (Button)this.Page.Master.FindControl("CPH").FindControl("btnSend");
            //btn.Enabled = true;

            _style = "g";
        }
        else if (color == 0)
        {
            _style = "r";
        }
        else
        {
            _style = "y";
        }

        tblCellColorL.Attributes.Add("class", _style);


        //       tblCellColorL.ID = "C";
        tblRowColor.Cells.AddRange(new TableCell[] { tblCellColor, tblCellColorL });

        TableRow  tblRowSeguimiento  = new TableRow();
        TableCell tblCellSeguimiento = new TableCell();

        tblCellSeguimiento.ColumnSpan = 2;
        Label lblSeguimiento = new Label();

        lblSeguimiento.Text = "Añadir seguimiento de desarrollo";
        lblSeguimiento.Attributes.Add("class", "titulo");
        tblCellSeguimiento.Controls.Add(lblSeguimiento);
        TextBox txtSeguimiento = new TextBox();

        txtSeguimiento.Rows                  = 3;
        txtSeguimiento.TextMode              = TextBoxMode.MultiLine;
        txtSeguimiento.Width                 = Unit.Percentage(99);
        txtSeguimiento.ReadOnly              = false;
        txtSeguimiento.Attributes["class"]   = "Seg";
        txtSeguimiento.Attributes["onkeyup"] = "kSeg('" + tbl.ClientID + "')";
        txtSeguimiento.SkinID                = d[0].ToString();
        tblCellSeguimiento.Controls.Add(txtSeguimiento);
        DataTable dtSeguimiento = new DataTable();

        dtSeguimiento = new clsDAO().SqlCall("GetFollowupHistory " + d[0].ToString());
        if (dtSeguimiento.Rows.Count > 0)
        {
            Label lblHistorial = new Label();
            lblHistorial.Text = "Historial de seguimiento";
            lblHistorial.Attributes.Add("class", "titulo");
            tblCellSeguimiento.Controls.Add(lblHistorial);
            GridView gvSeguimiento = new GridView();
            gvSeguimiento.DataSource = dtSeguimiento;
            gvSeguimiento.DataBind();
            tblCellSeguimiento.Controls.Add(gvSeguimiento);
        }
        tblRowSeguimiento.Cells.Add(tblCellSeguimiento);

        tbl.Rows.AddRange(new TableRow[] { tblRow1, tblRow2, tblRow3, tblRow4, tblRowColor, tblRowSeguimiento });
        this.Controls.Add(tbl);
    }
Exemplo n.º 13
0
        ///
        /// <summary>
        /// Enables a server control to perform final clean up before it is released from
        /// memory.
        /// </summary>
        /// <remarks>
        /// The Dispose method leaves the Control in an unusable state. After calling this
        /// method, you must release all references to the control so the memory it was
        /// occupying can be reclaimed by garbage collection.
        /// </remarks>
        /// <param name="disposing"><b>true</b> to release both managed and unmanaged resources; <b>false</b> to release only unmanaged resources.</param>
        ///
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_license != null)
                {
                    _license.Dispose();
                    _license = null;
                }

                if (_titleRow != null)
                {
                    _titleRow.Dispose();
                    _titleRow = null;
                }

                if (_titleCell != null)
                {
                    _titleCell.Dispose();
                    _titleCell = null;
                }

                if (_bodyRow != null)
                {
                    _bodyRow.Dispose();
                    _bodyRow = null;
                }

                if (_bodyCell != null)
                {
                    _bodyCell.Dispose();
                    _bodyCell = null;
                }

                if (_titleLinkButton != null)
                {
                    _titleLinkButton.Dispose();
                    _titleLinkButton = null;
                }

                if (_titleStyle != null)
                {
                    _titleStyle.Dispose();
                    _titleStyle = null;
                }

                if (_bodyStyle != null)
                {
                    _bodyStyle.Dispose();
                    _bodyStyle = null;
                }

                if (_titleHyperLink != null)
                {
                    _titleHyperLink.Dispose();
                    _titleHyperLink = null;
                }

                if (_hiddenState != null)
                {
                    _hiddenState.Dispose();
                    _hiddenState = null;
                }
            }

            return;
        }
Exemplo n.º 14
0
    public void Build(object[][] d, Table tblL, Table tblR)
    {
        int    color  = 0;
        string _style = string.Empty;

        TableRow  tblRow  = new TableRow();
        TableCell tblCell = new TableCell();

        //----------------------------
        //Competencia
        tblCell.Text = d[0][2].ToString().Trim();
        if (d[0].Length - 4 > 10)
        {
            tblCell.Width = cellWidth;
        }
        else
        {
            tblCell.Width = Unit.Percentage(50);
        }
        tblCell.Attributes.Add("class", "td08");
        //tblCell.Attributes.Add("nowrap", "true");
        tblRow.Cells.Add(tblCell);



        TableRow tblRowR = new TableRow();

        for (int c = 4; c < d[0].Length; c++)
        {
            TableCell tblCell0 = new TableCell();
            tblCell0.Text    = fields[c].ToString();
            tblCell0.ToolTip = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(fieldsValues[c].ToString().Split('_')[3].ToLower());
            tblCell0.Attributes.Add("class", "td04");
            tblRowR.Cells.Add(tblCell0);
            tblCell0.Dispose();
        }
        tblR.Rows.Add(tblRowR);
        tblRowR.Dispose();


        for (int i = 0; i < d.Length; i++)
        {
            TableRow  tblRow0  = new TableRow();
            TableCell tblCell1 = new TableCell();
            tblCell1.Text = d[i][3].ToString().Trim();
            if (d[0].Length - 4 > 10)
            {
                tblCell1.Width = cellWidth;
            }
            else
            {
                tblCell1.Width = Unit.Percentage(50);
            }
            tblCell1.Attributes.Add("class", "td02_");
            tblRow0.Cells.Add(tblCell1);
            tblCell1.Dispose();
            tblL.Rows.Add(tblRow0);
            tblRow0.Dispose();

            TableRow tblRowR0 = new TableRow();
            for (int c = 4; c < d[i].Length; c++)
            {
                TableCell tblCell0 = new TableCell();
                tblCell0.Attributes.Add("class", "td05");
                RadioButton radio = new RadioButton();
                radio.EnableViewState = false;
                radio.GroupName       = c.ToString() + numBlock.ToString();
                radio.SkinID          = fieldsValues[c].ToString().Split('_')[1].ToString().ToLower() + "_" + d[i][0].ToString().Trim() + "_" + d[i][1].ToString() + "_" + (i + 1).ToString() + "_" + d[i][4].ToString();
                radio.Checked         = (d[i][c].ToString() != "0") ? true : false;
                if (radio.Checked)
                {
                    color++;
                }
                radio.Enabled = radio.Checked || (fieldsValues[c].ToString().Split('_')[2].ToLower() == "t");
                tblCell0.Controls.Add(radio);
                radio.Dispose();
                tblRowR0.Cells.Add(tblCell0);
                tblCell0.Dispose();
            }
            tblR.Rows.Add(tblRowR0);
            tblRowR0.Dispose();
        }

        TableRow  tblRowColor   = new TableRow();
        TableCell tblCellColorL = new TableCell();

        tblCellColorL.ID = "C" + numBlock.ToString();

        if (color == fields.Count - 4)
        {
            _style = "g";
        }
        else if (color == 0)
        {
            _style = "r";
        }
        else
        {
            _style = "y";
        }



        if (color == fields.Count - 4)
        {
            tblR.Attributes["onclick"] = "c(this,false)";
        }
        else
        {
            tblR.Attributes["onclick"] = "c(this,true)";
        }

        tblL.Rows.AddAt(0, tblRow);
        tblRow.Dispose();


        tblCellColorL.Attributes.Add("class", _style);
        tblRowColor.Cells.Add(tblCellColorL);
        tblL.Rows.Add(tblRowColor);
        tblCellColorL.Dispose();
        tblRowColor.Dispose();
        tblL.Dispose();
        tblR.Dispose();
    }
Exemplo n.º 15
0
    private void AddCompetency(object[][] d)
    {
        Table     tblContainer = new Table();
        TableRow  tblRow       = new TableRow();
        TableCell tblCellLeft  = new TableCell();
        TableCell tblCellRight = new TableCell();
        Panel     pnlLeft      = new Panel();

        if (d[0].Length - 4 > 10)
        {
            tblCellLeft.Width = cellWidth;
        }
        else
        {
            tblCellLeft.Width = Unit.Percentage(50);
        }
        Panel pnlRight = new Panel();
        Table tblLeft  = new Table();
        Table tblRight = new Table();

        tblContainer.BorderWidth = 0;
        tblContainer.CellSpacing = 1;
        tblContainer.CellPadding = 0;

        switch (d[0][0].ToString())
        {
        case "1":
            AddCompetencyBlock("Competencias FEMSA", true);
            break;

        default:
            string blocks = "1|2|3|4|5|";
            if ((!setCompetency) && blocks.IndexOf(d[0][0].ToString() + "|", 0) == -1)
            {
                setCompetency = true;
                AddCompetencyBlock("Competencias Funcionales", false);
            }
            break;
        }

        Build(d, tblLeft, tblRight);

        pnlLeft.Controls.Add(tblLeft);
        pnlLeft.Attributes.Add("class", "pnlL");
        pnlRight.Attributes.Add("class", "pnlR");
        pnlRight.Controls.Add(tblRight);

        tblCellLeft.VerticalAlign   = VerticalAlign.Top;
        tblCellLeft.HorizontalAlign = HorizontalAlign.Left;
        tblCellLeft.Controls.Add(pnlLeft);
        tblCellRight.Controls.Add(pnlRight);
        tblRow.Cells.AddRange(new TableCell[] { tblCellLeft, tblCellRight });

        tblContainer.Rows.Add(tblRow);

        this.Controls.Add(tblContainer);

        AddSeparator();

        tblLeft.Dispose();
        tblRight.Dispose();
        pnlLeft.Dispose();
        pnlRight.Dispose();
        tblCellLeft.Dispose();
        tblCellRight.Dispose();
        tblRow.Dispose();
        tblContainer.Dispose();
    }
Exemplo n.º 16
0
    public void Build()
    {
        string username = UserHelper.GetUserId(Request.LogonUserIdentity.Name);
        string group    = string.Empty;
        string name     = string.Empty;
        bool   pendings = false;

        SqlDataReader myReader = SQLHelper.ExecuteReader(Cache["ApplicationDatabase"].ToString(), "GetEvaluatedPeople", new object[] { username });

        #region SelfEvaluation
        DataTable dt     = new DataTable();
        clsDAO    objDAO = new clsDAO();
        dt = objDAO.SqlCall("GetSelfEvaluationAllowance '" + username + "'");
        if (dt.Rows.Count > 0)
        {
            TblSelfEvaluation.Visible = true;

            TableRow  tblRowGroup   = new TableRow();
            TableCell tblCellGroup  = new TableCell();
            TableCell tblCellButton = new TableCell();
            Button    button        = new Button();

            button.Text = "Autoevaluación";
            button.Attributes.Add("class", "btn");
            button.PostBackUrl      = Server.HtmlEncode("~/EvaluationFormSelf.aspx?.=" + Server.UrlEncode(Encryption.Encrypt(dt.Rows[0][2].ToString() + ".0.0." + dt.Rows[0][0].ToString())));
            tblCellGroup.Text       = dt.Rows[0][1].ToString();
            tblCellGroup.ColumnSpan = 4;
            tblCellGroup.Attributes.Add("class", "td06");
            tblRowGroup.Cells.Add(tblCellGroup);
            tblRowGroup.Cells.Add(tblCellButton);
            tblCellButton.Controls.Add(button);
            tblCellButton.Attributes.Add("class", "td06");
            tblCellButton.ColumnSpan = 2;
            TblSelfEvaluation.Rows.Add(tblRowGroup);
            tblCellGroup.Dispose();
            tblCellButton.Dispose();
            tblRowGroup.Dispose();
            button.Dispose();
        }
        #endregion

        #region Evaluator
        int c = 0;
        Tbl1.Visible = (myReader.HasRows);

        while (myReader.Read())
        {
            pendings = true;
            if (group != myReader.GetValue(0).ToString())
            {
                TableRow  tblRowGroup   = new TableRow();
                TableCell tblCellGroup  = new TableCell();
                TableCell tblCellButton = new TableCell();
                Button    button        = new Button();

                bool _status = ("1,2,5,8,11".IndexOf(myReader[8].ToString(), 0) >= 0);

                DataSet myReaderEnabled = SQLHelper.ExecuteDataset(Cache["ApplicationDatabase"].ToString(), "GetAssessmentAccesibility", new object[] { username });

                if (myReaderEnabled.Tables[0].Rows[0].ItemArray[0].ToString() == "1" || myReaderEnabled.Tables[0].Rows[0].ItemArray[0].ToString() == "5")
                {
                    button.Visible = true;
                }
                else
                {
                    button.Visible = false;
                }

                button.Text    = (_status) ? "Evaluar" : "Visualizar";
                button.ToolTip = ((_status) ? "Evalua" : "Visualiza") + " las personas del " + myReader.GetValue(0).ToString();
                button.Attributes.Add("class", "btn");
                button.PostBackUrl      = Server.HtmlEncode("~/EvaluationForm.aspx?.=" + Server.UrlEncode(Encryption.Encrypt(myReader.GetValue(6).ToString() + ".1." + myReader[8].ToString())));
                tblCellGroup.Text       = myReader.GetValue(0).ToString();
                tblCellGroup.ColumnSpan = 4;
                tblCellGroup.Attributes.Add("class", "td06");
                tblRowGroup.Cells.Add(tblCellGroup);
                tblRowGroup.Cells.Add(tblCellButton);
                tblCellButton.Controls.Add(button);
                tblCellButton.Attributes.Add("class", "td06");
                tblCellButton.ColumnSpan = 2;
                Tbl1.Rows.Add(tblRowGroup);
                tblCellGroup.Dispose();
                tblCellButton.Dispose();
                tblRowGroup.Dispose();
                button.Dispose();
            }

            TableRow tblRow = new TableRow();


            TableCell   tblCellImg = new TableCell();
            ImageButton img        = new ImageButton();

            //if (((decimal)myReader[7] != 10))
            //{
            img.ID       = c.ToString();
            img.ImageUrl = "~/App_Images/search.jpg";
            img.ToolTip  = "Ver solo esta evaluación";
            c++;
            img.PostBackUrl  = Server.HtmlEncode("~/EvaluationForm.aspx?.=" + Server.UrlEncode(Encryption.Encrypt(myReader[6].ToString() + ".1." + myReader[7].ToString() + "." + myReader[9].ToString())));
            tblCellImg.Width = 16;
            tblCellImg.Attributes.Add("class", "td02");
            tblCellImg.Controls.Add(img);
            img.Dispose();

            if ((decimal)myReader[7] == 10 || (decimal)myReader[7] == 12)
            {
                img    = new ImageButton();
                img.ID = c.ToString();
                c++;
                img.ImageUrl      = "~/App_Images/imp.gif";
                img.OnClientClick = "p(" + myReader[9].ToString() + ")";
                img.ToolTip       = "Imprimir Evaluación";
                tblCellImg.Controls.Add(img);
                img.Dispose();
                tblCellImg.Width = 38;
            }

            tblRow.Cells.Add(tblCellImg);
            tblCellImg.Dispose();
            //}
            //else
            //{

            //    img.ID = c.ToString();
            //    img.ImageUrl = "~/App_Images/imp.gif";
            //    img.OnClientClick = "p(" + myReader[9].ToString() + ")";
            //    img.ToolTip = "Imprimir Evaluación";
            //    c++;
            //    tblCellImg.Width = 16;
            //    tblCellImg.Attributes.Add("class", "td02");
            //    tblCellImg.Controls.Add(img);
            //    img.Dispose();
            //    tblRow.Cells.Add(tblCellImg);
            //    tblCellImg.Dispose();
            //}

            for (int i = 1; i < 6; i++)
            {
                TableCell tblCell = new TableCell();
                switch (i)
                {
                case 3:
                    tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase((i == 5) ? "" : myReader.GetValue(i).ToString().Trim().ToLower());
                    tblCell.Attributes.Add("class", "td02c");
                    break;

                case 4:
                    tblCell.Text = myReader.GetValue(i).ToString();
                    tblCell.Attributes.Add("class", "td02");
                    break;

                case 5:
                    tblCell.Attributes.Add("class", (i == 5) ? myReader.GetValue(i).ToString() : "td02");
                    break;

                default:
                    tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase((i == 5) ? "" : myReader.GetValue(i).ToString().Trim().ToLower());
                    tblCell.Attributes.Add("class", "td02");
                    break;
                }

                if (i == 1 && ((decimal)myReader[7] != 10))
                {
                    // tblCell.ColumnSpan = 2;
                }
                tblRow.Cells.Add(tblCell);
                tblCell.Dispose();
            }
            Tbl1.Rows.Add(tblRow);
            tblRow.Dispose();

            group = myReader.GetValue(0).ToString();
        }
        if (Tbl1.Visible)
        {
            AddSeparator(Tbl1);
        }
        ;
        #endregion

        #region Concurrent
        myReader.NextResult();
        Tbl2.Visible = (myReader.HasRows);
        name         = string.Empty;
        group        = string.Empty;
        while (myReader.Read())
        {
            pendings = true;
            if (name != myReader.GetValue(0).ToString())
            {
                TableRow  tblRowName  = new TableRow();
                TableCell tblCellName = new TableCell();
                tblCellName.Text       = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase("Evaluador: " + myReader.GetValue(0).ToString().Trim().ToLower());
                tblCellName.ColumnSpan = 6;
                tblCellName.Attributes.Add("class", "td06L");
                tblRowName.Cells.Add(tblCellName);
                Tbl2.Rows.Add(tblRowName);
                tblCellName.Dispose();
                tblRowName.Dispose();
                group = string.Empty;
            }

            if (group != myReader.GetValue(1).ToString())
            {
                TableRow  tblRowGroup   = new TableRow();
                TableCell tblCellGroup  = new TableCell();
                TableCell tblCellButton = new TableCell();
                Button    button        = new Button();
                button.Text    = "Aprobar/Rechazar";
                button.ToolTip = "Aprueba/Rechaza personas del " + myReader.GetValue(1).ToString();
                button.Attributes.Add("class", "btn");
                button.PostBackUrl      = Server.HtmlEncode("~/EvaluationForm.aspx?.=" + Server.UrlEncode(Encryption.Encrypt(myReader.GetValue(7).ToString() + ".2." + myReader[9].ToString())));
                tblCellGroup.Text       = myReader.GetValue(1).ToString();
                tblCellGroup.ColumnSpan = 4;
                tblCellGroup.Attributes.Add("class", "td06");
                tblRowGroup.Cells.Add(tblCellGroup);
                tblRowGroup.Cells.Add(tblCellButton);
                tblCellButton.Controls.Add(button);
                tblCellButton.Attributes.Add("class", "td06");
                tblCellButton.ColumnSpan = 2;
                Tbl2.Rows.Add(tblRowGroup);
                tblCellGroup.Dispose();
                tblCellButton.Dispose();
                tblRowGroup.Dispose();
                button.Dispose();
            }

            TableRow tblRow = new TableRow();
            for (int i = 2; i < 7; i++)
            {
                TableCell tblCell = new TableCell();

                switch (i)
                {
                case 4:
                    tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase((i == 6) ? "" : myReader.GetValue(i).ToString().Trim().ToLower());
                    tblCell.Attributes.Add("class", "td02c");
                    break;

                case 5:
                    tblCell.Text = myReader.GetValue(i).ToString();
                    tblCell.Attributes.Add("class", "td02");
                    break;

                case 6:
                    tblCell.Attributes.Add("class", (i == 6) ? myReader.GetValue(i).ToString() : "td02");
                    break;

                default:
                    tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase((i == 6) ? "" : myReader.GetValue(i).ToString().Trim().ToLower());
                    tblCell.Attributes.Add("class", "td02");
                    break;
                }
                if (i == 2)
                {
                    tblCell.ColumnSpan = 2;
                }
                tblRow.Cells.Add(tblCell);
                tblCell.Dispose();
            }
            Tbl2.Rows.Add(tblRow);
            tblRow.Dispose();

            name  = myReader.GetValue(0).ToString();
            group = myReader.GetValue(1).ToString();
        }
        if (Tbl2.Visible)
        {
            AddSeparator(Tbl2);
        }
        ;
        #endregion

        #region Double Report
        myReader.NextResult();
        Tbl3.Visible = (myReader.HasRows);
        name         = string.Empty;
        group        = string.Empty;
        while (myReader.Read())
        {
            pendings = true;
            if (name != myReader.GetValue(0).ToString())
            {
                TableRow  tblRowName  = new TableRow();
                TableCell tblCellName = new TableCell();
                tblCellName.Text       = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase("Evaluador: " + myReader.GetValue(0).ToString().Trim().ToLower());
                tblCellName.ColumnSpan = 6;
                tblCellName.Attributes.Add("class", "td06L");
                tblRowName.Cells.Add(tblCellName);
                Tbl3.Rows.Add(tblRowName);
                tblCellName.Dispose();
                tblRowName.Dispose();
                group = string.Empty;
            }

            if (group != myReader.GetValue(1).ToString())
            {
                TableRow  tblRowGroup   = new TableRow();
                TableCell tblCellGroup  = new TableCell();
                TableCell tblCellButton = new TableCell();
                Button    button        = new Button();
                button.Text    = "Aprobar/Rechazar";
                button.ToolTip = "Aprueba/Rechaza personas del " + myReader.GetValue(1).ToString();
                button.Attributes.Add("class", "btn");
                button.PostBackUrl      = Server.HtmlEncode("~/EvaluationForm.aspx?.=" + Server.UrlEncode(Encryption.Encrypt(myReader.GetValue(7).ToString() + ".3." + myReader[9].ToString())));
                tblCellGroup.Text       = myReader.GetValue(1).ToString();
                tblCellGroup.ColumnSpan = 4;
                tblCellGroup.Attributes.Add("class", "td06");
                tblRowGroup.Cells.Add(tblCellGroup);
                tblRowGroup.Cells.Add(tblCellButton);
                tblCellButton.Controls.Add(button);
                tblCellButton.Attributes.Add("class", "td06");
                tblCellButton.ColumnSpan = 2;
                Tbl3.Rows.Add(tblRowGroup);
                tblCellGroup.Dispose();
                tblCellButton.Dispose();
                tblRowGroup.Dispose();
                button.Dispose();
            }

            TableRow tblRow = new TableRow();
            for (int i = 2; i < 7; i++)
            {
                TableCell tblCell = new TableCell();
                switch (i)
                {
                case 4:
                    tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase((i == 6) ? "" : myReader.GetValue(i).ToString().Trim().ToLower());
                    tblCell.Attributes.Add("class", "td02c");
                    break;

                case 5:
                    tblCell.Text = myReader.GetValue(i).ToString();
                    tblCell.Attributes.Add("class", "td02");
                    break;

                case 6:
                    tblCell.Attributes.Add("class", (i == 6) ? myReader.GetValue(i).ToString() : "td02");
                    break;

                default:
                    tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase((i == 6) ? "" : myReader.GetValue(i).ToString().Trim().ToLower());
                    tblCell.Attributes.Add("class", "td02");
                    break;
                }
                if (i == 2)
                {
                    tblCell.ColumnSpan = 2;
                }
                tblRow.Cells.Add(tblCell);
                tblCell.Dispose();
            }
            Tbl3.Rows.Add(tblRow);
            tblRow.Dispose();

            name  = myReader.GetValue(0).ToString();
            group = myReader.GetValue(1).ToString();
        }
        if (Tbl3.Visible)
        {
            AddSeparator(Tbl3);
        }
        ;
        #endregion

        #region HHRR
        myReader.NextResult();
        Tbl4.Visible = (myReader.HasRows);
        name         = string.Empty;
        group        = string.Empty;
        while (myReader.Read())
        {
            pendings = true;
            if (name != myReader.GetValue(0).ToString())
            {
                TableRow  tblRowName  = new TableRow();
                TableCell tblCellName = new TableCell();
                tblCellName.Text       = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase("Evaluador: " + myReader.GetValue(0).ToString().Trim().ToLower());
                tblCellName.ColumnSpan = 6;
                tblCellName.Attributes.Add("class", "td06L");
                tblRowName.Cells.Add(tblCellName);
                Tbl4.Rows.Add(tblRowName);
                tblCellName.Dispose();
                tblRowName.Dispose();
                group = string.Empty;
            }

            if (group != myReader.GetValue(1).ToString())
            {
                TableRow  tblRowGroup   = new TableRow();
                TableCell tblCellGroup  = new TableCell();
                TableCell tblCellButton = new TableCell();
                Button    button        = new Button();
                button.Text    = "Aprobar/Rechazar";
                button.ToolTip = "Aprueba/Rechaza personas del " + myReader.GetValue(1).ToString();
                button.Attributes.Add("class", "btn");
                button.PostBackUrl      = Server.HtmlEncode("~/EvaluationForm.aspx?.=" + Server.UrlEncode(Encryption.Encrypt(myReader.GetValue(7).ToString() + ".5." + myReader[9].ToString())));
                tblCellGroup.Text       = myReader.GetValue(1).ToString();
                tblCellGroup.ColumnSpan = 4;
                tblCellGroup.Attributes.Add("class", "td06");
                tblRowGroup.Cells.Add(tblCellGroup);
                tblRowGroup.Cells.Add(tblCellButton);
                tblCellButton.Controls.Add(button);
                tblCellButton.Attributes.Add("class", "td06");
                tblCellButton.ColumnSpan = 2;
                Tbl4.Rows.Add(tblRowGroup);
                tblCellGroup.Dispose();
                tblCellButton.Dispose();
                tblRowGroup.Dispose();
                button.Dispose();
            }

            TableRow tblRow = new TableRow();
            for (int i = 2; i < 7; i++)
            {
                TableCell tblCell = new TableCell();
                switch (i)
                {
                case 4:
                    tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase((i == 6) ? "" : myReader.GetValue(i).ToString().Trim().ToLower());
                    tblCell.Attributes.Add("class", "td02c");
                    break;

                case 5:
                    tblCell.Text = myReader.GetValue(i).ToString();
                    tblCell.Attributes.Add("class", "td02");
                    break;

                case 6:
                    tblCell.Attributes.Add("class", (i == 6) ? myReader.GetValue(i).ToString() : "td02");
                    break;

                default:
                    tblCell.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase((i == 6) ? "" : myReader.GetValue(i).ToString().Trim().ToLower());
                    tblCell.Attributes.Add("class", "td02");
                    break;
                }
                if (i == 2)
                {
                    tblCell.ColumnSpan = 2;
                }
                tblRow.Cells.Add(tblCell);
                tblCell.Dispose();
            }
            Tbl4.Rows.Add(tblRow);
            tblRow.Dispose();

            name  = myReader.GetValue(0).ToString();
            group = myReader.GetValue(1).ToString();
        }
        if (Tbl4.Visible)
        {
            AddSeparator(Tbl4);
        }
        ;
        #endregion

        myReader.Close();

        QD.Visible = pendings;

        if (!pendings)
        {
            NB.Text    = "Usted no posee evaluaciones pendientes.";
            NB.Visible = true;
        }
    }
Exemplo n.º 17
0
        protected virtual void PrepareControlHierarchy()
        {
            switch (_enumPreViewPosition)
            {
            case PreViewPosition.Top:
                TableRow  rowPreview  = new TableRow();
                TableCell cellPreview = new TableCell();
                cellPreview.ColumnSpan = 2;
                cellPreview.Controls.Add(_imgPreView);
                rowPreview.Cells.Add(cellPreview);
                cellPreview.Dispose();   //释放资源
                Controls.Add(rowPreview);
                rowPreview.Dispose();    //释放资源

                TableRow  rowUpload          = new TableRow();
                TableCell cellUploadSelector = new TableCell();
                cellUploadSelector.Controls.Add(_fileUpload);
                rowUpload.Cells.Add(cellUploadSelector);
                cellUploadSelector.Dispose();    //释放资源

                TableCell cellSaveButton = new TableCell();
                cellSaveButton.Controls.Add(_btnSave);
                rowUpload.Cells.Add(cellSaveButton);
                cellSaveButton.Dispose();    //释放资源
                Controls.Add(rowUpload);

                rowUpload.Dispose();    //释放资源
                break;

            case PreViewPosition.Right:
                TableRow  rowUpload1          = new TableRow();
                TableCell cellUploadSelector1 = new TableCell();
                cellUploadSelector1.Controls.Add(_fileUpload);
                rowUpload1.Cells.Add(cellUploadSelector1);
                cellUploadSelector1.Dispose();    //释放资源

                TableCell cellSaveButton1 = new TableCell();
                cellSaveButton1.Controls.Add(_btnSave);
                rowUpload1.Cells.Add(cellSaveButton1);
                cellSaveButton1.Dispose();    //释放资源
                Controls.Add(rowUpload1);

                TableCell cellPreview1 = new TableCell();
                cellPreview1.Controls.Add(_imgPreView);
                rowUpload1.Cells.Add(cellPreview1);
                cellPreview1.Dispose();    //释放资源
                Controls.Add(rowUpload1);

                rowUpload1.Dispose();    //释放资源
                break;

            case PreViewPosition.Bottom:
                TableRow  rowUpload2          = new TableRow();
                TableCell cellUploadSelector2 = new TableCell();
                cellUploadSelector2.Controls.Add(_fileUpload);
                rowUpload2.Cells.Add(cellUploadSelector2);
                cellUploadSelector2.Dispose();    //释放资源

                TableCell cellSaveButton2 = new TableCell();
                cellSaveButton2.Controls.Add(_btnSave);
                rowUpload2.Cells.Add(cellSaveButton2);
                cellSaveButton2.Dispose();    //释放资源
                Controls.Add(rowUpload2);

                rowUpload2.Dispose();    //释放资源

                TableRow  rowPreview2  = new TableRow();
                TableCell cellPreview2 = new TableCell();
                cellPreview2.ColumnSpan = 2;
                cellPreview2.Controls.Add(_imgPreView);
                rowPreview2.Cells.Add(cellPreview2);
                cellPreview2.Dispose();   //释放资源
                Controls.Add(rowPreview2);
                rowPreview2.Dispose();    //释放资源
                break;

            case PreViewPosition.Left:
                TableRow rowUpload3 = new TableRow();

                TableCell cellPreview3 = new TableCell();
                cellPreview3.Controls.Add(_imgPreView);
                rowUpload3.Cells.Add(cellPreview3);
                cellPreview3.Dispose();    //释放资源
                Controls.Add(rowUpload3);

                TableCell cellUploadSelector3 = new TableCell();
                cellUploadSelector3.Controls.Add(_fileUpload);
                rowUpload3.Cells.Add(cellUploadSelector3);
                cellUploadSelector3.Dispose();    //释放资源

                TableCell cellSaveButton3 = new TableCell();
                cellSaveButton3.Controls.Add(_btnSave);
                rowUpload3.Cells.Add(cellSaveButton3);
                cellSaveButton3.Dispose();    //释放资源
                Controls.Add(rowUpload3);

                rowUpload3.Dispose();    //释放资源
                break;

            default:
                TableRow  rowUpload4          = new TableRow();
                TableCell cellUploadSelector4 = new TableCell();
                cellUploadSelector4.Controls.Add(_fileUpload);
                rowUpload4.Cells.Add(cellUploadSelector4);
                cellUploadSelector4.Dispose();    //释放资源

                TableCell cellSaveButton4 = new TableCell();
                cellSaveButton4.Controls.Add(_btnSave);
                rowUpload4.Cells.Add(cellSaveButton4);
                cellSaveButton4.Dispose();    //释放资源
                Controls.Add(rowUpload4);

                TableCell cellPreview4 = new TableCell();
                cellPreview4.Controls.Add(_imgPreView);
                rowUpload4.Cells.Add(cellPreview4);
                cellPreview4.Dispose();    //释放资源
                Controls.Add(rowUpload4);

                rowUpload4.Dispose();    //释放资源
                break;
            }
        }
Exemplo n.º 18
0
    private void Build(object[] d)
    {
        string _style  = "";
        string tmpText = "";
        int    color   = 0;
        Table  tbl     = new Table();

        tbl.Attributes.Add("width", "100%");
        tbl.BorderWidth = 0;
        tbl.CellSpacing = 1;
        tbl.CellPadding = 0;
        tbl.ID          = "tbl_" + tblID.ToString();

        TableRow  tblRowEvaluated  = new TableRow();
        TableCell tblCellEvaluated = new TableCell();

        tblCellEvaluated.Text       = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(d[1].ToString().Trim().ToLower());
        tblCellEvaluated.ColumnSpan = 2;
        tblCellEvaluated.Attributes.Add("class", "td01");
        tblRowEvaluated.Cells.Add(tblCellEvaluated);
        tbl.Rows.Add(tblRowEvaluated);
        tblCellEvaluated.Dispose();
        tblRowEvaluated.Dispose();

        TableRow  tblRowAclaracionCompetencias  = new TableRow();
        TableCell tblCellAclaracionCompetencias = new TableCell();

        tblCellAclaracionCompetencias.Text      = "Por favor, seleccionar 2 competencias que usted considera que el colaborador debería desarrollar y la forma en que podría mejorarlas.";
        tblCellAclaracionCompetencias.ForeColor = System.Drawing.Color.Red;
        tblRowAclaracionCompetencias.Cells.Add(new TableCell());
        tblRowAclaracionCompetencias.Cells.Add(tblCellAclaracionCompetencias);

        TableRow tblRow0 = new TableRow();
        TableRow tblRow1 = new TableRow();
        TableRow tblRow2 = new TableRow();
        TableRow tblRow3 = new TableRow();
        TableRow tblRow4 = new TableRow();

        TableCell tblCell01 = new TableCell();
        TableCell tblCell02 = new TableCell();

        DataTable dtCompetencies = new clsDAO().SqlCall("[GetCompetenciesImprovement] '" + d[0].ToString() + "'");

        DropDownList ddl1 = new DropDownList();

        ddl1.Attributes["onchange"] = "_k(event, '" + tbl.ClientID + "')";
        ddl1.Enabled = (d[8].ToString() == "t") ? true : false;
        ddl1.Items.Add("<< Seleccione una competencia a mejorar >>");
        foreach (DataRow dr in dtCompetencies.Rows)
        {
            ddl1.Items.Add(new ListItem(dr[1].ToString(), dr[0].ToString()));
        }
        ddl1.SelectedValue = d[2].ToString();
        if (ddl1.SelectedIndex > 0)
        {
            color++;
        }
        tblCell02.Controls.Add(ddl1);

        DropDownList ddl2 = new DropDownList();

        ddl2.Attributes["onchange"] = "_k(event, '" + tbl.ClientID + "')";
        ddl2.Enabled = (d[8].ToString() == "t") ? true : false;
        ddl2.Items.Add("<< Seleccione una competencia a mejorar >>");
        foreach (DataRow dr in dtCompetencies.Rows)
        {
            ddl2.Items.Add(new ListItem(dr[1].ToString(), dr[0].ToString()));
        }
        ddl2.SelectedValue = d[4].ToString();
        if (ddl2.SelectedIndex > 0 && ddl1.SelectedIndex != ddl2.SelectedIndex)
        {
            color++;
        }
        tblCell02.Controls.Add(ddl2);


        TableCell tblCell1 = new TableCell();
        TableCell tblCell2 = new TableCell();
        TableCell tblCell3 = new TableCell();

        tblCell2.Text = "Qué mejorar";
        tblCell3.Text = "Cómo";
        tblCell2.Attributes.Add("class", "td03");
        tblCell3.Attributes.Add("class", "td03");

        TableCell tblCell11 = new TableCell();
        TableCell tblCell21 = new TableCell();
        TableCell tblCell31 = new TableCell();

        tblCell11.Width = 200;
        //tblCell2.Width = Unit.Percentage(40);
        //tblCell3.Width = Unit.Percentage(40);

        //tblCell11.Text = "70%  On The Job";
        //tblCell11.ToolTip = "ON THE JOB:\n1.Enriquecimiento de las responsabilidades.\n2.Rotación en el trabajo, ampliación del puesto.\n3.Asignaciones a proyectos desafiantes.\n4.Transferencias laterales o asignaciones especiales.\n5.Dar oportunidad para hacer presentaciones y luego exponerlas.\n6.Involucramiento en reuniones, juntas, discusiones, etc.\n7.Liderar como instructor, capacitar a otros, etc.\n8.Sesiones especiales de feedback.\nCOMPLEMENTARIAS:\n9.Células de entrenamiento.\n10.Investigación. Aprendizaje del mercado.\n11.Autoestudio.\n12.Bench de prácticas.\n13.Programas institucionales.\n14.Círculo de aprendizaje con otros pares.";
        HyperLink lnk = new HyperLink();

        lnk.Text        = "70%  On The Job";
        lnk.NavigateUrl = "~/img/On The Job.jpg";
        lnk.Target      = "blank";
        lnk.ForeColor   = System.Drawing.Color.Black;
        tblCell11.Controls.Add(lnk);

        tblCell11.Attributes.Add("class", "td03");
        tblCell21.Attributes.Add("class", "td02");
        tblCell31.Attributes.Add("class", "td02");

        TextBox txt11 = new TextBox();

        txt11.Text = d[3].ToString();
        tmpText    = System.Text.RegularExpressions.Regex.Replace(txt11.Text, @"[^0-9a-zA-Z]+", "").Trim();
        if (tmpText.Length > 2 || tmpText.Equals("NA"))
        {
            color++;
        }
        ;
        txt11.Attributes["class"]   = "tM";
        txt11.Attributes["onblur"]  = "_o(this, '" + tbl.ClientID + "')";
        txt11.Attributes["onfocus"] = "_i(this)";
        txt11.Attributes["onkeyup"] = "_k(event, '" + tbl.ClientID + "')";
        txt11.Rows     = 3;
        txt11.TextMode = TextBoxMode.MultiLine;
        txt11.Width    = Unit.Percentage(99);
        txt11.ReadOnly = (d[8].ToString() == "t") ? false : true;
        txt11.SkinID   = d[0].ToString();
        tblCell31.Controls.Add(txt11);

        TableCell tblCell111 = new TableCell();
        TableCell tblCell211 = new TableCell();
        TableCell tblCell311 = new TableCell();

        tblCell111.Width = 100;

        HyperLink lnk2 = new HyperLink();

        lnk2.Text        = "20%  Coaching";
        lnk2.NavigateUrl = "~/img/Coaching.jpg";
        lnk2.Target      = "blank";
        lnk2.ForeColor   = System.Drawing.Color.Black;
        tblCell111.Controls.Add(lnk2);

        tblCell111.Attributes.Add("class", "td03");
        tblCell211.Attributes.Add("class", "td02");
        tblCell311.Attributes.Add("class", "td02");

        TextBox txt21 = new TextBox();

        txt21.Text = d[5].ToString();
        tmpText    = System.Text.RegularExpressions.Regex.Replace(txt21.Text, @"[^0-9a-zA-Z]+", "").Trim();
        if (tmpText.Length > 2 || tmpText.Equals("NA"))
        {
            color++;
        }
        ;
        txt21.Attributes["class"]   = "tM";
        txt21.Attributes["onblur"]  = "_o(this, '" + tbl.ClientID + "')";
        txt21.Attributes["onfocus"] = "_i(this)";
        txt21.Attributes["onkeyup"] = "_k(event, '" + tbl.ClientID + "')";
        txt21.Rows     = 3;
        txt21.TextMode = TextBoxMode.MultiLine;
        txt21.Width    = Unit.Percentage(99);
        txt21.ReadOnly = (d[8].ToString() == "t") ? false : true;
        txt21.SkinID   = d[0].ToString();
        tblCell311.Controls.Add(txt21);

        TableCell tblCell1111 = new TableCell();
        TableCell tblCell2111 = new TableCell();
        TableCell tblCell3111 = new TableCell();

        tblCell1111.Width = 100;

        HyperLink lnk3 = new HyperLink();

        lnk3.Text        = "10% Capacitación Formal";
        lnk3.NavigateUrl = "~/img/Capacitación.jpg";
        lnk3.Target      = "blank";
        lnk3.ForeColor   = System.Drawing.Color.Black;
        tblCell1111.Controls.Add(lnk3);

        tblCell1111.Attributes.Add("class", "td03");
        tblCell2111.Attributes.Add("class", "td02");
        tblCell3111.Attributes.Add("class", "td02");

        TextBox txt31 = new TextBox();

        txt31.Text = d[7].ToString();
        tmpText    = System.Text.RegularExpressions.Regex.Replace(txt31.Text, @"[^0-9a-zA-Z]+", "").Trim();
        if (tmpText.Length > 2 || tmpText.Equals("NA"))
        {
            color++;
        }
        ;
        txt31.Attributes["class"]   = "tM";
        txt31.Attributes["onblur"]  = "_o(this, '" + tbl.ClientID + "')";
        txt31.Attributes["onfocus"] = "_i(this)";
        txt31.Attributes["onkeyup"] = "_k(event, '" + tbl.ClientID + "')";
        txt31.Rows     = 3;
        txt31.TextMode = TextBoxMode.MultiLine;
        txt31.Width    = Unit.Percentage(99);
        txt31.ReadOnly = (d[8].ToString() == "t") ? false : true;
        txt31.SkinID   = d[0].ToString();
        tblCell3111.Controls.Add(txt31);

        //tblRow1.Cells.AddRange(new TableCell[] { tblCell1, tblCell2, tblCell3 });
        //tblRow2.Cells.AddRange(new TableCell[] { tblCell11, tblCell21, tblCell31 });
        //tblRow3.Cells.AddRange(new TableCell[] { tblCell111, tblCell211, tblCell311 });
        //tblRow4.Cells.AddRange(new TableCell[] { tblCell1111, tblCell2111, tblCell3111 });
        tblRow0.Cells.AddRange(new TableCell[] { tblCell01, tblCell02 });
        tblRow1.Cells.AddRange(new TableCell[] { tblCell1, tblCell3 });
        tblRow2.Cells.AddRange(new TableCell[] { tblCell11, tblCell31 });
        tblRow3.Cells.AddRange(new TableCell[] { tblCell111, tblCell311 });
        tblRow4.Cells.AddRange(new TableCell[] { tblCell1111, tblCell3111 });

        TableRow tblRowColor      = new TableRow();
        TableRow tblRowCursos     = new TableRow();
        TableRow tblRowAclaracion = new TableRow();

        TableCell tblCellColor  = new TableCell();
        TableCell tblCellColorL = new TableCell();

        tblCellColorL.ColumnSpan = 2;

        if (color == 5)
        {
            //Button btn = (Button)this.Page.Master.FindControl("CPH").FindControl("btnSend");
            //btn.Enabled = true;

            _style = "g";
        }
        else if (color == 0)
        {
            _style = "r";
        }
        else
        {
            _style = "y";
        }

        tblCellColorL.Attributes.Add("class", _style);


        //       tblCellColorL.ID = "C";
        tblRowColor.Cells.AddRange(new TableCell[] { tblCellColor, tblCellColorL });


        DataTable dt       = new clsDAO().SqlCall("[sp_GetAllRegistrationsData] '" + d[0].ToString() + "','" + System.Configuration.ConfigurationManager.AppSettings["Year"] + "'");
        TreeView  tvw      = new TreeView();
        TreeNode  tnCursos = new TreeNode("Cursos del empleado", "Cursos del empleado");

        if (dt.Rows.Count > 0)
        {
            tnCursos.SelectAction = TreeNodeSelectAction.Expand;
            tnCursos.Expanded     = false;
        }
        else
        {
            tnCursos = new TreeNode("Sin cursos en el período evaluado", "Sin cursos en el período evaluado");
            tnCursos.SelectAction = TreeNodeSelectAction.None;
            tnCursos.Expanded     = false;
        }

        tvw.Nodes.Add(tnCursos);

        foreach (DataRow dr in dt.Rows)
        {
            TreeNode tnCurso = new TreeNode(dr[0].ToString());
            tnCurso.SelectAction = TreeNodeSelectAction.None;
            tnCursos.ChildNodes.Add(tnCurso);
        }
        TableCell tblCellCursos = new TableCell();

        tblRowCursos.Controls.Add(tblCellCursos);
        tblCellCursos.Controls.Add(tvw);
        tblCellCursos.ColumnSpan = 2;

        Label lblAclaracion = new Label();

        lblAclaracion.Text      = "Para activar el botón ENVIAR tendrás que completar todos los campos de la Agenda de Desarrollo de tu colaborador.";
        lblAclaracion.ForeColor = System.Drawing.Color.Red;
        TableCell tblCellAclaracion = new TableCell();

        tblRowAclaracion.Controls.Add(tblCellAclaracion);
        tblCellAclaracion.Controls.Add(lblAclaracion);
        tblCellAclaracion.ColumnSpan = 2;

        TableRow tblRowSeguimiento = new TableRow();

        if (d[9].ToString().Equals("10") || d[9].ToString().Equals("12"))
        {
            TableCell tblCellSeguimiento = new TableCell();
            tblCellSeguimiento.ColumnSpan = 2;
            Label lblSeguimiento = new Label();
            lblSeguimiento.Text = "Añadir seguimiento de desarrollo";
            lblSeguimiento.Attributes.Add("class", "titulo");
            tblCellSeguimiento.Controls.Add(lblSeguimiento);
            TextBox txtSeguimiento = new TextBox();
            txtSeguimiento.Rows                  = 3;
            txtSeguimiento.TextMode              = TextBoxMode.MultiLine;
            txtSeguimiento.Width                 = Unit.Percentage(99);
            txtSeguimiento.ReadOnly              = false;
            txtSeguimiento.Attributes["class"]   = "Seg";
            txtSeguimiento.Attributes["onkeyup"] = "kSeg('" + tbl.ClientID + "')";
            txtSeguimiento.SkinID                = d[0].ToString();
            tblCellSeguimiento.Controls.Add(txtSeguimiento);
            DataTable dtSeguimiento = new DataTable();
            dtSeguimiento = new clsDAO().SqlCall("GetFollowupHistory " + d[0].ToString());
            if (dtSeguimiento.Rows.Count > 0)
            {
                Label lblHistorial = new Label();
                lblHistorial.Text = "Historial de seguimiento";
                lblHistorial.Attributes.Add("class", "titulo");
                tblCellSeguimiento.Controls.Add(lblHistorial);
                GridView gvSeguimiento = new GridView();
                gvSeguimiento.DataSource = dtSeguimiento;
                gvSeguimiento.DataBind();
                tblCellSeguimiento.Controls.Add(gvSeguimiento);
            }
            tblRowSeguimiento.Cells.Add(tblCellSeguimiento);
        }

        tbl.Rows.AddRange(new TableRow[] { tblRowAclaracionCompetencias, tblRow0, tblRow1, tblRow2, tblRow3, tblRow4, tblRowColor, tblRowAclaracion, tblRowCursos, tblRowSeguimiento });
        this.Controls.Add(tbl);
    }