private void GetMsgDB(int ic) { DataTable auditUser = FlowAuditAction.GetAuditUser(ic); if (auditUser.Rows.Count > 0) { for (int i = 0; i < auditUser.Rows.Count; i++) { if (auditUser.Rows[i]["Operator"].ToString() != "") { string xgid = auditUser.Rows[i]["ID"].ToString(); string text = "您需要审核:"; string jsyhdm = auditUser.Rows[i]["Operator"].ToString(); userManageDb userManageDb = new userManageDb(); text = text + userManageDb.GetUserName(auditUser.Rows[i]["Organiger"].ToString()) + "发起的" + auditUser.Rows[i]["BusinessClassName"].ToString(); if (this.ckbIsSendInfo.Checked) { this.getPTDBSJ(xgid, text, jsyhdm); } if (this.ckbIsSendMsg.Checked) { this.GetSms(xgid, text, jsyhdm); } } } } }
private void SendSMS(int ic) { if (!this.ckbIsSendMsg.Checked || string.IsNullOrEmpty(ConfigHelper.Get("SMS"))) { return; } DataTable auditUser = FlowAuditAction.GetAuditUser(ic); for (int i = 0; i < auditUser.Rows.Count; i++) { if (auditUser.Rows[i]["Operator"].ToString() != "") { string str = auditUser.Rows[i]["Operator"].ToString(); userManageDb userManageDb = new userManageDb(); try { string userName = userManageDb.GetUserName(auditUser.Rows[i]["Organiger"].ToString()); string text = new CommunicationAction().BackUserName(this.UserCode); DataTable dataTable = publicDbOpClass.DataTableQuary(string.Concat(new string[] { "select businessclassname from wf_business_class where businesscode='", base.Request.QueryString["bc"], "' and businessclass='", base.Request.QueryString["bcl"], "'" })); if (dataTable.Rows.Count > 0) { string text2 = dataTable.Rows[0][0].ToString(); string text3 = ""; string sqlString = "select v_xm from pt_yhmc where v_yhdm='" + str + "'"; string str2 = publicDbOpClass.DataTableQuary(sqlString).Rows[0]["V_xm"].ToString(); string msg = string.Concat(new string[] { "公司短信:您好!", userName, "发起的", text2, "流程已由您的上一节点审核人", text, "审核通过,请您尽快查看审核!" }); string text4 = publicDbOpClass.ExecuteScalar("select mobilephonecode from pt_yhmc where v_xm='" + str2 + "'").ToString(); if (text4 != "") { SMS sMS = new SMS(); sMS.Send("", text4, msg, "", "", ""); } else { text3 = text3 + str2 + " "; } if (text3 != "") { this.Page.ClientScript.RegisterClientScriptBlock(base.GetType(), "", "alert('姓名为" + text3 + "号码不对.信息不能发送!')", true); } } } catch { } if (ConfigHelper.RTXEnabled == "1") { } } } }