internal static Form Create(MonitorView monitorView, CameraType type, Action action, bool IsMatNo100ml) { switch (type) { case CameraType.Batch: case CameraType.IsFront: case CameraType.IsBack: return(new BatchView(monitorView, action));; case CameraType.Front: case CameraType.Back: return(new FrontBackView(monitorView, action)); case CameraType.Shoulder: if (IsMatNo100ml) { return(new ShoulderView100(monitorView, action)); } else { return(new FrontBackView(monitorView, action)); } default: return(null); } }
public string GetCarList() { MonitorView mv = new MonitorView(); IList <MonitorView> imv = monitorViewBll.GetMonitorViewPage(mv); int k = monitorViewBll.GetMonitorViewCount(mv); string uu = ConvertToJson(imv, k); return(uu); }
/// <summary> /// 监视器分屏 /// </summary> /// <param name="monitorDivideParam"></param> /// <returns></returns> public int DivideMonitor(MonitorView monitorDivideParam) { if (DigitMatrixCenter == null) { throw new Exception("请配置数字矩阵中心!"); } string url = string.Format("http://{0}:{1}/}/dmc/tv/split", DigitMatrixCenter.EndPoints[0].IPAddress, DigitMatrixCenter.EndPoints[0].Port); HttpClientHelper.Put <MonitorView>(monitorDivideParam, url); return(0); }
/// <summary> /// 停止视频上墙 /// </summary> /// <param name="tvStopParam"></param> /// <returns></returns> public int StopTvVideo(MonitorView tvStopParam) { if (DigitMatrixCenter == null) { throw new Exception("请配置数字矩阵中心!"); } string url = string.Format("http://{0}:{1}/dmc/tv/stop", DigitMatrixCenter.EndPoints[0].IPAddress, DigitMatrixCenter.EndPoints[0].Port); var result = HttpClientHelper.Post <MonitorView>(tvStopParam, url); return(0); }
//[AuthCheck(Module = WebModule.SecurityCheck, Right = SystemRight.Modify)] public ActionResult Edit(Epm_Monitor model) { MonitorView monitorList = new MonitorView(); ResultView <int> view = new ResultView <int>(); //表单校验 if (!model.ProjectId.HasValue || model.ProjectId.Value == 0 || string.IsNullOrWhiteSpace(model.ProjectName)) { view.Flag = false; view.Message = "项目名称不能为空"; return(Json(view)); } if (string.IsNullOrEmpty(model.Title)) { view.Flag = false; view.Message = "检查标题不能为空"; return(Json(view)); } string fileDataJson = Request.Form["fileDataJsonFile"]; //获取上传图片json字符串 List <Base_Files> fileListFile = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符 //详情信息 string Work = Request.Form["Work"]; if (!string.IsNullOrWhiteSpace(Work)) { monitorList.MonitorDetails = JsonConvert.DeserializeObject <List <Epm_MonitorDetails> >(Work); } Result <int> result = new Result <int>(); //using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) //{ // monitorList.Monitor = model; // monitorList.FileList = fileListFile; // result = proxy.UpdateMonitor(monitorList); //} return(Json(result.ToResultView())); }
public BatchView(MonitorView monitorView, Action action) { this.monitorView = monitorView; this.action = action; InitializeComponent(); }
public ActionResult EditZL(Epm_Monitor model) { MonitorView monitorList = new MonitorView(); ResultView <int> view = new ResultView <int>(); //表单校验 if (!model.ProjectId.HasValue || model.ProjectId.Value == 0 || string.IsNullOrWhiteSpace(model.ProjectName)) { view.Flag = false; view.Message = "项目名称不能为空"; return(Json(view)); } if (string.IsNullOrEmpty(model.Title)) { view.Flag = false; view.Message = "检查标题不能为空"; return(Json(view)); } if (string.IsNullOrWhiteSpace(model.MonitorTypeNo) || string.IsNullOrWhiteSpace(model.MonitorTypeName)) { view.Flag = false; view.Message = "检查类型不能为空"; return(Json(view)); } //if (model.Result == 0) //{ // model.State = (int)CheckState.WaitCheck; //} //else if (model.Result == 1) //{ // model.State = (int)CheckState.CheckSuccess; //} //else if (model.Result == 2) //{ // model.State = (int)CheckState.Rectification; //} string fileDataJson = Request.Form["fileDataJson"]; //获取上传图片json字符串 List <Base_Files> fileListFile = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符 //详情信息 string monitorDetails = Request.Form["MonitorDetails"]; if (!string.IsNullOrWhiteSpace(monitorDetails)) { monitorList.MonitorDetails = JsonConvert.DeserializeObject <List <Epm_MonitorDetails> >(monitorDetails); } //关联组件 string monitorDetailBIM = Request.Form["ComponentIds"]; if (!string.IsNullOrWhiteSpace(monitorDetailBIM)) { monitorList.MonitorDetailBIM = JsonConvert.DeserializeObject <List <Epm_MonitorDetailBIM> >(monitorDetailBIM); } if (model.Result == 2) { string Deadline = Request.Form["Deadline"]; if (!string.IsNullOrWhiteSpace(Deadline)) { monitorList.MonitorRectifRecord.Deadline = Convert.ToDateTime(Deadline); monitorList.MonitorRectifRecord.Remark = model.Rectification; } } Result <int> result = new Result <int>(); //using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) //{ // monitorList.Monitor = model; // monitorList.FileList = fileListFile; // result = proxy.UpdateMonitor(monitorList); //} return(Json(result.ToResultView())); }
//[AuthCheck(Module = WebModule.SecurityCheck, Right = SystemRight.Add)] public ActionResult AddAQ(Epm_Monitor model) { MonitorView monitorList = new MonitorView(); ResultView <int> view = new ResultView <int>(); //表单校验 if (!model.ProjectId.HasValue || model.ProjectId.Value == 0 || string.IsNullOrWhiteSpace(model.ProjectName)) { view.Flag = false; view.Message = "项目名称不能为空"; return(Json(view)); } if (string.IsNullOrEmpty(model.Title)) { view.Flag = false; view.Message = "检查标题不能为空"; return(Json(view)); } string fileDataJson = Request.Form["fileDataJsonFile"]; //获取上传图片json字符串 List <Base_Files> fileListFile = JsonConvert.DeserializeObject <List <Base_Files> >(fileDataJson); //将文件信息json字符 //问题信息 string Work = Request.Form["Work"]; //if (string.IsNullOrWhiteSpace(Work)) //{ // view.Flag = false; // view.Message = "请选择整改问题!"; // return Json(view); //} List <Epm_MonitorDetails> detailList = JsonConvert.DeserializeObject <List <Epm_MonitorDetails> >(Work); //if (detailList == null || !detailList.Any()) //{ // view.Flag = false; // view.Message = "请选择整改问题!"; // return Json(view); //} List <MonitorView> list = new List <MonitorView>(); if (detailList != null) { var companyIds = detailList.Select(p => new { p.RectifCompanyId, p.RectifCompanyName }).Distinct().ToList(); foreach (var item in companyIds) { Epm_Monitor monitor = new Epm_Monitor(); monitor.Title = model.Title; monitor.ProjectId = model.ProjectId; monitor.ProjectName = model.ProjectName; monitor.RectifCompanyId = item.RectifCompanyId; monitor.RectifCompanyName = item.RectifCompanyName; monitor.Deadline = detailList.Where(p => p.RectifCompanyId == item.RectifCompanyId).Max(p => p.Deadline); monitor.MonitorUserId = model.MonitorUserId; monitor.MonitorUserName = model.MonitorUserName; monitor.MonitorCompanyId = model.MonitorCompanyId; monitor.MonitorCompanyName = model.MonitorCompanyName; monitor.MonitorTime = model.MonitorTime; monitor.State = model.State; monitor.Remark = model.Remark; MonitorView monitorView = new MonitorView(); monitorView.Monitor = monitor; monitorView.MonitorDetails = detailList.Where(p => p.RectifCompanyId == item.RectifCompanyId).ToList(); monitorView.MonitorDetails.ForEach(p => { p.MonitorId = monitor.Id; }); monitorView.FileList = fileListFile; list.Add(monitorView); } } else { Epm_Monitor monitor = new Epm_Monitor(); monitor.Title = model.Title; monitor.ProjectId = model.ProjectId; monitor.ProjectName = model.ProjectName; monitor.RectifCompanyId = 0; monitor.RectifCompanyName = ""; monitor.Deadline = DateTime.Now; monitor.MonitorUserId = model.MonitorUserId; monitor.MonitorUserName = model.MonitorUserName; monitor.MonitorCompanyId = model.MonitorCompanyId; monitor.MonitorCompanyName = model.MonitorCompanyName; monitor.MonitorTime = model.MonitorTime; monitor.State = model.State; monitor.Remark = model.Remark; MonitorView monitorView = new MonitorView(); monitorView.Monitor = monitor; monitorView.MonitorDetails = null; monitorView.FileList = fileListFile; list.Add(monitorView); } Result <bool> result = new Result <bool>(); using (ClientSiteClientProxy proxy = new ClientSiteClientProxy(ProxyEx(Request))) { monitorList.Monitor = model; monitorList.FileList = fileListFile; //result = proxy.AddMonitorNew(list); } return(Json(result.ToResultView())); }
public ShoulderView100(MonitorView monitorView, Action action) { this.monitorView = monitorView; this.action = action; InitializeComponent(); }
private void btnMonitor_Click(object sender, RoutedEventArgs e) { MonitorView.ShowMonitorView(); }