Пример #1
0
        public void FillByTemplateGrid()
        {
            DataTable dt = VSWebBL.DashboardBL.mailFileBL.Ins.FillDBByTemplateGrid();

            dt.PrimaryKey = new DataColumn[] { dt.Columns["ID"] };
            ByTemplateGridView.DataSource = dt;
            ByTemplateGridView.DataBind();
            ((GridViewDataColumn)ByTemplateGridView.Columns["DesignTemplateName"]).GroupBy();
            Session["DBsByTemplate"] = dt;
        }
Пример #2
0
 protected void btnCollapse_Click(object sender, EventArgs e)
 {
     if (btnCollapse.Text == "Collapse All Rows")
     {
         ByTemplateGridView.CollapseAll();
         btnCollapse.Image.Url = "~/images/icons/add.png";
         btnCollapse.Text      = "Expand All Rows";
     }
     else
     {
         ByTemplateGridView.ExpandAll();
         btnCollapse.Image.Url = "~/images/icons/forbidden.png";
         btnCollapse.Text      = "Collapse All Rows";
     }
 }
Пример #3
0
 private void FillByTemplateGridFromSession()
 {
     try
     {
         DataTable dt = new DataTable();
         if (Session["DBsByTemplate"] != "" && Session["DBsByTemplate"] != null)
         {
             dt = (DataTable)Session["DBsByTemplate"];
         }
         if (dt.Rows.Count > 0)
         {
             ByTemplateGridView.DataSource = dt;
             ByTemplateGridView.DataBind();
         }
     }
     catch (Exception ex)
     {
         Log.Entry.Ins.WriteHistoryEntry(DateTime.Now.ToString() + " Exception - " + ex);
         throw ex;
     }
     finally { }
 }