Beispiel #1
0
 private void SendNewMsg()
 {
     if (InfoID == "")
     {
         if (this.te_CDDW.Code == -1)
         {
             XtraMessageBox.Show("请选择传达单位!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
         if (this.te_Title.EditValue == "" || this.te_Title.EditValue.ToString().Trim() == "")
         {
             XtraMessageBox.Show("请输入公告主题!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
         if (this.te_Context.EditValue == "" || this.te_Context.EditValue.ToString().Trim() == "")
         {
             XtraMessageBox.Show("请输入公告内容!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
         string  _cddw    = this.te_CDDW.DWDM.ToString();
         decimal _sfkj    = (this.te_Hide.SelectedIndex == 0) ? (decimal)0 : (decimal)1;
         string  _tel     = (this.te_Tel.EditValue == null) ? "" : this.te_Tel.EditValue.ToString();
         string  _email   = (this.te_Email.EditValue == null) ? "" : this.te_Email.EditValue.ToString();
         string  _title   = this.te_Title.EditValue.ToString();
         string  _context = this.te_Context.EditValue.ToString();
         using (MetaDataQueryServiceClient _rsc = new MetaDataQueryServiceClient())
         {
             if (_rsc.InsertNewDataCheckMsg(this.ShjlID, _title, _context, _cddw, _tel, _email, _sfkj))
             {
                 XtraMessageBox.Show("发布成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 this.DialogResult = DialogResult.OK;
                 this.Close();
             }
             else
             {
                 XtraMessageBox.Show("发布失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 return;
             }
         }
     }
     else
     {
         XtraMessageBox.Show("发布失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
 }