Example #1
0
        /// <summary>
        /// Listare tipuri de variabile globale
        /// </summary>
        public void ListareTipuriVariabileGlobale()
        {
            try
            {
                TableRow  myRow  = new TableRow();
                TableCell myCell = new TableCell();

                //titlul de la listare
                myCell.CssClass        = "BigBlueBold";
                myCell.HorizontalAlign = HorizontalAlign.Center;
                myCell.VerticalAlign   = VerticalAlign.Middle;
                myCell.Text            = "Lista tipurilor de variabile globale existente";
                myCell.Height          = new Unit(50);
                myRow.Cells.Add(myCell);
                mainTable.Rows.Add(myRow);

                // lista de domenii de activitate existente
                myRow  = new TableRow();
                myCell = new TableCell();
                myCell.Attributes.Add("width", "100%");
                myCell.HorizontalAlign = HorizontalAlign.Center;
                myCell.VerticalAlign   = VerticalAlign.Top;
                Table listTable = new Table();

                string[] tableHeader = { "Cod", "Denumire", "Descriere" };
                string[] tableCols   = { "Cod", "Denumire", "Descriere" };

                VariabileGlobale objVariabileGlobale = new VariabileGlobale();
                ListTable        objListTable        = new ListTable(listTable, objVariabileGlobale.GetAllVariabileGloale(), tableHeader, tableCols);

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

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

                myCell.Controls.Add(listTable);
                myRow.Cells.Add(myCell);
                mainTable.Rows.Add(myRow);

                td_editLine.Visible = false;
                add_form.Style.Add("display", "none");
                btnEdit.Style.Add("display", "none");
                td_addLine.Visible     = true;
                add_buttonLine.Visible = true;
                tdTitle.InnerText      = "Adaugare tip de variabila globala nou";

                // in cazul in care era activat mesajul de avertizare, acesta trebuie dezactivat
                if (lblMessage.Visible == true)
                {
                    lblMessage.Visible = false;
                }
            }
            catch (Exception ex)
            {
                litError.Text  = "The following error occurred: <br>";
                litError.Text += ex.Message;
            }
        }