Пример #1
0
 private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
 {
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         NotifyList = _csc.GetNotifyList(1000000);
     }
 }
Пример #2
0
        private void simpleButton3_Click(object sender, EventArgs e)
        {
            if (gridView1.FocusedRowHandle >= 0)
            {
                GDSTokenRecord _g  = gridView1.GetRow(this.gridView1.FocusedRowHandle) as GDSTokenRecord;
                DialogResult   _qr = MessageBox.Show(string.Format("是否确认要删除IP[{0}]的访问令牌?", _g.RemoteIP), "系统提示", MessageBoxButtons.YesNo);
                if (_qr == DialogResult.Yes)
                {
                    using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
                    {
                        bool _ret = _csc.DelICSTokenRecord(_g.ID);
                        if (_ret)
                        {
                            this.gridView1.BeginUpdate();
                            TokenRecords.Remove(_g);

                            this.gridView1.EndUpdate();
                            this.gridView1.RefreshData();
                        }
                        else
                        {
                            MessageBox.Show("删除失败!", "系统提示", MessageBoxButtons.OK);
                        }
                    }
                }
            }
            else
            {
                MessageBox.Show("请选择一个要删除令牌的记录!", "系统提示", MessageBoxButtons.OK);
            }
        }
Пример #3
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            Dialog_TokenSet _dialog = new Dialog_TokenSet();

            if (_dialog.ShowDialog() == DialogResult.OK)
            {
                GDSTokenRecord _newRec = new GDSTokenRecord();
                _newRec.ID          = Guid.NewGuid().ToString();
                _newRec.RemoteIP    = _dialog.TokenIP;
                _newRec.TokenData   = MD5Base64.Encode(_dialog.TokenString);
                _newRec.CommandName = this.CommandName;

                using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
                {
                    bool _ret = _csc.InsertTokenRecord(_newRec);
                    if (_ret)
                    {
                        this.gridView1.BeginUpdate();
                        TokenRecords.Add(_newRec);
                        this.gridView1.EndUpdate();
                        this.gridView1.RefreshData();
                    }
                    else
                    {
                        MessageBox.Show("添加失败!", "系统提示", MessageBoxButtons.OK);
                    }
                }
            }
        }
Пример #4
0
 private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
 {
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         e.Result = _csc.GetServiceState(ServiceName);
     }
 }
Пример #5
0
 private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
 {
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         GdsDefines = _csc.GetGDSList().ToList();
     }
 }
Пример #6
0
 private void DeleteData()
 {
     if (this.gridView1.FocusedRowHandle >= 0)
     {
         GDSCommanderDefine _crow   = this.gridView1.GetFocusedRow() as GDSCommanderDefine;
         DialogResult       _result = MessageBox.Show(string.Format("您确定要删除[{0}]接口吗?", _crow.CommandName), "系统提示", MessageBoxButtons.YesNo);
         if (_result == System.Windows.Forms.DialogResult.Yes)
         {
             using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
             {
                 bool _ret = _csc.DelGDSDefine(_crow.ID);
                 if (_ret)
                 {
                     MessageBox.Show("接口已经删除!", "系统提示", MessageBoxButtons.OK);
                     this.panel1.Controls.Clear();
                     this.gridView1.BeginUpdate();
                     GdsDefines.Remove(_crow);
                     this.gridView1.EndUpdate();
                 }
                 else
                 {
                     MessageBox.Show("删除接口失败!!!", "系统提示", MessageBoxButtons.OK);
                 }
             }
         }
     }
     else
     {
         MessageBox.Show("请选择一条要删除的接口", "系统提示", MessageBoxButtons.OK);
     }
 }
Пример #7
0
 private void InitForm()
 {
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         DataTable _dt = _csc.GetNotifyList(15);
         this.gridControl1.DataSource = _dt;
     }
 }
Пример #8
0
 private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
 {
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         CurrentTaskInfo = _csc.GetTaskInfo(this.TaskID);
         DataTable _dt = _csc.GetTaskLog(this.TaskID, this.LastLogTime, this.CB_LOG_ALL.Checked, this.CK_LOG_ERROR.Checked);
         e.Result = _dt;
     }
 }
Пример #9
0
 private void InitForm()
 {
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         _info = _csc.GetNotifyInfo(MsgID);
     }
     if (_info != null)
     {
         ShowInofData();
     }
 }
Пример #10
0
 public void Load()
 {
     if (!DataLoadFinished)
     {
         using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
         {
             TokenRecords = _csc.GetTokenRecord(CommandName).ToList();
             this.gridControl1.DataSource = TokenRecords;
         }
     }
 }
Пример #11
0
 private List<OrgExtInfo> GetChildOrgList(string _fid)
 {
     List<OrgExtInfo> _lsExtData;
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         _lsExtData = _csc.GetOrgExtChildData(_fid, PropertieDefines.ToArray()).ToList<OrgExtInfo>();
     }
     OrgExtFinder _finder = new OrgExtFinder(_fid);
     List<OrgExtInfo> olist = _lsExtData.FindAll(new Predicate<OrgExtInfo>(_finder.FindByFatherID));
     olist.Sort(new OrgExtComparer());
     return olist;
 }
Пример #12
0
        private void ResetParam(DateTime NextTime, string NewParam)
        {
            string _msg;

            using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
            {
                _msg = _csc.ResetTaskParam(this.TaskID, NextTime, NewParam);
            }
            if (_msg != "")
            {
                XtraMessageBox.Show("操作失败!" + _msg, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            RefreshState();
        }
Пример #13
0
        private void SetTaskState(int NewState, int LimitState)
        {
            string _msg;

            using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
            {
                _msg = _csc.SetTaskState(this.TaskID, NewState, LimitState);
            }
            if (_msg != "")
            {
                XtraMessageBox.Show("操作失败!" + _msg, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            RefreshState();
        }
Пример #14
0
        private void QueryQueryLog()
        {
            List <QueryLogRecord> _logList;
            DateTime _startDate = (DateTime)this.dateEdit1.EditValue;
            DateTime _endDate   = (DateTime)this.dateEdit2.EditValue;
            string   _userName  = (this.textEdit2.EditValue == null) ? "" : this.textEdit2.EditValue.ToString().Trim();

            using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
            {
                _logList = _csc.GetQueryLog(_startDate, _endDate, _userName).ToList <QueryLogRecord>();
            }
            this.sinoCommonGrid1.DataSource = _logList;
            this.gridView1.IndicatorWidth   = this.gridView1.RowCount.ToString().Length * 8 + 15;
            RaiseMenuChanged();
        }
Пример #15
0
        private bool UpdateData()
        {
            if (_oldNotify == null)
            {
                return(false);
            }

            _oldNotify.Context = this.te_xxnr.EditValue.ToString().Trim();
            _oldNotify.Title   = this.te_xxbt.EditValue.ToString().Trim();
            _oldNotify.TelNum  = this.te_tel.EditValue.ToString().Trim();
            _oldNotify.Email   = this.te_email.EditValue.ToString().Trim();
            using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
            {
                return(_csc.SaveNotifyInfo(_oldNotify));
            }
        }
Пример #16
0
        private void QueryUserLog()
        {
            List <SystemLogRecord> _logList;
            DateTime _startDate = (DateTime)this.dateEdit1.EditValue;
            DateTime _endDate   = (DateTime)this.dateEdit2.EditValue;
            string   _logtype   = (this.imageComboBoxEdit1.SelectedIndex == 0) ? "" : this.imageComboBoxEdit1.EditValue.ToString();
            string   _context   = (this.textEdit2.EditValue == null) ? "" : this.textEdit2.EditValue.ToString().Trim();

            using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
            {
                _logList = _csc.GetSystemLog(_startDate, _endDate, _logtype, _context).ToList <SystemLogRecord>();
            }
            this.sinoCommonGrid1.DataSource = _logList;
            this.gridView1.IndicatorWidth   = this.gridView1.RowCount.ToString().Length * 8 + 15;
            RaiseMenuChanged();
        }
Пример #17
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            string _stCount = this.textEdit1.EditValue.ToString();

            if (StrUtils.IsDigit(_stCount))
            {
                decimal _count = decimal.Parse(_stCount);
                using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
                {
                    DataTable _dt = _csc.GetICSLogRecord(CommandName, _count);
                    this.gridControl1.BeginUpdate();
                    this.gridControl1.DataSource = _dt;
                    this.gridControl1.EndUpdate();
                    this.gridView1.RefreshData();
                }
            }
        }
Пример #18
0
        /// <summary>
        /// 保存新数据
        /// </summary>
        private bool SaveNewData()
        {
            NotifyInfo _newNotifyInfo = new NotifyInfo(
                "", this.te_xxbt.EditValue.ToString().Trim(),
                this.te_xxnr.EditValue.ToString().Trim(),
                "",
                "",
                "",
                "",
                (this.te_tel.EditValue == null) ? "" : this.te_tel.EditValue.ToString().Trim(),
                (this.te_email.EditValue == null) ? "" : this.te_email.EditValue.ToString().Trim(),
                DateTime.Now);

            using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
            {
                return(_csc.SaveNotifyInfo(_newNotifyInfo));
            }
        }
Пример #19
0
        public bool SaveData()
        {
            //保存数据
            GDSCommanderDefine gdf = new GDSCommanderDefine();

            gdf.ID              = (this.te_ID.EditValue == null) ? "" : this.te_ID.EditValue.ToString();
            gdf.DWDM            = (this.te_DWDM.EditValue == null) ? "" : this.te_DWDM.EditValue.ToString();
            gdf.CommandName     = (this.te_Command.EditValue == null) ? "" : this.te_Command.EditValue.ToString();
            gdf.Descript        = (this.te_DES.EditValue == null) ? "" : this.te_DES.EditValue.ToString();
            gdf.IcsType         = (this.te_Type.EditValue == null) ? "" : this.te_Type.EditValue.ToString();
            gdf.TokenType       = (this.te_TokenType.EditValue == null) ? "" : this.te_TokenType.EditValue.ToString();
            gdf.CallParamDefine = (this.te_Call.EditValue == null) ? "" : this.te_Call.EditValue.ToString();
            gdf.ReturnDefine    = (this.te_Return.EditValue == null) ? "" : this.te_Return.EditValue.ToString();

            string _zb         = (this.te_ZB.EditValue == null) ? "" : this.te_ZB.EditValue.ToString();
            string _savecall   = this.ce_SaveCall.Checked ? "TRUE" : "FALSE";
            string _savereturn = this.ce_SaveReturn.Checked ? "TRUE" : "FALSE";

            gdf.IcsConfig = string.Format("<ZB>{0}</ZB><SAVECALL>{1}</SAVECALL><SAVERETURN>{2}</SAVERETURN>", _zb, _savecall, _savereturn);
            gdf.State     = this.ce_ICSSTATE.Checked ? "1" : "0";

            using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
            {
                bool _ret = _csc.SaveGDSDefine(gdf);
                if (_ret)
                {
                    MessageBox.Show("保存成功!", "系统消息", MessageBoxButtons.OK);
                    GDSDefine.DWDM            = gdf.DWDM;
                    GDSDefine.CallParamDefine = gdf.CallParamDefine;
                    GDSDefine.CommandName     = gdf.CommandName;
                    GDSDefine.Descript        = gdf.Descript;
                    GDSDefine.IcsConfig       = gdf.IcsConfig;
                    GDSDefine.IcsType         = gdf.IcsType;
                    GDSDefine.ReturnDefine    = gdf.ReturnDefine;
                    GDSDefine.State           = gdf.State;
                    GDSDefine.TokenType       = gdf.TokenType;
                }
                else
                {
                    MessageBox.Show("保存失败!", "系统消息", MessageBoxButtons.OK);
                }
                return(_ret);
            }
        }
Пример #20
0
 private void ShowData()
 {
     List<OrgExtInfo> _rootOrgExtData;
     CurrentOrgExtList = new OrgExtList();
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         _rootOrgExtData = _csc.GetOrgExtRootData(PropertieDefines.ToArray()).ToList<OrgExtInfo>();
     }
     OrgExtFinder _finder = new OrgExtFinder(SessionClass.CurrentSinoUser.CurrentPost.PostDwID);
     List<OrgExtInfo> olist = _rootOrgExtData.FindAll(new Predicate<OrgExtInfo>(_finder.FindByID));
     olist.Sort(new OrgExtComparer());
     foreach (OrgExtInfo _dw in olist)
     {
         OrgExtBusinessObject _bi = new OrgExtBusinessObject(_dw, ExtendFields);
         _bi.ChildOrgList.Add(new OrgExtBusinessObject(null, null));
         CurrentOrgExtList.Add(_bi);
     }
     this.treeList1.DataSource = CurrentOrgExtList;
 }
Пример #21
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool _ret;

            this.button1.Enabled = false;
            using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
            {
                switch (this.button1.Text)
                {
                case "停止服务":
                    _ret = _csc.ResetService(ServiceName, "STOP");
                    break;

                case "启动服务":
                    _ret = _csc.ResetService(ServiceName, "START");
                    break;
                }
            }
        }
Пример #22
0
 private void ShowMsg(string _msgid)
 {
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         CurrentInfo = _csc.GetNotifyInfo(_msgid);
     }
     if (CurrentInfo != null)
     {
         this.te_xxbt.EditValue   = CurrentInfo.Title;
         this.te_xxnr.EditValue   = CurrentInfo.Context;
         this.te_fbdwmc.EditValue = CurrentInfo.FBdwmc;
         this.te_fbr.EditValue    = CurrentInfo.FByhmc;
         this.te_fbsj.EditValue   = CurrentInfo.SendTime;
         this.te_tel.EditValue    = CurrentInfo.TelNum;
         this.te_email.EditValue  = CurrentInfo.Email;
     }
     else
     {
         ClearMsg();
     }
 }
Пример #23
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
         {
             string _ret = _csc.RecycleIISPool(AppName);
             if (_ret != "回收成功")
             {
                 MessageBox.Show(_ret, "失败");
             }
             else
             {
                 MessageBox.Show(_ret, "系统提示");
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "启动失败");
     }
 }
Пример #24
0
 private void SaveData()
 {
     using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
     {
         List<OrgExtBusinessObject> ChangedList = GetChangedOrgExtObj();
         List<OrgExtInfo> BeSavedDataList = new List<OrgExtInfo>();
         foreach (OrgExtBusinessObject _obj in ChangedList)
         {
             BeSavedDataList.Add(_obj.GetInfoData());
         }
         if (_csc.SaveOrgExtList(BeSavedDataList.ToArray(), PropertieDefines.ToArray()))
         {
             foreach (OrgExtBusinessObject _obj in ChangedList)
             {
                 _obj.AcceptChanged();
             }
             XtraMessageBox.Show("保存成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             XtraMessageBox.Show("保存失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Пример #25
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            if (gridView1.FocusedRowHandle >= 0)
            {
                GDSTokenRecord  _g      = gridView1.GetRow(this.gridView1.FocusedRowHandle) as GDSTokenRecord;
                Dialog_TokenSet _dialog = new Dialog_TokenSet(_g);
                if (_dialog.ShowDialog() == DialogResult.OK)
                {
                    using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
                    {
                        GDSTokenRecord _newRec = new GDSTokenRecord();
                        _newRec.ID          = _g.ID;
                        _newRec.RemoteIP    = _g.RemoteIP;
                        _newRec.TokenData   = MD5Base64.Encode(_dialog.TokenString);
                        _newRec.CommandName = _g.CommandName;

                        bool _ret = _csc.UpdateTokenRecord(_newRec);
                        if (_ret)
                        {
                            this.gridView1.BeginUpdate();
                            _g.TokenData = _newRec.TokenData;
                            this.gridView1.EndUpdate();
                            this.gridView1.RefreshData();
                        }
                        else
                        {
                            MessageBox.Show("删除失败!", "系统提示", MessageBoxButtons.OK);
                        }
                    }
                }
            }
            else
            {
                MessageBox.Show("请选择一个要重设令牌的记录!", "系统提示", MessageBoxButtons.OK);
            }
        }
Пример #26
0
        protected override bool ExcuteCommand(string _cmdName)
        {
            switch (_cmdName)
            {
            case "新增":
                Dialog_AddNotifyInfo _frmadd = new Dialog_AddNotifyInfo();
                _frmadd.InitNewData();
                if (_frmadd.ShowDialog() == DialogResult.OK)
                {
                    this.backgroundWorker1.RunWorkerAsync();
                }
                break;

            case "修改":
                if (CurrentInfo != null)
                {
                    if (CurrentInfo.FBdwid == SessionClass.CurrentSinoUser.CurrentPost.PostDWDM && CurrentInfo.FByhmc == SessionClass.CurrentSinoUser.UserName
                        )
                    {
                        Dialog_AddNotifyInfo _frmModify = new Dialog_AddNotifyInfo();
                        _frmModify.InitOldData(CurrentInfo);
                        if (_frmModify.ShowDialog() == DialogResult.OK)
                        {
                            ClearMsg();
                            this.backgroundWorker1.RunWorkerAsync();
                        }
                    }
                    else
                    {
                        XtraMessageBox.Show("您无权修改此记录!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                break;

            case "删除":
                if (CurrentInfo != null)
                {
                    if (CurrentInfo.FBdwid == SessionClass.CurrentSinoUser.CurrentPost.PostDWDM && CurrentInfo.FByhmc == SessionClass.CurrentSinoUser.UserName
                        )
                    {
                        if (XtraMessageBox.Show("您确认要删除此通知通告记录吗?", "系统提示", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
                        {
                            using (SinoSZClientBase.CommonService.CommonServiceClient _csc = new SinoSZClientBase.CommonService.CommonServiceClient())
                            {
                                if (_csc.DeleteNotifyInfo(CurrentInfo))
                                {
                                    XtraMessageBox.Show("删除成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                    ClearMsg();
                                    this.backgroundWorker1.RunWorkerAsync();
                                }
                                else
                                {
                                    XtraMessageBox.Show("删除失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                }
                            }
                        }
                    }
                    else
                    {
                        XtraMessageBox.Show("您无权删除此记录!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
                break;

            case "查询":
                break;
            }
            return(true);
        }