Exemplo n.º 1
0
        /// <summary>
        ///统计当前用户下的自定义数据的数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.SDE.TD_MOUNTAIN.getNum(SystemCls.getCurUserOrgNo());
            return(Count);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取单条记录
        /// </summary>
        /// <returns></returns>
        public static OD_USER_Model getModel(OD_USER_SW sw)
        {
            OD_USER_Model m      = new OD_USER_Model();
            DataTable     dt     = BaseDT.OD_USER.getDT(sw);
            DataTable     dtUser = BaseDT.T_SYSSEC_USER.getDT(new T_SYSSEC_IPSUSER_SW {
                curOrgNo = SystemCls.getCurUserOrgNo()
            });

            if (dt.Rows.Count > 0)
            {
                int i = 0;
                m.ODUID          = dt.Rows[i]["ODUID"].ToString();
                m.ONDUTYDATE     = PublicClassLibrary.ClsSwitch.SwitDate(dt.Rows[i]["ONDUTYDATE"].ToString());
                m.BYORGNO        = dt.Rows[i]["BYORGNO"].ToString();
                m.ONDUTYUSERTYPE = dt.Rows[i]["ONDUTYUSERTYPE"].ToString();
                m.ONDUTYUSERID   = dt.Rows[i]["ONDUTYUSERID"].ToString();
                m.ISATTENDED     = dt.Rows[i]["ISATTENDED"].ToString();
                m.ATTENDEDTIME   = PublicClassLibrary.ClsSwitch.SwitTM(dt.Rows[i]["ATTENDEDTIME"].ToString());
                m.USERNAME       = BaseDT.T_SYSSEC_USER.getNameByUserList(dtUser, m.ONDUTYUSERID);
            }
            dt.Clear();
            dt.Dispose();
            dtUser.Clear();
            dtUser.Dispose();
            return(m);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 删除、处理
        /// </summary>
        /// <param name="m">参见模型T_IPS_HOTS_Model</param>
        /// <returns>参见模型Message</returns>
        public static Message Manager(T_IPS_HOTS_Model m)
        {
            if (m.opMethod == "Del")
            {
                T_IPS_HOTS_Model m1 = getModel(new T_IPS_HOTS_SW {
                    HOTSID = m.HOTSID
                });
                SystemCls.LogSave("5", "热点处理:" + m1.FXSJ, ClsStr.getModelContent(m1));
                Message msgUser = BaseDT.T_IPS_HOTS.Del(m);

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }
            if (m.opMethod == "Man")
            {
                T_IPS_HOTS_Model m1 = getModel(new T_IPS_HOTS_SW {
                    HOTSID = m.HOTSID
                });
                SystemCls.LogSave("4", "热点处理:" + m1.FXSJ, ClsStr.getModelContent(m1));
                Message msgUser = BaseDT.T_IPS_HOTS.Man(m);

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }

            return(new Message(false, "无效操作", ""));
        }
Exemplo n.º 4
0
 /// <summary>
 /// 增、删、改
 /// </summary>
 /// <param name="m">参见模型T_IPSFR_ROUTERAIL_Model</param>
 /// <returns>参见模型Message</returns>
 public static Message Manager(T_IPSFR_ROUTERAIL_Model m)
 {
     if (m.opMethod == "Add")
     {
         SystemCls.LogSave("3", "护林员路线添加:" + m.HID, ClsStr.getModelContent(m));
         Message msg = BaseDT.T_IPSFR_ROUTERAIL.Add(m);
         return(new Message(msg.Success, msg.Msg, ""));
     }
     if (m.opMethod == "AddBatch")
     {
         SystemCls.LogSave("3", "护林员路线添加:" + m.HID, ClsStr.getModelContent(m));
         Message msg = BaseDT.T_IPSFR_ROUTERAIL.AddBatch(m);
         return(new Message(msg.Success, msg.Msg, ""));
     }
     if (m.opMethod == "Mdy")
     {
         SystemCls.LogSave("4", "护林员路线修改:" + m.HID, ClsStr.getModelContent(m));
         Message msg = BaseDT.T_IPSFR_ROUTERAIL.Mdy(m);
         return(new Message(msg.Success, msg.Msg, ""));
     }
     if (m.opMethod == "Del")
     {
         SystemCls.LogSave("5", "护林员路线删除:" + m.HID, ClsStr.getModelContent(m));
         Message msg = BaseDT.T_IPSFR_ROUTERAIL.Del(m);
         return(new Message(msg.Success, msg.Msg, ""));
     }
     if (m.opMethod == "DelBatch")
     {
         SystemCls.LogSave("5", "护林员路线删除:" + m.HID, ClsStr.getModelContent(m));
         Message msg = BaseDT.T_IPSFR_ROUTERAIL.DelBatch(m);
         return(new Message(msg.Success, msg.Msg, ""));
     }
     return(new Message(false, "无效操作", ""));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 增、删、改
 /// </summary>
 /// <param name="m">参见模型</param>
 /// <returns>参见模型</returns>
 public static Message Manager(JC_PERALARM_Model m)
 {
     if (m.opMethod == "Add")
     {
         string[] arr = m.BYORGNOLIST.Split(',');
         for (int i = 0; i < arr.Length; i++)
         {
             m.BYORGNO = arr[i];
             BaseDT.JC_PERALARM.Add(m);
         }
         SystemCls.LogSave("3", "群众报警:" + m.PERALARMID, ClsStr.getModelContent(m));
         return(new Message(true, "添加成功", m.returnUrl));
     }
     if (m.opMethod == "Mdy")
     {
         SystemCls.LogSave("4", "群众报警:" + m.PERALARMID, ClsStr.getModelContent(m));
         Message msgUser = BaseDT.JC_PERALARM.Mdy(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     if (m.opMethod == "Del")
     {
         SystemCls.LogSave("5", "群众报警:" + m.PERALARMID, ClsStr.getModelContent(m));
         Message msgUser = BaseDT.JC_PERALARM.Del(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     if (m.opMethod == "Man")
     {
         SystemCls.LogSave("5", "群众报警:" + m.PERALARMID, ClsStr.getModelContent(m));
         Message msgUser = BaseDT.JC_PERALARM.Man(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     return(new Message(false, "无效操作", ""));
 }
Exemplo n.º 6
0
 /// <summary>
 /// 增、删、改
 /// </summary>
 /// <param name="m">参见模型</param>
 /// <returns>参见模型</returns>
 public static Message Manager(JC_FIRE_Model m)
 {
     if (m.opMethod == "Add")
     {
         SystemCls.LogSave("3", "转为火情:" + m.FIRENAME, ClsStr.getModelContent(m));
         Message msgUser = BaseDT.JC_FIRE.Add(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     if (m.opMethod == "Mdy")
     {
         Message msgUser = BaseDT.JC_FIRE.Mdy(m);
         return(new Message(msgUser.Success, msgUser.Msg, ""));
     }
     if (m.opMethod == "AddWX")
     {
         Message msgUser = BaseDT.JC_FIRE.Add(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     if (m.opMethod == "PLAdd")
     {
         Message msgUser = BaseDT.JC_FIRE.PLAdd(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     if (m.opMethod == "PLEnd")
     {
         Message msgUser = BaseDT.JC_FIRE.PLEnd(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     return(new Message(false, "无效操作", ""));
 }
Exemplo n.º 7
0
        /// <summary>
        /// 删除、处理
        /// </summary>
        /// <param name="m">参见模型T_IPS_ALARM_Model</param>
        /// <returns>参见模型Manager</returns>
        public static Message Manager(T_IPS_ALARM_Model m)
        {
            if (m.opMethod == "Del")
            {
                T_IPS_ALARM_Model m1 = getModel(new T_IPS_ALARM_SW {
                    ALARMID = m.ALARMID
                });
                SystemCls.LogSave("5", "报警处理:" + m.PHONE, ClsStr.getModelContent(m1));
                Message msgUser = BaseDT.T_IPS_ALARM.Del(m);

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }
            if (m.opMethod == "Man")
            {
                T_IPS_ALARM_Model m1 = getModel(new T_IPS_ALARM_SW {
                    ALARMID = m.ALARMID
                });
                SystemCls.LogSave("4", "报警处理:" + m.PHONE, ClsStr.getModelContent(m1));
                Message msgUser = BaseDT.T_IPS_ALARM.Man(m);

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }

            return(new Message(false, "无效操作", ""));
        }
Exemplo n.º 8
0
        /// <summary>
        /// 增、删、改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Manager(T_SYSSEC_ROLE_Model m)
        {
            if (m.opMethod == "Add")
            {
                SystemCls.LogSave("3", "角色:" + m.ROLENAME, ClsStr.getModelContent(m));
                Message msg0 = BaseDT.T_SYSSEC_ROLE.Add(m);
                if (msg0.Success == false)
                {
                    return(new Message(msg0.Success, msg0.Msg, ""));
                }

                //获取新添加的UserID
                DataTable dt = BaseDT.T_SYSSEC_ROLE.getDT(new T_SYSSEC_ROLE_SW {
                    ROLENAME = m.ROLENOTE, SYSFLAG = m.SYSFLAG
                });
                string ID = "";
                if (dt.Rows.Count > 0)
                {
                    ID = dt.Rows[0]["ROLEID"].ToString();
                }
                dt.Clear();
                dt.Dispose();

                Message msg = BaseDT.T_SYSSEC_ROLE_RIGHT.Save(new T_SYSSEC_ROLE_RIGHT_Model {
                    RIGHTID = m.rightIDList, ROLEID = m.ROLEID
                });
                return(new Message(true, "添加成功!", m.returnUrl));
            }
            if (m.opMethod == "Mdy")
            {
                SystemCls.LogSave("4", "角色:" + m.ROLENAME, ClsStr.getModelContent(m));
                Message msg0 = BaseDT.T_SYSSEC_ROLE.Mdy(m);
                if (msg0.Success == false)
                {
                    return(new Message(msg0.Success, msg0.Msg, ""));
                }

                Message msg = BaseDT.T_SYSSEC_ROLE_RIGHT.Save(new T_SYSSEC_ROLE_RIGHT_Model {
                    RIGHTID = m.rightIDList, ROLEID = m.ROLEID
                });
                return(new Message(true, "修改成功!", m.returnUrl));
            }
            if (m.opMethod == "Del")
            {
                SystemCls.LogSave("5", "角色:" + m.ROLENAME, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_SYSSEC_ROLE.Del(m);
                if (msgUser.Success == false)
                {
                    return(new Message(msgUser.Success, msgUser.Msg, ""));
                }

                Message msg = BaseDT.T_SYSSEC_ROLE_RIGHT.Save(new T_SYSSEC_ROLE_RIGHT_Model {
                    RIGHTID = "", ROLEID = m.ROLEID
                });
                return(new Message(true, "删除成功!", m.returnUrl));
            }
            return(new Message(false, "无效操作", ""));
        }
Exemplo n.º 9
0
        /// <summary>
        ///统计当前用户下的宣传碑牌的记录数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.DC_UTILITY_PROPAGANDASTELE.getNum(new DC_UTILITY_PROPAGANDASTELE_SW {
                BYORGNO = SystemCls.getCurUserOrgNo()
            });
            return(Count);
        }
Exemplo n.º 10
0
        /// <summary>
        ///统计未读的邮件数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.E_RECEIVE.getNum(new E_RECEIVE_SW {
                EMAILRECEIVESTATUS = "0", RECEIVEUSERID = SystemCls.getUserID()
            });
            return(Count);
        }
Exemplo n.º 11
0
        /// <summary>
        ///统计当前用户下的车辆数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.DC_CAR.getNum(new DC_CAR_SW {
                BYORGNO = SystemCls.getCurUserOrgNo()
            });
            return(Count);
        }
Exemplo n.º 12
0
        /// <summary>
        ///统计当前用户下的防火通道的记录数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.DC_UTILITY_FIRECHANNEL.getNum(new DC_UTILITY_FIRECHANNEL_SW {
                BYORGNO = SystemCls.getCurUserOrgNo()
            });
            return(Count);
        }
Exemplo n.º 13
0
        /// <summary>
        ///获取植物的记录数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.WILD_BOTANYDISTRIBUTE.getNum(new WILD_BOTANYDISTRIBUTE_SW {
                BYORGNO = SystemCls.getCurUserOrgNo()
            });
            return(Count);
        }
Exemplo n.º 14
0
        /// <summary>
        ///统计当前用户下的瞭望台的记录数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.DC_UTILITY_OVERWATCH.getNum(new DC_UTILITY_OVERWATCH_SW {
                ORGNOS = SystemCls.getCurUserOrgNo()
            });
            return(Count);
        }
Exemplo n.º 15
0
        /// <summary>
        ///统计当前用户下的监测站的记录数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.DC_UTILITY_MONITORINGSTATION.getNum(new DC_UTILITY_MONITORINGSTATION_SW {
                BYORGNO = SystemCls.getCurUserOrgNo()
            });
            return(Count);
        }
Exemplo n.º 16
0
        /// <summary>
        ///统计当前用户下的隔离带的记录数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.DC_UTILITY_ISOLATIONSTRIP.getNum(new DC_UTILITY_ISOLATIONSTRIP_SW {
                BYORGNO = SystemCls.getCurUserOrgNo()
            });
            return(Count);
        }
Exemplo n.º 17
0
        /// <summary>
        ///统计当前用户下的资源的记录数量
        /// </summary>
        /// <returns></returns>
        public static string getCount()
        {
            var Count = "";

            Count = BaseDT.DC_RESOURCE_NEW.getNum(new DC_RESOURCE_NEW_SW {
                ORGNOS = SystemCls.getCurUserOrgNo()
            });
            return(Count);
        }
Exemplo n.º 18
0
        /// <summary>
        /// 删除、处理
        /// </summary>
        /// <param name="m">参见模型T_IPSCOL_COLLECT_Model</param>
        /// <returns>参见模型Message</returns>
        public static Message Manager(T_IPSCOL_COLLECT_Model m)
        {
            if (m.opMethod == "Del")
            {
                SystemCls.LogSave("5", "采集删除序号:" + m.COLLECTID, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_IPSCOL_COLLECT.Del(new T_IPSCOL_COLLECT_SW {
                    COLLECTID = m.COLLECTID
                });

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }
            if (m.opMethod == "DelDetail")
            {
                SystemCls.LogSave("5", "采集明细删除序号:" + m.COLLECTDETAILID, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_IPSCOL_COLLECT.DelDetail(new T_IPSCOL_COLLECT_SW {
                    COLLECTDETAILID = m.COLLECTDETAILID
                });

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }
            if (m.opMethod == "ModifyDetail")
            {
                SystemCls.LogSave("9", "数据采集坐标点修改" + m.COLLECTID, ClsStr.getModelContent(m));
                Message msg = BaseDT.T_IPSCOL_COLLECT.DelDetail(new T_IPSCOL_COLLECT_SW {
                    COLLECTID = m.COLLECTID
                });
                if (msg.Success == true)
                {
                    Message msgUser = null;
                    foreach (var item in m.DataList)
                    {
                        msgUser = BaseDT.T_IPSCOL_COLLECT.AddDetail(item);
                    }
                    return(new Message(msgUser.Success, "数据采集坐标点修改成功!", ""));
                }
                return(new Message(msg.Success, "数据采集坐标点修改失败!", ""));
            }
            if (m.opMethod == "DelUpload")
            {
                SystemCls.LogSave("5", "采集文件删除序号:" + m.COLLECTUPLOADID, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_IPSCOL_COLLECT.DelUpload(new T_IPSCOL_COLLECT_SW {
                    COLLECTUPLOADID = m.COLLECTUPLOADID
                });

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }
            if (m.opMethod == "Man")
            {
                SystemCls.LogSave("4", "采集处理:" + m.COLLECTDETAILID, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_IPSCOL_COLLECT.Man(m);

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }

            return(new Message(false, "无效操作", ""));
        }
Exemplo n.º 19
0
        /// <summary>
        /// 获取顶部火险等级
        /// </summary>
        /// <returns></returns>
        public static string getTopFireLevel()
        {
            string tmp = T_SYSSEC_USER_DEFINPROPCls.getPROPVALUEByUIDDICTVALUE(new T_SYSSEC_USER_DEFINPROP_SW {
                UID = SystemCls.getUserID(), DICTVALUE = "5"
            });                                                                                                                                                 //用户自定义系统Logo名称

            if (string.IsNullOrEmpty(tmp) == false)
            {
                return(tmp);
            }
            return("1"); //"默认显示";
        }
Exemplo n.º 20
0
        /// <summary>
        /// 获取系统Logo图片
        /// </summary>
        /// <returns></returns>
        public static string getSystemLogo()
        {
            string tmp = T_SYSSEC_USER_DEFINPROPCls.getPROPVALUEByUIDDICTVALUE(new T_SYSSEC_USER_DEFINPROP_SW {
                UID = SystemCls.getUserID(), DICTVALUE = "2"
            });                                                                                                                                                 //用户自定义系统Logo名称

            if (string.IsNullOrEmpty(tmp) == false)
            {
                return(tmp);
            }
            return("yjjc_logo.png"); //"智能巡护系统";
        }
Exemplo n.º 21
0
        /// <summary>
        /// 系统名称
        /// </summary>
        /// <returns>系统名称</returns>
        public static string getSystemName()
        {
            string tmp = T_SYSSEC_USER_DEFINPROPCls.getPROPVALUEByUIDDICTVALUE(new T_SYSSEC_USER_DEFINPROP_SW {
                UID = SystemCls.getUserID(), DICTVALUE = "3"
            });                                                                                                                                               //用户自定义系统名称

            if (string.IsNullOrEmpty(tmp) == false)
            {
                return(tmp);
            }
            return(ConfigurationManager.AppSettings["getSystemName"].ToString()); //"智能巡护系统";
        }
Exemplo n.º 22
0
        /// <summary>
        /// 登录后跳转显示页面 即登录成功后跳转的页面
        /// </summary>
        /// <returns>/Home/Index</returns>
        public static string getLoginRedirectUrl()
        {
            //从config里读取首页
            if (ConfigurationManager.AppSettings["LoginRedirectUrlType"].ToString() == "0")
            {
                return(ConfigurationManager.AppSettings["LoginRedirectUrl"].ToString());
            }
            //获取有权限的所有菜单
            var result = T_SYS_MENUCls.getT_SYS_MENUModel(new T_SYS_MENU_SW {
                UID = SystemCls.getUserID(), SYSFLAG = ConfigCls.getSystemFlag()
            });
            var    v   = result.Where(p => p.ISTOPMENU == "1" && p.MENUCODE.Length == 3).FirstOrDefault();//获取顶部菜单
            var    vv  = v.subMenuModel.Where(p => p.MENUCODE.Length == 6).FirstOrDefault();
            string url = vv.MENUURL;

            return(url);
        }
Exemplo n.º 23
0
        /// <summary>
        /// 增、删、改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message ManagerPhoto(JC_INFRAREDCAMERA_PHOTO_Model m)
        {
            if (m.opMethod == "Del")
            {
                SystemCls.LogSave("5", "红外相机图片:" + m.smid, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.JC_INFRAREDCAMERA_PHOTO.Del(m);
                return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
            }

            if (m.opMethod == "Man")
            {
                SystemCls.LogSave("5", "红外相机图片:" + m.smid, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.JC_INFRAREDCAMERA_PHOTO.Man(m);
                return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
            }
            return(new Message(false, "无效操作", ""));
        }
Exemplo n.º 24
0
        /// <summary>
        /// 数据采集处理
        /// </summary>
        /// <param name="m">参见模型T_COLLECTLINES_Model</param>
        /// <returns>参见模型Message</returns>
        public static Message Manager(T_COLLECTLINES_Model m)
        {
            if (m.opMethod == "ADD")
            {
                T_COLLECTLINES_SW sw = new T_COLLECTLINES_SW();
                var id = BaseDT.T_COLLECTLINES.GetLineMaxObjID();
                sw.OBJECTID = Convert.ToInt32(id) + 1;
                sw.NAME     = m.NAME;
                sw.TypeId   = m.TypeId;
                sw.Shape    = m.Shape;
                SystemCls.LogSave("11", "空间线:" + m.NAME, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_COLLECTLINES.AddLines(sw);
                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }

            return(new Message(false, "无效操作", ""));
        }
Exemplo n.º 25
0
        /// <summary>
        /// 是否显示OA集成信息   考勤  待办  拟办  短信
        /// </summary>
        /// <returns></returns>
        public static string getOAShowMethod()
        {
            string tmp = T_SYSSEC_USER_DEFINPROPCls.getPROPVALUEByUIDDICTVALUE(new T_SYSSEC_USER_DEFINPROP_SW {
                UID = SystemCls.getUserID(), DICTVALUE = "1"
            });                                                                                                                                                 //用户自定义系统名称

            if (string.IsNullOrEmpty(tmp) == false)
            {
                return(tmp);
            }

            string str = ConfigurationManager.AppSettings["getOAShowMethod"].ToString();

            if (string.IsNullOrEmpty(str))
            {
                str = "0";
            }
            return(str);
        }
Exemplo n.º 26
0
        /// <summary>
        /// 增、删、改
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Manager(T_SYSSEC_RIGHT_Model m)
        {
            if (m.opMethod == "Add")
            {
                SystemCls.LogSave("3", "权限:" + m.RIGHTNAME, ClsStr.getModelContent(m));
                return(BaseDT.T_SYSSEC_RIGHT.Add(m));
            }
            if (m.opMethod == "Mdy")
            {
                SystemCls.LogSave("4", "权限:" + m.RIGHTNAME, ClsStr.getModelContent(m));
                return(BaseDT.T_SYSSEC_RIGHT.Mdy(m));
            }
            if (m.opMethod == "Del")
            {
                SystemCls.LogSave("5", "权限:" + m.RIGHTNAME, ClsStr.getModelContent(m));
                return(BaseDT.T_SYSSEC_RIGHT.Del(m));
            }

            return(new Message(false, "无效操作", ""));
        }
Exemplo n.º 27
0
        /// <summary>
        /// 短信发送
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public static Message SEND(SendMessage_Model m)
        {
            string name        = SystemCls.getCookieInfo().trueName;
            string title       = m.MessageTitle;
            string MessageName = m.MessageName;
            string phone       = m.PHONE;

            if (string.IsNullOrEmpty(phone))
            {
                return(new Message(false, "该成员未录入号码", m.URL));
            }
            string phonelist = "";

            string[]      arr  = m.PHONE.Split(',');
            string[]      brr  = arr.Where(s => !string.IsNullOrEmpty(s)).ToArray();
            List <string> list = new List <string>();

            foreach (string eachString in brr)//去掉重复的手机号码
            {
                if (!list.Contains(eachString))
                {
                    list.Add(eachString);
                }
            }
            brr = list.ToArray();
            for (int i = 0; i < brr.Length; i++)
            {
                if (i == brr.Length - 1)
                {
                    phonelist += brr[i];
                }
                else
                {
                    phonelist += brr[i] + ",";
                }
            }
            string content = m.MessageContent;
            var    ms      = SmsHelp.SmsCom.SendMsg(content, phonelist);

            return(new Message(ms.Success, ms.Msg, m.URL));
        }
Exemplo n.º 28
0
        /// <summary>
        /// 删除、处理
        /// </summary>
        /// <param name="m">参见模型</param>
        /// <returns>参见模型</returns>
        public static Message Manager(T_IPSRPT_REPORT_Model m)
        {
            if (m.opMethod == "Del")
            {
                SystemCls.LogSave("5", "上报删除序号:" + m.REPORTID, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_IPSRPT_REPORT.Del(new T_IPSRPT_REPORT_SW {
                    REPORTID = m.REPORTID
                });

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }
            if (m.opMethod == "DelDetail")
            {
                SystemCls.LogSave("5", "上报明细删除序号:" + m.REPORTDETAILID, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_IPSRPT_REPORT.DelDetail(new T_IPSRPT_REPORT_SW {
                    REPORTDETAILID = m.REPORTDETAILID
                });

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }
            if (m.opMethod == "DelUpload")
            {
                SystemCls.LogSave("5", "上报文件删除序号:" + m.REPORTUPLOADID, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_IPSRPT_REPORT.DelUpload(new T_IPSRPT_REPORT_SW {
                    REPORTUPLOADID = m.REPORTUPLOADID
                });

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }
            if (m.opMethod == "Man")
            {
                SystemCls.LogSave("4", "上报处理:" + m.REPORTDETAILID, ClsStr.getModelContent(m));
                Message msgUser = BaseDT.T_IPSRPT_REPORT.Man(m);

                return(new Message(msgUser.Success, msgUser.Msg, ""));
            }

            return(new Message(false, "无效操作", ""));
        }
Exemplo n.º 29
0
 /// <summary>
 /// 增、删、改
 /// </summary>
 /// <param name="m">参见模型</param>
 /// <returns>参见模型</returns>
 public static Message Manager(T_SYS_NOTICE_Model m)
 {
     if (m.opMethod == "Add")
     {
         SystemCls.LogSave("3", "通知公告:" + m.INFOTITLE, ClsStr.getModelContent(m));
         Message msgUser = BaseDT.T_SYS_NOTICE.Add(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     if (m.opMethod == "Mdy")
     {
         SystemCls.LogSave("4", "通知公告:" + m.INFOTITLE, ClsStr.getModelContent(m));
         Message msgUser = BaseDT.T_SYS_NOTICE.Mdy(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     if (m.opMethod == "Del")
     {
         SystemCls.LogSave("5", "通知公告:" + m.INFOTITLE, ClsStr.getModelContent(m));
         Message msgUser = BaseDT.T_SYS_NOTICE.Del(m);
         return(new Message(msgUser.Success, msgUser.Msg, m.returnUrl));
     }
     return(new Message(false, "无效操作", ""));
 }
Exemplo n.º 30
0
        /// <summary>
        /// 根据当前单位获取气象信息
        /// </summary>
        /// <param name="sw">参见模型</param>
        /// <returns>返回气象信息</returns>
        public static string getWeather(YJ_WEATHER_SW sw)
        {
            if (string.IsNullOrEmpty(sw.BYORGNO))
            {
                sw.BYORGNO = SystemCls.getCurUserOrgNo();
            }
            YJ_WEATHER_Model wm = YJ_WEATHERCls.getModel(new YJ_WEATHER_SW {
                BYORGNO = sw.BYORGNO
            });

            string str;

            if (string.IsNullOrEmpty(wm.WEATHERDATE) == false)// (!string.IsNullOrEmpty(wm.THIGH) && !string.IsNullOrEmpty(wm.THIGH) && !string.IsNullOrEmpty(wm.THIGH))
            {
                str = "[" + PublicClassLibrary.ClsSwitch.SwitDate(wm.WEATHERDATE) + " " + wm.orgName + "] 最高气温" + wm.THIGH + "℃,最低气温" + wm.TLOWER + "℃,雨量" + wm.P + "mm";
            }
            else
            {
                str = "暂无气象信息";
            }
            return(str);
        }