public void testGetTimeType() { Model.RecordeData mrd = new Model.RecordeData(); mrd.DataType = 1; BLL.DataBLL dbll = new BLL.DataBLL(); Model.RecordeData[] mrd2 = dbll.getTimeType(mrd); for (int i = 0; i < mrd2.Length; i++) { al.Add(mrd2[i]); } }
protected void ddlTimeTypeDataBind(string dataTypeID) { ddlTimeType.Items.Clear(); Model.RecordeData dataType = new Model.RecordeData(); dataType.DataType = Convert.ToInt32(dataTypeID); Model.RecordeData[] mTimeType = dbll.getTimeType(dataType); for (int i = 0; i < mTimeType.Length; i++) { ListItem liTimeType = new ListItem(); liTimeType.Value = mTimeType[i].TimeType.ToString(); liTimeType.Text = mTimeType[i].TimeTypeName; ddlTimeType.Items.Add(liTimeType); } ddlTimeType.Items.Insert(0, new ListItem("-- 请选择 --", "-1")); }
protected void initDDLTimeType(Model.RecordeData mrd) { ddl_tt.Items.Clear(); ListItem li = new ListItem(); li.Value = "选择数据时段"; li.Text = "选择数据时段"; ddl_tt.Items.Add(li); if (ddl_dt.SelectedValue == "选择数据类型") { return; } mTimeType = dbll.getTimeType(mrd); for (int i = 0; i < mTimeType.Length; i++) { ListItem liTimeType = new ListItem(); liTimeType.Value = mTimeType[i].TimeType.ToString(); liTimeType.Text = mTimeType[i].TimeTypeName; ddl_tt.Items.Add(liTimeType); } }