public void RaiseCallbackEvent(string eventArgument) { String Action = eventArgument.Split(',')[0].Split('=')[1]; String Argument = eventArgument.Split(',')[1].Split('=')[1]; if (Action == "InputTags") { KPI_InputTagDal InputTagDataAccess = new KPI_InputTagDal(); List<InputTagEntity> InputTags = InputTagDataAccess.GetInputTags(Argument); var Result = new { Action = Action, data = InputTags.Select(p => new { InputID = p.InputID, InputDesc = p.InputDesc }).ToList() }; m_CallbackResult = JsonConvert.SerializeObject(Result); } if (Action == "InitialPerson") { List<ManagementScoreEntity> List = new List<ManagementScoreEntity>(); ManagementScoreEntity Entity; for (int i = 0; i < 10; i++) { Entity = new ManagementScoreEntity { Rate = 80.0m, Shift = 1, PersonName = "韩娜", PositionName = "值长" }; List.Add(Entity); } var Result = new { Action = Action, data = List }; m_CallbackResult = JsonConvert.SerializeObject(Result); } }
public override void DataBind() { KPI_InputTagDal DataAccess = new KPI_InputTagDal(); int RecordCount = 0; String TagCategory = drpTagCategorys.SelectedValue; Tags.DataSource = DataAccess.GetInputTags(Pager.CurrentPageIndex,Pager.PageSize, TagCategory,out RecordCount); Pager.RecordCount = RecordCount; base.DataBind(); }
public override void DataBind() { KPI_InputTagDal DataAccess = new KPI_InputTagDal(); int RecordCount = 0; String TagCategory = drpTagCategorys.SelectedValue; Tags.DataSource = DataAccess.GetInputTags(Pager.CurrentPageIndex, Pager.PageSize, TagCategory, out RecordCount); Pager.RecordCount = RecordCount; base.DataBind(); }
void BindGrid() { string inputtype = rbl_InputType.SelectedValue; string inputtime = DateTime.Parse(txt_Time.Value).ToString("yyyy-MM-dd 00:00:00"); DataTable gvTable = KPI_InputTagDal.GetInputTagWithValue(inputtype, inputtime); gvTag.DataSource = gvTable; gvTag.DataBind(); }
void BindGrid() { string inputtype = ViewState["iptype"].ToString(); DataTable gvTable = KPI_InputTagDal.GetInputTagForDisplay(inputtype); gvTag.DataSource = gvTable; gvTag.DataBind(); if (gvTable.Rows.Count > 0 && gvTable.Rows[0]["InputTime"].ToString() != "") { lblInfor.Text = "录入时间:" + DateTime.Parse(gvTable.Rows[0]["InputTime"].ToString()).ToString("yyyy-MM-dd"); } else { lblInfor.Text = "录入时间:无"; } }
////////////////////////////////////////////////////////////////////////////// #region Define Functions /// <summary> /// /// </summary> /// <returns></returns> public bool KPIInitialVar() { try { //是否取服务器时间 bTimeMode = KPI_SystemDal.GetKPITimeMode() == 1 ? true : false; //偏置时间 nOffset = KPI_SystemDal.GetKPIOffset(); //初始所有List<> ltUnits = KPI_UnitDal.GetValidEntity(); ltSeqs = KPI_SeqDal.GetValidEntity(); ltKpis = KpiDal.GetValidEntity(); //实时、手录、曲线指标 ltReals = KPI_RealTagDal.GetAllEntity(); ltInputs = KPI_InputTagDal.GetAllEntity(); ltCurves = CurveTagDal.GetAllEntity(); //计算周期 List <CycleEntity> ltCYs = CycleDal.GetAllEntity(); dicCYs = new Dictionary <string, CycleEntity>(); foreach (CycleEntity cye in ltCYs) { dicCYs[cye.CycleID] = cye; } //经济指标 ltECs = ECTagDal.GetValidEntity(); ltXLines = ECTagDal.GetAllXLineEntity(); ltScores = ECTagDal.GetAllScoreEntity(); ///////////////////////////////////////////////////////////////// //安全指标 dicUnitStatus = new Dictionary <string, bool>(); dicUnitPEs = new Dictionary <string, double>(); dicTags = new Dictionary <string, double>(); dicRealTag = new Dictionary <string, RealTag>(); } catch (Exception ex) { LogUtil.LogMessage(ex.ToString()); return(false); } return(true); }
public void RaiseCallbackEvent(string eventArgument) { String Action = eventArgument.Split(',')[0].Split('=')[1]; String Argument = eventArgument.Split(',')[1].Split('=')[1]; if (Action == "InputTags") { KPI_InputTagDal InputTagDataAccess = new KPI_InputTagDal(); List <InputTagEntity> InputTags = InputTagDataAccess.GetInputTags(Argument); var Result = new { Action = Action, data = InputTags.Select(p => new { InputID = p.InputID, InputDesc = p.InputDesc }).ToList() }; m_CallbackResult = JsonConvert.SerializeObject(Result); } if (Action == "InitialPerson") { List <ManagementScoreEntity> List = new List <ManagementScoreEntity>(); ManagementScoreEntity Entity; for (int i = 0; i < 10; i++) { Entity = new ManagementScoreEntity { Rate = 80.0m, Shift = 1, PersonName = "韩娜", PositionName = "值长" }; List.Add(Entity); } var Result = new { Action = Action, data = List }; m_CallbackResult = JsonConvert.SerializeObject(Result); } }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "application/json"; m_DataAccess = new KPI_InputTagDal(); List <String> list = context.Request.Params.AllKeys.Where(p => p.Contains("DetailList")).ToList(); String Action = context.Request.Params["Action"]; if (Action == "SaveInputTag") { SaveInputTag(context); } if (Action == "DeleteInputTag") { DeleteInputTag(context); } if (Action == "SaveInputTagCategory") { SaveInputTagCategory(context); } if (Action == "DeleteInputTagCategory") { DeleteInputTagCategory(context); } }