Exemple #1
0
        private void BindGrid2()
        {
            Grid2.DataSource = DataSourceUtil.GetClassDataTable();
            Grid2.DataBind();

            Grid2.SelectedRowIndex = 0;
        }
Exemple #2
0
        public ActionResult Grid2_RowSelect(string[] Grid1_fields, int selectedRowId)
        {
            DataTable classTable = DataSourceUtil.GetClassDataTable();

            UIHelper.Label("labelClassDesc").Text(GetClassDesc(selectedRowId, classTable));

            UIHelper.Grid("Grid1").DataSource(GetClassDetailTable(selectedRowId), Grid1_fields);

            return(UIHelper.Result());
        }
Exemple #3
0
        private void LoadData()
        {
            DataTable classTable    = DataSourceUtil.GetClassDataTable();
            int       selectedRowId = (int)classTable.Rows[0]["Id"];

            ViewBag.Grid2DataSource    = classTable;
            ViewBag.Grid2SelectedRowID = selectedRowId.ToString();
            ViewBag.SelectedClassDesc  = GetClassDesc(selectedRowId, classTable);

            ViewBag.Grid1DataSource = GetClassDetailTable(selectedRowId);
        }
Exemple #4
0
 private void UpdateClassDesc(int classId)
 {
     foreach (DataRow row in DataSourceUtil.GetClassDataTable().Rows)
     {
         int currentClassId = (int)row["Id"];
         if (classId == currentClassId)
         {
             labelClassDesc.Text = row["Desc"].ToString();
             break;
         }
     }
 }
Exemple #5
0
 private void UpdateClassDesc(int classId)
 {
     foreach (DataRow row in DataSourceUtil.GetClassDataTable().Rows)
     {
         int currentClassId = (int)row["Id"];
         if (classId == currentClassId)
         {
             labelClassDesc.Text = String.Format("<div style=\"margin-bottom:10px;\"><strong>班级描述:</strong></div><div>{0}</div>", row["Desc"].ToString());
             break;
         }
     }
 }