public DataResult SendIM(NoticeBindingModel data) { object[] results = this.Invoke("SendIM", new object[] { data }); return((DataResult)(results[0])); }
public DataResult SendNotice(string id, NoticeBindingModel data) { object[] results = this.Invoke("SendNotice", new object[] { id, data }); return((DataResult)(results[0])); }
/// <remarks/> public void SendIMAsync(NoticeBindingModel data, object userState) { if ((this.SendIMOperationCompleted == null)) { this.SendIMOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSendIMOperationCompleted); } this.InvokeAsync("SendIM", new object[] { data }, this.SendIMOperationCompleted, userState); }
private void butjj_Click(object sender, EventArgs e) { try { if (dgvyjsq.DataSource == null) { return; } DataTable tb = (DataTable)dgvyjsq.DataSource; DataRow[] rows = tb.Select("SELECTED=true"); if (rows.Length == 0) { MessageBox.Show("请选择申请记录!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DataTable newtb = tb.Clone(); for (int i = 0; i <= rows.Length - 1; i++) { newtb.ImportRow(rows[i]); } if (MessageBox.Show(this, "您确定要拒绝这 " + rows.Length.ToString() + " 条申请记录吗?", "确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { return; } // frmqr formyjqr = new frmqr(); // if (newtb.Rows.Count == 1) // { //formyjqr.lbName.Text = newtb.Rows[0]["brxm"].ToString(); //formyjqr.lbSex.Text = newtb.Rows[0]["xb"].ToString(); //formyjqr.lbPatientNo.Text = newtb.Rows[0]["INPATIENT_NO"].ToString(); //formyjqr.txtDoctor.Tag = jcys_id.ToString(); //formyjqr.txtDoctor.Text = jcys_name.ToString(); //} //formyjqr.ShowDialog(); //if (formyjqr.bok == false) return; //jcys_id = Convert.ToInt32(Convertor.IsNull(formyjqr.txtDoctor.Tag, "0")); //jcys_name = formyjqr.txtDoctor.Text; string sDate = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToString(); //登记时间 int jcys = 0; // Convert.ToInt32(Convertor.IsNull(formyjqr.txtDoctor.Tag, "0")); string jcrq = ""; // formyjqr.dtp.Value.ToShortDateString(); string jgwz = ""; int err_code = -1; string err_text = ""; System.Collections.Generic.List <NoticeBindingModel> datalist = new System.Collections.Generic.List <NoticeBindingModel>(); try { InstanceForm.BDatabase.BeginTransaction(); for (int i = 0; i <= newtb.Rows.Count - 1; i++) { Guid orderid = new Guid(newtb.Rows[i]["yzid"].ToString()); Guid orderexec_id = new Guid(newtb.Rows[i]["yzzxid"].ToString()); Guid yjsqid = new Guid(newtb.Rows[i]["yjsqid"].ToString()); decimal je = Convert.ToDecimal(newtb.Rows[i]["je"].ToString()); int btfbz = Convert.ToInt16(newtb.Rows[i]["btfbz"].ToString()); int bscqrbz = btfbz == 1 ? 0 : 1; Guid newqrid = Guid.Empty; yjqr.yj_zysq_qrjl(orderid, orderexec_id, yjsqid, je, InstanceForm.BCurrentDept.DeptId, sDate, InstanceForm.BCurrentUser.EmployeeId, bscqrbz, jcrq, jcys, jgwz, out newqrid, out err_code, out err_text, 1, InstanceForm.BDatabase); if (err_code != 0 || newqrid == Guid.Empty) { throw new Exception(err_text); } TrasenHIS.Notice.NoticeBindingModel model = new TrasenHIS.Notice.NoticeBindingModel(); model.Title = "医技拒绝确认通知"; model.Content = "【" + FrmMdiMain.CurrentDept.DeptName + "】操作员【" + FrmMdiMain.CurrentUser.Name + "】拒绝了【" + newtb.Rows[i]["SQKS"].ToString() + "】【住院号" + newtb.Rows[i]["inpatient_no"].ToString() + "】【" + newtb.Rows[i]["bedno"].ToString() + "床】【" + newtb.Rows[i]["brxm"].ToString() + "】的医技申请:" + newtb.Rows[i]["SQNR"].ToString(); //model.ReceiverType = ReceiveType.WorkCode; model.ReceiverType = ReceiveType.WorkCode; model.Receiver = newtb.Rows[i]["sqid"].ToString(); //model.Receiver = "5161"; datalist.Add(model); } InstanceForm.BDatabase.CommitTransaction(); } catch (System.Exception err) { InstanceForm.BDatabase.RollbackTransaction(); throw new Exception(err.Message); } SystemCfg sc = new SystemCfg(10024); if (sc != null && sc.Config == "0") { //调用i呼接口 Modify By Tany 2015-06-30 if (datalist.Count > 0) { TrasenHIS.Notice.Notice im = new Notice(); foreach (NoticeBindingModel model in datalist) { DataResult dr = im.SendIM(model); } } } BDelRow = true; for (int i = 0; i <= rows.Length - 1; i++) { DataRow row = rows[i]; tb.Rows.Remove(row); } BDelRow = false; } catch (Exception ee) { BDelRow = false; MessageBox.Show(ee.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <remarks/> public void SendNoticeAsync(string id, NoticeBindingModel data) { this.SendNoticeAsync(id, data, null); }
/// <remarks/> public void SendIMAsync(NoticeBindingModel data) { this.SendIMAsync(data, null); }