示例#1
0
        public override void DataBind()
        {
            string SpecialField = Request.Params["ecweb"];
            string queryTime    = DateTime.Now.ToString("yyyy-MM-dd HH:mm:00");
            String PlantCode    = Request.Params["plantcode"];
            String UnitCode     = Request.Params["unitcode"];
            String PlantID      = KPI_PlantDal.GetPlantIDByCode(PlantCode);
            String UnitID       = KPI_UnitDal.GetUnitIDByCode(UnitCode);

            gvReal.DataSource = KPI_RealValueDal.GetRealValue(PlantID, "");
            base.DataBind();

            nowtime.Text  = "计算时间:" + queryTime;
            nowshift.Text = "轮班值次:";
            if (!String.IsNullOrWhiteSpace(UnitID))
            {
                string workid     = KPI_UnitDal.GetWorkIDByID(UnitID);
                string ShiftName  = "";
                string PeriodName = "";
                string StartTime  = "";
                string EndTime    = "";
                bool   bGood      = KPI_WorkDal.GetShiftAndPeriod(workid, queryTime, ref ShiftName,
                                                                  ref PeriodName, ref StartTime, ref EndTime);
                nowshift.Text = "轮班值次:" + ShiftName;
            }
        }
示例#2
0
        public override void DataBind()
        {
            //Repeater1.DataSource = "";
            DateTime StartDate = Convert.ToDateTime(txtStartDate.Text);
            DateTime EndDate   = Convert.ToDateTime(txtEndDate.Text);
            String   UnitCode  = Request.Params["UnitCode"];
            String   UnitID    = KPI_UnitDal.GetUnitIDByCode(UnitCode);

            using (ECHistoryDataAccess DataAccess = new ECHistoryDataAccess()) {
                KPIRepeater.DataSource = DataAccess.GetKPIRank(UnitID, StartDate, EndDate);
            }
            base.DataBind();
        }