Beispiel #1
0
        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            var checkBox = (CheckBox)sender;



            if (checkBox.IsChecked == true)
            {
                var result = UMessageBox.Show("确认启动当前方案?");
                if (result == false || ComboBox.SelectedItem == null)
                {
                    checkBox.IsChecked = false;
                    return;
                }
                Control.Visibility            = Visibility.Collapsed;
                this.RemainTimeRow.Visibility = Visibility.Visible;
                return;
            }

            var result1 = UMessageBox.Show("是否立即停止所有方案?");

            if (result1 == false)
            {
                checkBox.IsChecked = true;
                return;
            }
            Control.Visibility       = Visibility.Visible;
            RemainTimeRow.Visibility = Visibility.Collapsed;
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (Types.Count > 8)
            {
                UMessageBox.Show("提示", "关键词数量已达上限!", UMessageBoxButton.Ok);
                return;
            }
            else
            {
                var type = new NameIntBool()
                {
                    IsSelected = false,
                    Name       = txt.Text,
                    IsEnable   = true
                };
                foreach (var t in Types)
                {
                    if (t.Name == type.Name)
                    {
                        UMessageBox.Show("提示", "已有该关键词!", UMessageBoxButton.Ok);
                        return;
                    }
                }

                Types.Add(type);
            }
            lstbox.ItemsSource = Types;
        }
Beispiel #3
0
        private bool IsDataValidate(ObservableCollection <EventTaskItemViewModel> allTaskItems)
        {
            foreach (var t in allTaskItems)
            {
                if (t.AreaId == CurrentSelectArea.Value)
                {
                    if (t.StartMinutes >= 1440)
                    {
                        UMessageBox.Show("设置错误", "存在错误的时间设置,请重新设置", UMessageBoxButton.Yes);
                        t.StartMinutes = 30;

                        return(false);
                    }
                    if (t.EquType == 1 || t.EquType == 2 || t.EquType == 5 || t.EquType == 7)
                    {
                        if (t.Interval < 10 || t.Interval > 180)
                        {
                            UMessageBox.Show("设置错误", "终端、单灯、节电、线路检测巡测间隔" + "\n" + "须在10分钟到3小时之间", UMessageBoxButton.Yes);
                            t.Interval = 10;
                            return(false);
                        }
                    }
                    if (t.MinutesIntervalsRePartol * t.TimesRepartol > t.Interval)
                    {
                        UMessageBox.Show("设置错误", "补测次数与补测间隔的乘积不能大于执行间隔", UMessageBoxButton.Yes);
                        return(false);
                    }
                }
            }
            return(true);
        }
 private bool IsDataValidate(ObservableCollection <SimItemModel> allData)
 {
     foreach (var t in allData)
     {
         if (string.IsNullOrEmpty(t.TelNum) == false)
         {
             if (t.TelNum.Length != 11)
             {
                 UMessageBox.Show("设置错误", "序号为" + t.Id + "的卡号长度不对,请重新设置", UMessageBoxButton.Yes);
                 return(false);
             }
             if (t.ActivateTime > t.ChargeTime)
             {
                 UMessageBox.Show("设置错误", "序号为" + t.Id + "的续费时间大于开通时间,请重新设置", UMessageBoxButton.Yes);
                 return(false);
             }
             IPAddress ip;
             if (!IPAddress.TryParse(t.IP, out ip))
             {
                 UMessageBox.Show("设置错误", "序号为" + t.Id + "的Ip地址不合法,请重新设置", UMessageBoxButton.Yes);
                 return(false);
             }
         }
     }
     return(true);
 }
        private void Query()
        {
            var tStartTime = new DateTime();

            if (SelectTpyeId == 1 || SelectTpyeId == 4)
            {
                tStartTime = new DateTime(DtStartTimeTime.Year, DtStartTimeTime.Month, DtStartTimeTime.Day, 0, 0, 1);
            }
            else
            {
                tStartTime = new DateTime(DtStartTimeTime.Year, DtStartTimeTime.Month, 1, 0, 0, 1);
            }

            var tEndTime = new DateTime(DtEndTimeTime.Year, DtEndTimeTime.Month, DtEndTimeTime.Day, 23, 59, 59);
            var rtulst   = GetRtusLst();

            if (rtulst.Count == 0)
            {
                UMessageBox.Show("提醒", "未符合标准的终端!", UMessageBoxButton.Ok);
                return;
            }
            var info = Wlst.Sr.ProtocolPhone.LxRtu.wst_rtu_elec_stats_data;

            // .wlst_cnt_wj3090_request_open_close_light_record ;//.ServerPart.wlst_OpenCloseLight_clinet_request_rtuopencloseLightrecord;
            info.WstRtuElecStatsData.DtEnd    = tEndTime.Ticks;
            info.WstRtuElecStatsData.DtStart  = tStartTime.Ticks;
            info.WstRtuElecStatsData.RtuItems = rtulst;
            info.WstRtuElecStatsData.Type     = SelectTpyeId;
            SndOrderServer.OrderSnd(info, 10, 6);
            Remind = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "  正在查询...";
        }
 private void btnTest_Click(object sender, EventArgs e)
 {
     if (PortName.SelectedItem == null || BaudRate.SelectedItem == null)
     {
         UMessageBox.Show("请选择串口号和波特率!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         WaitWin.Show(this, "正在测试,请稍后。。。。。。");
         CDMASMS.Close();
         CDMASMS.Set(PortName.SelectedItem.ToString(), Convert.ToInt32(BaudRate.SelectedItem.ToString()));
         if (CDMASMS.Open())
         {
             string TSX             = CDMASMS.SendAT("AT^MEID").Replace("\r\n", "").Replace("OK", "");
             string production_Name = CDMASMS.SendAT("AT+CGMM").Replace("\r\n", "").Replace("OK", "");
             if (TSX.Length == 14 && production_Name.IndexOf("MC323") != -1)
             {
                 WaitWin.Close();
                 UMessageBox.Show("测试通过,请保存后重启系统。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
             }
             else
             {
                 WaitWin.Close();
                 UMessageBox.Show("测试未通过,请重试!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
         else
         {
             WaitWin.Close();
             UMessageBox.Show("测试未通过,请重试!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
 }
Beispiel #7
0
 private void ExCmdButton()
 {
     _dtButton = DateTime.Now;
     if (StayAtModifyView)
     {
         if (SaveModfiyInfo())
         {
             StayAtModifyView = false;
         }
     }
     else
     {
         var sss = UMessageBoxWantSomefromUser.Show("密码验证", "请输入密码", "");
         if (sss == UMessageBoxWantSomefromUser.CancelReturn)
         {
             return;
         }
         if (sss != UserInfo.UserLoginInfo.UserPassword)
         {
             UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......", UMessageBoxButton.Yes);
             return;
         }
         StayAtModifyView = true;
     }
 }
Beispiel #8
0
 //将系统日志导出数据库
 private void btnSysOut_Click(object sender, EventArgs e)
 {
     if (Sysgrid.Rows.Count == 0)
     {
         UMessageBox.Show("当前没有数据。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return;
     }
     new ExportLogInfoSetForm(Sysgrid, CSPNType.SysLogInfo).ShowDialog(this);
     DataLoade(false, null);
 }
Beispiel #9
0
 private bool GetCheckedInformation()
 {
     if (DtStartTime.AddDays(63) < DtEndTime)
     {
         UMessageBox.Show("提醒", "请重新选择时间,时间需选择在62天以内", UMessageBoxButton.Ok);
         //WLSTMessageBox.WpfMessageBox.Show("请重新选择时间,时间需选择在30天以内");
         return(false);
     }
     return(true);
 }
Beispiel #10
0
 private void btnUpdateUser_Click(object sender, EventArgs e)
 {
     if (userGrid.SelectedRows.Count == 0)
     {
         UMessageBox.Show("请选择数据!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     work_ID = userGrid.CurrentRow.Cells[0].Value.ToString();
     new EditUserInfoForm(false, work_ID).ShowDialog();
     DataLoade(CSPNType.UserInfo);
 }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     foreach (var t in Types)
     {
         if (t.Name == txt.Text)
         {
             Types.Remove(t);
             lstbox.ItemsSource = Types;
             return;
         }
     }
     UMessageBox.Show("提示", "没有该关键词,请重新输入!", UMessageBoxButton.Ok);
 }
Beispiel #12
0
 public bool OnJSDialog(IWebBrowser browserControl, IBrowser browser, string originUrl, string acceptLang, CefJsDialogType dialogType, string messageText, string defaultPromptText, IJsDialogCallback callback, ref bool suppressMessage)
 {
     if (dialogType == CefJsDialogType.Alert)
     {
         UMessageBox.Show(messageText, "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         suppressMessage = true;
         return(false);
     }
     else
     {
         return(true);
     }
 }
Beispiel #13
0
        private void DisposeMsg_Map(int well_State_ID, string terminal_ID, CSPNType type)
        {
            ReportInfo reportInfo = wellInfoService.GetReportInfo_Terminal_ID(well_State_ID, terminal_ID);

            this.terminal_ID   = terminal_ID;
            this.well_State_ID = well_State_ID;
            phone    = reportInfo.OperatorInfo.Telephone;
            place    = reportInfo.WellInfo.Place;
            time     = reportInfo.Report_Time;
            realName = reportInfo.OperatorInfo.RealName;
            DisposeMsg(type);
            UMessageBox.Show("处理成功!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Beispiel #14
0
 private void btnSet_Click(object sender, EventArgs e)
 {
     if (PortName.SelectedItem == null || BaudRate.SelectedItem == null)
     {
         UMessageBox.Show("请选择串口号和波特率!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         ReadWriteXml.WriteXml("PortName", PortName.SelectedItem.ToString());
         ReadWriteXml.WriteXml("BaudRate", BaudRate.SelectedItem.ToString());
         UMessageBox.Show("保存成功,请重启系统!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         Process.GetCurrentProcess().CloseMainWindow();
     }
 }
Beispiel #15
0
 public void DeleteContent()
 {
     if (UMessageBox.Show("是否删除?", "人井监控管理系统", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         if (wellInfoService.DeleteWellInfo(terminal_ID) > 0 && wellStateService.DeleteWellCurrentStateInfo(terminal_ID) > 0 && wellInfoService.DeleteReportInfo(terminal_ID) > 0)
         {
             UMessageBox.Show("数据删除成功!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
             WebBrower.webBrower.ExecuteScriptAsync("deleteMarker", terminal_ID);
         }
         else
         {
             UMessageBox.Show("数据删除失败!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
 private void ExCmdQuery()
 {
     _dtQuery = DateTime.Now;
     Records.Clear();
     //recordsKeys.Clear();
     //var rtulst = GetRtusLst();
     //var index = 1;
     if (RtuId == 0 && QueryMode == 2)
     {
         UMessageBox.Show("提醒", "未选择终端!", UMessageBoxButton.Ok);
         return;
     }
     Query();
     //Remind = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "  查询成功,共计" + Records.Count + " 条数据.";
 }
Beispiel #17
0
        private bool SaveModfiyInfo()
        {
            if (string.IsNullOrEmpty(ModifyUserPasswrodOne))
            {
                UMessageBox.Show("密码不允许有空...", "密码为空", UMessageBoxButton.Ok);
                return(false);
            }
            if (ModifyUserPasswrodOne != ModifyUserPasswrodTwo)
            {
                UMessageBox.Show("两次输入的密码不匹配...", "密码为空", UMessageBoxButton.Ok);
                return(false);
            }

            UpdateUserInfo();
            return(true);
        }
        private void Ex()
        {
            var sss = UMessageBoxWantPassWord.Show("密码验证", "请输入您的用户密码", "");

            if (sss == UMessageBoxWantPassWord.CancelReturn)
            {
                return;
            }
            if (sss != UserInfo.UserLoginInfo.UserPassword)
            {
                UMessageBox.Show("验证失败", "您输入的密码与本用户密码不匹配,请检查......",
                                 UMessageBoxButton.Yes);
                return;
            }

            ExNavWithArgs(PrivilegesManage.Services.ViewIdAssign.UserInfoManageViewId, 1);
        }
Beispiel #19
0
 public void Search(IJavascriptCallback javascriptCallback)
 {
     if (inputvalue == "")
     {
         UMessageBox.Show("请输入内容!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     Task.Run(async() =>
     {
         using (javascriptCallback)
         {
             list = wellInfoService.GetWellInfo_List(inputvalue);
             json = JsonConvert.SerializeObject(list);
             await javascriptCallback.ExecuteAsync(json);
         }
     });
 }
Beispiel #20
0
 //删除
 private void btnDelete_Click(object sender, EventArgs e)
 {
     int[] n = new int[grid.Rows.Count + 1];
     for (int i = 0; i < grid.Rows.Count; i++)
     {
         //判断该行的复选框是否存在
         if (grid.Rows[i].Cells[0].Value != null)
         {
             //判断该复选框是否被选中
             if (Convert.ToBoolean(grid.Rows[i].Cells[0].Value))
             {
                 n[0]++;
                 n[i + 1] = i;
             }
         }
     }
     if (n[0] == 0)
     {
         UMessageBox.Show("请选择数据!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     else
     {
         if (UMessageBox.Show("是否删除?", "人井监控管理系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             for (int i = 1; i < n.Length; i++)
             {
                 if (n[i] != 0)
                 {
                     terminal_ID = grid.Rows[n[i]].Cells[1].Value.ToString();
                     wellInfoService.DeleteWellInfo(terminal_ID);
                     wellStateService.DeleteWellCurrentStateInfo(terminal_ID);
                     wellInfoService.DeleteReportInfo(terminal_ID);
                 }
             }
             UMessageBox.Show("数据删除成功!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
             WebBrower.Reload();
             DataLoade(null);
         }
     }
 }
Beispiel #21
0
 //删除值班人员
 private void btnDeleteOperator_Click(object sender, EventArgs e)
 {
     if (operatorGrid.SelectedRows.Count == 0)
     {
         UMessageBox.Show("请选择数据!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     if (UMessageBox.Show("是否删除?", "人井监控管理系统", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         work_ID = operatorGrid.CurrentRow.Cells[0].Value.ToString();
         if (userservice.DeleteOperatorInfo(work_ID) > 0)
         {
             UMessageBox.Show("数据删除成功!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             UMessageBox.Show("数据删除失败!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
         DataLoade(CSPNType.OperatorInfo);
     }
 }
Beispiel #22
0
 //报警信息处理
 private void btnAlarm_Click(object sender, EventArgs e)
 {
     int[] n = new int[dgvAlarm.Rows.Count + 1];
     for (int i = 0; i < dgvAlarm.Rows.Count; i++)
     {
         //判断该行的复选框是否存在
         if (dgvAlarm.Rows[i].Cells[0].Value != null)
         {
             //判断该复选框是否被选中
             if (Convert.ToBoolean(dgvAlarm.Rows[i].Cells[0].Value))
             {
                 n[0]++;
                 n[i + 1] = i;
             }
         }
     }
     if (n[0] == 0)
     {
         UMessageBox.Show("请选择数据!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     else
     {
         WaitWin.Show(this, "正在处理,请稍后。。。。。。");
         for (int i = 1; i < n.Length; i++)
         {
             time          = dgvAlarm.Rows[n[i]].Cells[1].Value.ToString();
             terminal_ID   = dgvAlarm.Rows[n[i]].Cells[2].Value.ToString();
             well_State_ID = int.Parse(dgvAlarm.Rows[n[i]].Cells[3].Value.ToString());
             place         = dgvAlarm.Rows[n[i]].Cells[5].Value.ToString();
             phone         = dgvAlarm.Rows[n[i]].Cells[7].Value.ToString();
             dgvAlarm.Rows.RemoveAt(n[i]);
             DisposeMsg(CSPNType.AlarmInfo);
             Thread.Sleep(1000);
         }
         WaitWin.Close();
         UMessageBox.Show("处理成功!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #23
0
        private void ExOther()
        {
            var slulist = GetRightOperatorSlus();

            OcCount = slulist.Count;
            if (OcCount < 1)
            {
                UMessageBox.Show("请选择终端", "请选择需要操作的终端......", UMessageBoxButton.Ok);
                return;
            }
            if (FlagDataType == 1)
            {
                FlagDataType = 3;
            }
            else
            {
                if (FlagDataType == 3)
                {
                    FlagDataType = 1;
                }
            }
            SyncTime    = "对时";
            ZcTime      = "召测时间";
            ZcVer       = "召测版本";
            _isSyncTime = false;
            _isZcTime   = false;
            _isZcVer    = false;
            SyncTimeReport.Clear();
            foreach (var t in slulist)
            {
                SyncTimeReport.Add(new SyncTimeOneReport()
                {
                    SluId       = t.Item1,
                    SyncTimeAns = false,
                    ZcTimeAns   = "---",
                    ZcVerAns    = "---"
                });
            }
        }
Beispiel #24
0
 private void btnLogin_Click(object sender, EventArgs e)
 {
     if (cbUserName.Text.Trim() != null && txtPWD.Text.Trim() != "")
     {
         usersInfo = userService.GetUsersByUserName(cbUserName.Text.Trim());
         if (usersInfo != null)
         {
             if (usersInfo.PassWord.Trim() == txtPWD.Text.Trim())
             {
                 UMessageBox.Show("登录成功。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 if (cbRemember.Checked)
                 {
                     readWriteData.WriteData(usersInfo);
                 }
                 else
                 {
                     usersInfo.PassWord = "";
                     readWriteData.WriteData(usersInfo);
                 }
                 userName = usersInfo.UserName;
                 userService.UpdateLoginTimeByWork_ID(DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss"), usersInfo.Work_ID);
                 this.Close();
                 this.DialogResult = DialogResult.OK;
             }
             else
             {
                 UMessageBox.Show("密码错误。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             }
         }
         else
         {
             UMessageBox.Show("用户名错误。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
     else
     {
         UMessageBox.Show("请输入用户名或密码。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Beispiel #25
0
 //将用户日志导出数据库
 private void btnUserOut_Click(object sender, EventArgs e)
 {
     if (cbType.SelectedIndex == 0)
     {
         if (((DataGridView)panelUser.Controls[0]).Rows.Count == 0)
         {
             UMessageBox.Show("当前没有数据。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             return;
         }
         new ExportLogInfoSetForm((DataGridView)panelUser.Controls[0], CSPNType.UserLogInfo_WellInfo).ShowDialog(this);
     }
     else
     {
         if (((DataGridView)panelUser.Controls[0]).Rows.Count == 0)
         {
             UMessageBox.Show("当前没有数据。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             return;
         }
         new ExportLogInfoSetForm((DataGridView)panelUser.Controls[0], CSPNType.UserLogInfo_GeneralInfo).ShowDialog(this);
     }
     DataLoade(false, null);
 }
Beispiel #26
0
 private void ExDeleteTree()
 {
     for (int i = this.AreaTreeItem.Count - 1; i >= 0; i--)
     {
         if (AreaTreeItem[i].IsSelected == true)
         {
             if (AreaTreeItem[i].NodeId == 0)
             {
                 UMessageBox.Show("禁止删除", "此区域为所有终端初始状态时的默认区域,不能删除!", UMessageBoxButton.Yes);
             }
             else if (AreaTreeItem[i].AreaTreeItem.Count != 0)
             {
                 UMessageBox.Show("禁止删除", "此区域下仍有未移出的设备", UMessageBoxButton.Yes);
             }
             else
             {
                 this.AreaTreeItem.RemoveAt(i);
             }
         }
     }
     ReLoadTmlsAreasBelong();
 }
Beispiel #27
0
 private void btnSysSet_Click(object sender, EventArgs e)
 {
     if (tbSysLogTime.Text.Trim() == "" && tbUserLogTime.Text.Trim() == "" && tbNotReportTimes.Text.Trim() == "" && tbRefreshTime.Text.Trim() == "" && tbReportInterval.Text.Trim() == "")
     {
         UMessageBox.Show("请输入内容。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         if (IsNumber(tbSysLogTime.Text.Trim()) && IsNumber(tbUserLogTime.Text.Trim()) && IsNumber(tbNotReportTimes.Text.Trim()) && IsNumber(tbRefreshTime.Text.Trim()) && IsNumber(tbReportInterval.Text.Trim()))
         {
             ReadWriteXml.WriteXml("SysLogTime", tbSysLogTime.Text.Trim());
             ReadWriteXml.WriteXml("UserLogTime", tbUserLogTime.Text.Trim());
             ReadWriteXml.WriteXml("NotReportTimes", tbNotReportTimes.Text.Trim());
             ReadWriteXml.WriteXml("RefreshTime", tbRefreshTime.Text.Trim());
             ReadWriteXml.WriteXml("ReportInterval", cbEnabled.Checked.ToString() + "-" + tbReportInterval.Text.Trim());
             UMessageBox.Show("设置成功。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             UMessageBox.Show("输入的值错误。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Beispiel #28
0
        //设定修改时间
        private void btnSet_Click(object sender, EventArgs e)
        {
            startDateTime = dtpStartDateTime.Value.ToString("yyyy/MM/dd HH:mm:00");
            endDateTime   = dtpEndDateTime.Value.ToString("yyyy/MM/dd HH:mm:00");

            if (startDateTime == endDateTime)
            {
                UMessageBox.Show("时间填写错误。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                wellCurrentStateInfo.Maintain_StartTime = startDateTime;
                wellCurrentStateInfo.Maintain_EndTime   = endDateTime;
                wellCurrentStateInfo.Terminal_ID        = terminal_ID;
                if (wellStateService.UpdateMaintainInfo(wellCurrentStateInfo) > 0)
                {
                    UMessageBox.Show("设置成功。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    UMessageBox.Show("设置失败,请重试。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
Beispiel #29
0
 //编辑
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     int[] n = new int[grid.Rows.Count + 1];
     for (int i = 0; i < grid.Rows.Count; i++)
     {
         //判断该行的复选框是否存在
         if (grid.Rows[i].Cells[0].Value != null)
         {
             //判断该复选框是否被选中
             if (Convert.ToBoolean(grid.Rows[i].Cells[0].Value))
             {
                 n[0]++;
                 n[i + 1] = -1;
             }
         }
     }
     if (n[0] == 0)
     {
         UMessageBox.Show("请选择数据!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     else if (n[0] > 1)
     {
         UMessageBox.Show("请选择一项!", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     else
     {
         terminal_ID = grid.Rows[Array.IndexOf(n, -1) - 1].Cells[1].Value.ToString();
         new EditWellInfoForm(terminal_ID, false, false, null).ShowDialog();
         List <WellInfo> list = wellInfoService.GetWellInfo_List(terminal_ID);
         string          json = JsonConvert.SerializeObject(list);
         WebBrower.webBrower.ExecuteScriptAsync("updateMarker", json);
         DataLoade(null);
     }
 }
Beispiel #30
0
 static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     LogHelper.WriteLog(e.ToString(), e.ExceptionObject as Exception);
     UMessageBox.Show("系统错误。", "人井监控管理系统", MessageBoxButtons.OK, MessageBoxIcon.Error);
     WaitWin.Close();
 }