protected void rblRMType_SelectedIndexChanged(object sender, EventArgs e) { if (rblRMType.SelectedValue == "0") { cbxRMKPIID.Visible = false; ddlRMKPIID.Visible = true; ddlRMKPIID.Items.Clear(); DataTable dt = KPI_UnitDal.GetUnits(""); foreach (DataRow dr in dt.Rows) { ddlRMKPIID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } } else if (rblRMType.SelectedValue == "1") { cbxRMKPIID.Visible = false; ddlRMKPIID.Visible = true; ddlRMKPIID.Items.Clear(); DataTable dt = KPI_SeqDal.GetSeqs(); foreach (DataRow dr in dt.Rows) { ddlRMKPIID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } } else if (rblRMType.SelectedValue == "2") { cbxRMKPIID.Visible = false; ddlRMKPIID.Visible = true; ddlRMKPIID.Items.Clear(); DataTable dt = KpiDal.GetKpis(); foreach (DataRow dr in dt.Rows) { ddlRMKPIID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } } else if (rblRMType.SelectedValue == "3") { cbxRMKPIID.Visible = true; cbxRMKPIID.Items.Clear(); ddlRMKPIID.Visible = false; ddlRMKPIID.Items.Clear(); DataTable dt = ECTagDal.GetECs(); foreach (DataRow dr in dt.Rows) { cbxRMKPIID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { btnDelete.Attributes.Add("onclick", "return confirm('确认删除吗?');"); //机组信息 DataTable dt = KPI_UnitDal.GetUnits(""); ddl_UnitID.Items.Add(new ListItem("所有机组集", "ALL")); foreach (DataRow dr in dt.Rows) { ddl_UnitID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //设备信息 dt = KPI_SeqDal.GetSeqs(); ddl_SeqID.Items.Add(new ListItem("所有设备集", "ALL")); foreach (DataRow dr in dt.Rows) { ddl_SeqID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //指标信息 dt = KpiDal.GetKpis(); ddl_KpiID.Items.Add(new ListItem("所有指标集", "ALL")); foreach (DataRow dr in dt.Rows) { ddl_KpiID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //周期集信息 //dt = KPI_CycleDal.GetCycles(); //ddl_CycleID.Items.Add(new ListItem("所有周期", "ALL")); //foreach (DataRow dr in dt.Rows) //{ // ddl_CycleID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); //} //实时指标信息 dt = ECTagDal.GetECs(); ddl_ECID.Items.Add(new ListItem("所有指标", "ALL")); foreach (DataRow dr in dt.Rows) { ddl_ECID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } BindEC(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //机组信息 DataTable dt = KPI_UnitDal.GetUnits(""); ddl_UnitID.Items.Add(new ListItem("所有机组集", "ALL")); foreach (DataRow dr in dt.Rows) { ddl_UnitID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //设备信息 dt = KPI_SeqDal.GetSeqs(); ddl_SeqID.Items.Add(new ListItem("所有设备集", "ALL")); foreach (DataRow dr in dt.Rows) { ddl_SeqID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //指标信息 dt = KpiDal.GetKpis(); ddl_KpiID.Items.Add(new ListItem("所有指标集", "ALL")); foreach (DataRow dr in dt.Rows) { ddl_KpiID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //周期集信息 //dt = KPI_CycleDal.GetCycles(); //ddl_CycleID.Items.Add(new ListItem("所有周期", "ALL")); //foreach (DataRow dr in dt.Rows) //{ // ddl_CycleID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); //} //安全指标信息 dt = KPI_SATagDal.GetSAs(); ddl_SAID.Items.Add(new ListItem("所有安全指标", "ALL")); foreach (DataRow dr in dt.Rows) { ddl_SAID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } BindSA(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { btnApply.Attributes.Add("onclick", "setDivPos('Lay1');Lay1.style.visibility='';progress_update();"); //机组信息 DataTable dt = KPI_UnitDal.GetUnits(""); foreach (DataRow dr in dt.Rows) { ddl_UnitID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //设备信息 dt = KPI_SeqDal.GetSeqs(); foreach (DataRow dr in dt.Rows) { ddl_SeqID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //指标信息 dt = KpiDal.GetKpis(); foreach (DataRow dr in dt.Rows) { ddl_KpiID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //单位信息 dt = EngunitDal.GetEngunits(); foreach (DataRow dr in dt.Rows) { ddl_EngunitID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //周期信息 dt = CycleDal.GetCycles(); foreach (DataRow dr in dt.Rows) { ddl_CycleID.Items.Add(new ListItem(dr["Name"].ToString(), dr["ID"].ToString())); } //网页集信息 //信息在KPI_Constant表中 dt = KPI_ConstantDal.GetECWebs(); foreach (DataRow dr in dt.Rows) { ddl_ECWeb.Items.Add(new ListItem(dr["Name"].ToString(), dr["Value"].ToString())); } //判断是否新建或编辑 if (Request.QueryString["ecid"] != null) { ViewState["ecid"] = Request.QueryString["ecid"].ToString(); BindValues(); } else { //添加 ViewState["ecid"] = ""; // ddl_ECIsValid.Value = "1"; ddl_ECIsCalc.Value = "1"; ddl_ECIsDisplay.Value = "1"; ddl_ECIsTotal.Value = "1"; SetECCodeAndName(); txt_ECIndex.Value = "100"; txt_ECWeight.Value = "1"; txt_ECDenom.Value = "1"; txt_ECCalcClass.Value = "1"; } btnApply.Visible = true; } }