Пример #1
0
        private void ClientInitial()
        {
            DateTime Current = DateTime.Now;

            //txtBeginTime.Attributes.Add("onclick", "'new WdatePicker(this,'%Y年%M月%D日',false,'whyGreen')'");
            //txtEndTime.Attributes.Add("onclick", "new WdatePicker(this,'%Y年%M月%D日',false,'whyGreen')");
            txtBeginTime.Text = Current.ToString("yyyy-MM-dd");
            txtEndTime.Text   = Current.ToString("yyyy-MM-dd");

            //List<KPI_UnitEntity> UnitList = KPI_UnitDal.GetAllEntity();
            //UnitList.Insert(0, new KPI_UnitEntity { UnitID = "", UnitName = "【所有机组】" });
            //drpUnits.DataSource = UnitList;
            //drpUnits.DataTextField = "UnitName";
            //drpUnits.DataValueField = "UnitID";
            //drpUnits.DataBind();
            //DataTable Plants = KPI_PlantDal.GetDataTable();
            //drpPlants.DataSource = Plants;
            //drpPlants.DataValueField = "PlantID";
            //drpPlants.DataTextField = "PlantName";
            //drpPlants.DataBind();
            //if (Plants.Rows.Count > 0) {
            //    String PlantID = Plants.Rows[0]["PlantID"] + "";

            //}
            string plantCode = Request.Params["Plantcode"];

            drpUnits.DataSource     = KPI_UnitDal.GetUnitListByPlantCode(plantCode);
            drpUnits.DataTextField  = "UnitName";
            drpUnits.DataValueField = "UnitID";
            drpUnits.DataBind();
            BindSAKPI();
            //string plantid = KPI_PlantDal.GetPlantIDByCode(plantCode);
            //BindUnits(plantid);
        }