protected override Control GetTabControl(int setId, Control detailsControl) { var tabControl = ApplicationCommon.GetNewDetailTabControl(); var listControl = (Shared.UI.Web.Controls.DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); listControl.Setup("ActivityXDeliverableArtifact", "WBS", "ActivityXDeliverableArtifactId", setId, true, GetData, GetActivityXDeliverableArtifactColumns, "ActivityXDeliverableArtifact"); listControl.SetSession("true"); tabControl.Setup("ActivityDetailsView"); tabControl.AddTab("Activity", detailsControl, String.Empty, true); tabControl.AddTab("Deliverable Artifact", listControl); return(tabControl); }
protected override Control GetTabControl(int setId, Control updateControl) { var tabControl = ApplicationCommon.GetNewDetailTabControl(); var listControl = (DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); listControl.Setup("MilestoneXFeature", "Milestone", "MilestoneXFeatureId", setId, true, GetData, GetMilestoneXFeatureColumns, "MilestoneXFeature"); listControl.SetSession("true"); tabControl.Setup("MilestoneDetailsView"); tabControl.AddTab("Milestone", updateControl, String.Empty, true); tabControl.AddTab("MilestoneXFeature", listControl); return(tabControl); }
/// <summary> /// 初始化界面上的控件 /// </summary> private void InitAllControls() { try { Log.Info(GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //创建编辑用表 CreateDataTable(); } catch (Exception ex) { Log.Error(GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
private Shared.UI.Web.Controls.DetailTab1Control GetVerticalTabControl(int setId, Control detailsControl) { var tabControl = ApplicationCommon.GetNewDetail1TabControl(); tabControl.AddTab("Report", detailsControl, "Report", false); var listControl = (Shared.UI.Web.Controls.DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); tabControl.AddTab("ReportXReportCategory", listControl, "ReportXReportCategory"); listControl.Setup("ReportXReportCategory", String.Empty, "ReportXReportCategoryId", setId, true, GetData, GetReportXReportCategoryColumns, "ReportXReportCategory"); listControl.SetSession("true"); return(tabControl); }
public int GenerateSuperKey(string Ids) { int superKeyId = 0; if (!string.IsNullOrEmpty(Ids)) { var ids = Ids.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); var systemEntityTypeId = (int)SystemEntity.ReleaseNoteDeveloperValue; superKeyId = ApplicationCommon.GenerateSuperKey(UIHelper.ArrayToCollection(ids), systemEntityTypeId); } return(superKeyId); }
/// <summary> /// 填充所有可选列 /// </summary> public void FillAllSelectedControls() { try { Log.Info(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); lueRole.Properties.DataSource = _bllSystemRole.GetAllList().Tables[0]; lueRole.Properties.DisplayMember = "F_ROLE_NAME"; lueRole.Properties.ValueMember = "F_ROLE_ID"; } catch (Exception ex) { Log.Error(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
/// <summary> /// 窗口载入事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmAuth_Load(object sender, EventArgs e) { try { Log.Info(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //初始化控件 InitAllControl(); } catch (Exception ex) { Log.Error(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
/// <summary> /// 显示相应的关系数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cbbDevType_SelectedIndexChanged(object sender, EventArgs e) { try { Log.Info(GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //绑定数据 BindRelatedDevices(); } catch (Exception ex) { Log.Error(GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
/// <summary> /// 初始化界面 /// </summary> public void InitAllControl() { try { Log.Info(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //填充用户信息 FillAllSelectedControls(); } catch (Exception ex) { Log.Error(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); PrimaryEntity = Framework.Components.DataAccess.SystemEntity.TaskEntity; GenericControlPath = ApplicationCommon.GetControlPath("TaskEntity", ControlType.GenericControl); PrimaryPlaceHolder = plcUpdateList; PrimaryEntityKey = "TaskEntity"; BreadCrumbObject = Master.BreadCrumbObject; BtnUpdate = btnUpdate; BtnClone = btnClone; BtnCancel = btnCancel; }
/// <summary> /// 绑定数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gvList_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { try { Log.Info(GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //绑定数据 BindRelatedDevices(); } catch (Exception ex) { Log.Error(GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); PrimaryEntity = SystemEntity.ClientXProject; GenericControlPath = ApplicationCommon.GetControlPath("ClientXProject", ControlType.GenericControl); PrimaryPlaceHolder = plcUpdateList; PrimaryEntityKey = "ClientXProject"; BreadCrumbObject = Master.BreadCrumbObject; BtnUpdate = btnUpdate; BtnClone = btnClone; BtnCancel = btnCancel; }
/// <summary> /// bind to every menuitem click event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormButtonClick(object sender, EventArgs e) { if (sender is SimpleButton) { Form findForm = (sender as SimpleButton).FindForm(); if (findForm != null) { string modelName = findForm.Text; modelName += "->" + (sender as SimpleButton).Text; ApplicationCommon.WriteApplicationLogs(modelName); } } }
protected override Control GetTabControl(int setId, Control detailsControl) { var tabControl = ApplicationCommon.GetNewDetailTabControl(); var listControl = (Shared.UI.Web.Controls.DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); listControl.Setup("ProductivityAreaFeature", String.Empty, "ProductivityAreaFeatureId", setId, true, GetData, GetProductivityAreaFeatureColumns, "ProductivityAreaFeature"); listControl.SetSession("true"); tabControl.Setup("ProductivityAreaFeatureDetailsView"); tabControl.AddTab("Productivity Area", detailsControl, String.Empty, true); tabControl.AddTab("Productivity Area Feature", listControl); return(tabControl); }
/// <summary> /// 窗体载入事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmPowerBaseInfo_Load(object sender, EventArgs e) { try { Log.Info(GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //get data from database InitAllControls(); } catch (Exception ex) { Log.Error(GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
/// <summary> /// 窗体载入事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FrmCommandStartPar_Load(object sender, EventArgs e) { try { Log.Info(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //get data from database BindGridview(); } catch (Exception ex) { Log.Error(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
/// <summary> /// 永久删除一条数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnDelete_Click(object sender, EventArgs e) { try { Log.Info(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //删除前判断 DialogResult dialogResult = XtraMessageBox.Show("此操作将永久删除数据并有可能导致其他关联数据出错,是否继续?", "选择", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialogResult == DialogResult.No) { return; } //检查必填字段 bool isAllOk = CheckNotNullField(); if (!isAllOk) { return; } //准备要存储的数据 ModelCOM_SETTINGS modelCom232Settings = PrepaireModelCOM232_SETTINGS(); //更新数据 bool status = _bllComSettings.Drop(modelCom232Settings.F_WORKSTATION_ID, modelCom232Settings.F_COM_CODE); //绑定数据 BindGridview(); if (status) { XtraMessageBox.Show("此数据已禁用。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); //刷新数据 gvList_RowClick(this, null); } else { XtraMessageBox.Show("没有数据被更新。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { Log.Error(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
/// <summary> /// 启动其中的一条记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEnabled_Click(object sender, EventArgs e) { try { Log.Info(GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //检查必填字段 bool isAllOk = CheckNotNullField(); if (!isAllOk) { return; } //准备要存储的数据 ModelDEV_SENSOR_INFO modelSensorInfo = PrepareSensorInfo(); //更新数据 bool status = _bllSensorInfo.Enabled(modelSensorInfo.F_SENSOR_ID); //获得当前rowhandle int rowhandle = gvList.FocusedRowHandle; //绑定数据 BindGridview(); //设置焦点行 gvList.FocusedRowHandle = rowhandle; if (status) { XtraMessageBox.Show("此数据已启用。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); //刷新数据 gvList_RowClick(this, null); } else { XtraMessageBox.Show("没有数据被更新。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { Log.Error(GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
//public DataSet GetCioAnalysisData(string projectid) //{ // DataSet dsCioAnalysisData = new DataSet(); // try // { // var connectionString = ApplicationCommon.GetConnectionString("BW"); // const string sqlCommand = StoredProcedures.SpSelectCioAnalysis; // SqlParameter[] paramCollection = new SqlParameter[1]; // paramCollection[0] = new SqlParameter(); // paramCollection[0].SqlDbType = SqlDbType.VarChar; // paramCollection[0].ParameterName = "@PROJECT_ID"; // paramCollection[0].Value = projectid; // dsCioAnalysisData = _objDa.ExecuteQuery(sqlCommand, CommandType.StoredProcedure, paramCollection, connectionString); // } // catch (Exception ex) // { // errlog.Log("BW", "Error", ex.Message, "ModelClass", "GetCioAnalysisData"); // } // return dsCioAnalysisData; //} public List <KFIOAnalysis> GetKeyFigureAnalysisData(string projectId) { List <KFIOAnalysis> lstKfioAnalysisData = new List <KFIOAnalysis>(); try { //var lstKfioAnalysis = new List<KFIOAnalysis>(); var lstKfioMode = new List <KFIOMode>(); var lstKfioException = new List <KFIOException>(); DataSet dsKfioAnalysisData = new DataSet(); var connectionString = ApplicationCommon.GetConnectionString("BW"); const string sqlCommand = StoredProcedures.SpSelectKeyFigureAnalysis; SqlParameter[] paramCollection = new SqlParameter[1]; paramCollection[0] = new SqlParameter(); paramCollection[0].SqlDbType = SqlDbType.VarChar; paramCollection[0].ParameterName = "@PROJECT_ID"; paramCollection[0].Value = projectId; dsKfioAnalysisData = _objDa.ExecuteQuery(sqlCommand, CommandType.StoredProcedure, paramCollection, connectionString); if (dsKfioAnalysisData != null && dsKfioAnalysisData.Tables.Count > 0) { lstKfioMode = dsKfioAnalysisData.Tables[0].AsEnumerable().Select( dataRow => new KFIOMode { RowCount = dataRow.Field <int>("Row_Count"), Mode = dataRow.Field <string>("Mode") }).ToList(); //lstKfioAnalysisData.AddRange(lstKfioMode); //lstKfioException = dsKfioAnalysisData.Tables[1].AsEnumerable().Select( // dataRow => new KFIOException // { // KFExceptionAggregation = dataRow.Field<string>("KF_EXCEPTION_AGGREGATION"), // MaxCount = dataRow.Field<int>("MAX_COUNT") // }).ToList(); //lstKfioAnalysisData.Add(lstKfioException); } } catch (Exception ex) { errlog.Log("BW", "Error", ex.Message, "ModelClass", "GetKeyFigureAnalysisData"); } return(lstKfioAnalysisData); }
public FrmChangePassword() { try { Log.Info(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); InitializeComponent(); //初始化界面 InitAllControl(); } catch (Exception ex) { Log.Error(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
/// <summary> /// 参数类型变化 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void lueParameterType_EditValueChanged(object sender, EventArgs e) { try { Log.Info(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); BindGridview(); gvList_RowClick(this, null); } catch (Exception ex) { Log.Error(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
protected override Control GetTabControl(int setId, Control detailsControl) { var tabControl = ApplicationCommon.GetNewDetailTabControl(); var listControlUC = (Shared.UI.Web.Controls.DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); listControlUC.Setup("UseCaseXUseCaseStep", String.Empty, "UseCaseXUseCaseStepId", setId, true, GetData, GetUseCaseXUseCaseStepColumns, "UseCaseXUseCaseStep"); listControlUC.SetSession("true"); tabControl.Setup("UseCaseStepDetailsView"); tabControl.AddTab("UseCaseStep", detailsControl, String.Empty, true); tabControl.AddTab("UseCaseXUseCaseStep", listControlUC); return(tabControl); }
protected void AddUserLoginHistoryRecord() { var data = new UserLoginHistoryDataModel(); data.UserId = SessionVariables.RequestProfile.AuditId; data.UserName = ApplicationCommon.GetApplicationUserName(); data.URL = Page.AppRelativeVirtualPath; data.ServerName = Environment.MachineName; if (ApplicationCommon.ApplicationCache.ContainsKey(SessionVariables.SystemRequestProfile.ApplicationId)) { data.Application = ApplicationCommon.ApplicationCache[SessionVariables.SystemRequestProfile.ApplicationId].Name; } UserLoginHistoryDataManager.Create(data, SessionVariables.RequestProfile); }
/// <summary> /// 初始化界面上的控件 /// </summary> private void InitAllControls() { try { Log.Info(GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); FillAllSelectedControls(); BindGridview(); } catch (Exception ex) { Log.Error(GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
protected override Control GetTabControl(int setId, Control detailsControl) { var tabControl = ApplicationCommon.GetNewDetailTabControl(); var listControl = (DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); listControl.Setup("Project", String.Empty, "ProjectId", setId, true, GetData, GetClientColumns, "Project"); listControl.SetSession("true"); tabControl.Setup("ProjectDetailsView"); tabControl.AddTab("Project", detailsControl, String.Empty, true); tabControl.AddTab("Need", listControl); //var tabControl = ApplicationCommon.GetTabControl("Project", SetId, detailsControl, "ProjectDetailsView"); return(tabControl); }
protected override Control GetTabControl(int setId, Control detailsControl) { var tabControl = ApplicationCommon.GetNewDetailTabControl(); //var listControl = (Shared.UI.Web.Controls.DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); //listControl.Setup("Task", "WBS", "TaskId", setId, true, GetTaskData, GetTaskColumns, "Task"); //listControl.SetSession("true"); var bucketControlTask = ApplicationCommon.GetNewBucketControl(); bucketControlTask.ConfigureBucket("Task", setId, GetTaskList, GetAssociatedTasks, SaveByFeature); var listControlTF = (Shared.UI.Web.Controls.DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); listControlTF.Setup("TaskFormulation", "WBS", "TaskFormulationId", setId, true, GetTaskFormulationData, GetTaskFormulationColumns, "TaskFormulation"); listControlTF.SetSession("true"); //var listControlNF = (Shared.UI.Web.Controls.DetailsWithChildren)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); //listControlNF.Setup("NeedXFeature", String.Empty, "NeedXFeatureId", setId, true, GetData, GetNeedXFeatureColumns, "NeedXFeature"); //listControlNF.SetSession("true"); var bucketControlNeed = ApplicationCommon.GetNewBucketControl(); bucketControlNeed.ConfigureBucket("Need", setId, GetNeedList, GetAssociatedNeeds, SaveNeedXFeature); var listControlFF = (Shared.UI.Web.Controls.DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); listControlFF.Setup("FeatureXFeatureRule", String.Empty, "FeatureXFeatureRuleId", setId, true, GetFeatureXFeatureRuleData, GetFeatureXFeatureRuleColumns, "FeatureXFeatureRule"); listControlFF.SetSession("true"); //var listControlFG = (Shared.UI.Web.Controls.DetailsWithChildrenControl)Page.LoadControl(ApplicationCommon.DetailsWithChildrenListControl); //listControlFG.Setup("FeatureGroupXFeature", String.Empty, "FeatureGroupXFeatureId", setId, true, GetFeatureGroupXFeatureData, GetFeatureGroupXFeatureColumns, "FeatureGroupXFeature"); //listControlFG.SetSession("true"); var bucketControlFeatureGroup = ApplicationCommon.GetNewBucketControl(); bucketControlFeatureGroup.ConfigureBucket("FeatureGroup", ApplicationCommon.GetSetId(), GetFeatureGroupList, GetAssociatedFeatureGroups, SaveFeatureGroupXFeature); tabControl.Setup("FeatureDetailsView"); tabControl.AddTab("Feature", detailsControl, String.Empty, true); tabControl.AddTab("Task", bucketControlTask); tabControl.AddTab("Task Formulation", listControlTF); tabControl.AddTab("Need", bucketControlNeed); tabControl.AddTab("Feature Rule", listControlFF); tabControl.AddTab("Feature Group", bucketControlFeatureGroup); return(tabControl); }
/// <summary> /// 启用一条数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEnabled_Click(object sender, EventArgs e) { try { Log.Info(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //检查必填字段 bool isAllOk = CheckNotNullField(); if (!isAllOk) { return; } //准备要存储的数据 ModelTESTTASK_PARTYPE modelParameterMonitortype = PreapairModelParameterMonitortype(); //更新数据 bool status = _bllTesttaskPartype.Enabled(modelParameterMonitortype.F_TYPE_CODE); //获得当前rowhandle int rowhandle = gvList.FocusedRowHandle; //绑定数据 BindGridview(); //设置焦点行 gvList.FocusedRowHandle = rowhandle; if (status) { XtraMessageBox.Show("此数据已启用。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); //刷新数据 gvList_RowClick(this, null); } else { XtraMessageBox.Show("没有数据被更新。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { Log.Error(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
private void DataBind() { var data = new FieldConfigurationDataModel(); data.FieldConfigurationModeId = GetFCModeId(ddlView.SelectedValue); data.ApplicationId = Convert.ToInt32(ApplicationId); var dt = FieldConfigurationDataManager.CheckDefaultView(data, SessionVariables.RequestProfile); var GroupByField = drpGroupBy.SelectedValue; var tabControl = ApplicationCommon.GetNewDetailTabControl(); var distinctTabNames = (from row in dt.AsEnumerable() orderby row[GroupByField].ToString().Trim() select row[GroupByField].ToString().Trim()) .Distinct(StringComparer.CurrentCultureIgnoreCase).ToList(); foreach (var tabName in distinctTabNames) { var dtGroupingResult = dt.AsEnumerable().Where(t => t[GroupByField].ToString() == tabName).CopyToDataTable(); var totalRecordsInTab = dtGroupingResult.Rows.Count; var groupHeader = tabName; var strHeader = groupHeader + " (" + totalRecordsInTab.ToString(CultureInfo.InvariantCulture) + ")"; if (tabName == "True") { chkListDataWithview.DataSource = dtGroupingResult; chkListDataWithview.DataTextField = "EntityName"; chkListDataWithview.DataValueField = "EntityName"; chkListDataWithview.DataBind(); lblWithView.Text = strHeader; } else { chkListData.DataSource = dtGroupingResult; chkListData.DataTextField = "EntityName"; chkListData.DataValueField = "EntityName"; chkListData.DataBind(); lblView.Text = strHeader; } } }
/// <summary> /// 启用数据数据 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnEnabled_Click(object sender, EventArgs e) { try { Log.Info(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---START"); //检查必填字段 bool isAllOk = CheckNotNullField(); if (!isAllOk) { return; } //准备要存储的数据 ModelCOM_SETTINGS modelCom232Settings = PrepaireModelCOM232_SETTINGS(); //更新数据 bool status = _bllComSettings.Enabled(modelCom232Settings.F_WORKSTATION_ID, modelCom232Settings.F_COM_CODE); //获得当前rowhandle int rowhandle = gvList.FocusedRowHandle; //绑定数据 BindGridview(); //设置焦点行 gvList.FocusedRowHandle = rowhandle; if (status) { XtraMessageBox.Show("此数据已启用。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); //刷新数据 gvList_RowClick(this, null); } else { XtraMessageBox.Show("没有数据被更新。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { Log.Error(this.GetType() + "->" + ApplicationCommon.GetMethodName() + "---FAILED", ex); throw ex; } }
protected void GetTabControl() { var tabControl = ApplicationCommon.GetNewDetailTabControl(); tabControl.Setup("ScheduleDetailView"); var selected = false; if (string.IsNullOrEmpty(Request.QueryString["tab"]) || Request.QueryString["tab"] == "1") { selected = true; } var divGrid = new HtmlGenericControl("div"); divGrid.Attributes.Add("style", "padding:30px;"); divGrid.Controls.Add(plcGroupByHolder); divGrid.Controls.Add(GrdParentGrid); tabControl.AddTab("Schedule Detail", divGrid, String.Empty, selected); selected = false; if (Request.QueryString["tab"] == "2") { selected = true; } // Statistic Info var subDiv = new HtmlGenericControl("div"); subDiv.Attributes.Add("style", "padding:30px;"); subDiv.Controls.Add(TableReportContent); tabControl.AddTab("Statistic Info", subDiv); //// Charts & Graphs var divGraph = new HtmlGenericControl("div"); divGraph.Attributes.Add("style", "padding:30px;"); divGraph.Controls.Add(dynChart); tabControl.AddTab("Charts & Graphs", divGraph); plcTabHolder.Controls.Add(tabControl); }