/// <summary> /// 发手机短信 /// </summary> /// <param name="strMESSAGE_CONTENT">短消息内容</param> /// <param name="strSendUserID">发送人id</param> /// <param name="strAccUsers">接收人ID串,用逗号“,”分隔</param> /// <param name="isAtOnce">是否立即发送</param> /// <param name="strSEND_DATE">定期发送的时间,yyyy-MM-dd HH:mm:ss</param> /// <returns></returns> public void SendMobilMessage(string strMESSAGE_CONTENT, string strSendUserID, string strAccUsers, bool isAtOnce, string strSEND_DATE) { SMS.Db.connectionstring = strConnection; DataTable dtUser = new TSysUserLogic().SelectByTable(new TSysUserVo { IS_DEL = "0", IS_HIDE = "0", IS_USE = "1" }); DataRow[] drSenderS = dtUser.Select("id='" + strSendUserID + "'"); string strSendUser = ""; if (drSenderS.Length > 0) { strSendUser = drSenderS[0]["REAL_NAME"].ToString(); } if (strAccUsers.Length == 0) { return; } string[] arrAccUsers = strAccUsers.Split(','); if (arrAccUsers.Length > 0) { for (int i = 0; i < arrAccUsers.Length; i++) { if (arrAccUsers[i].Length > 0) { SMS.SmsVo sv = new SMS.SmsVo(); DataRow[] drAcceptS = dtUser.Select("id='" + arrAccUsers[i] + "'"); string strAcceptUser = ""; string strPhoneNumber = ""; if (drAcceptS.Length > 0) { strAcceptUser = drAcceptS[0]["REAL_NAME"].ToString(); strPhoneNumber = drAcceptS[0]["PHONE_MOBILE"].ToString(); } if (!isAtOnce)//定时发送 { sv.sendtime = strSEND_DATE; } sv.content = strMESSAGE_CONTENT; sv.receiver = strPhoneNumber; if (strPhoneNumber.Length > 0) { if (new SMS.SmsManager().IsDbConnect()) { new SMS.SmsManager().SendSmsMessage(sv); } } } } } }
public static List <object> GetSelectUserItems(string strUserID) { List <object> listResult = new List <object>(); DataTable dt = new DataTable(); DataTable dtDuty = new DataTable(); dt = new TSysUserLogic().SelectByTableUnderDept("", 0, 0); DataTable dtItems = new DataTable(); dtItems = dt.Copy(); dtItems.Clear(); if (strUserID.Length > 0) { for (int i = 0; i < strUserID.Split(',').Length; i++) { DataRow[] dr = dt.Select("ID='" + strUserID.Split(',')[i] + "'"); if (dr != null) { foreach (DataRow Temrow in dr) { dtItems.ImportRow(Temrow); } } } } listResult = LigerGridSelectDataToJson(dtItems, dtItems.Rows.Count); return(listResult); }
public static List <object> GetSubUserItems(string strPost_Dept, string strUserID) { List <object> listResult = new List <object>(); DataTable dt = new DataTable(); TSysUserVo objUser = new TSysUserVo(); objUser.IS_DEL = "0"; dt = new TSysUserLogic().SelectByTableUnderDept(strPost_Dept, 0, 0); DataTable dtItems = new DataTable(); dtItems = dt.Copy(); dtItems.Clear(); if (strUserID.Length > 0) { for (int i = 0; i < strUserID.Split(',').Length; i++) { DataRow[] dr = dt.Select("ID='" + strUserID.Split(',')[i] + "'"); if (dr != null) { foreach (DataRow Temrow in dr) { Temrow.Delete(); dt.AcceptChanges(); } } } } dtItems = dt.Copy(); listResult = LigerGridSelectDataToJson(dtItems, dtItems.Rows.Count); return(listResult); }
public static List <object> GetSubUserItems(string strPost_Dept, string strItemID, string strDutyType) { DataTable dt = new TSysUserLogic().SelectByTableUnderDept(strPost_Dept, 0, 0); TSysDutyVo objItems = new TSysDutyVo(); objItems.MONITOR_ITEM_ID = strItemID; objItems.DICT_CODE = strDutyType; DataTable dtDuty = new TSysDutyLogic().SelectByUnionTableForWhere(objItems, 0, 0); DataTable dtItems = new DataTable(); dtItems = dt.Copy(); dtItems.Clear(); if (dtDuty.Rows.Count > 0) { for (int i = 0; i < dtDuty.Rows.Count; i++) { if (!String.IsNullOrEmpty(dtDuty.Rows[i]["ID"].ToString())) { DataRow[] dr = dt.Select("ID='" + dtDuty.Rows[i]["ID"].ToString() + "'"); if (dr != null) { foreach (DataRow Temrow in dr) { Temrow.Delete(); dt.AcceptChanges(); } } } } } dtItems = dt.Copy(); List <object> listResult = LigerGridSelectDataToJson(dtItems, dtItems.Rows.Count); return(listResult); }