示例#1
0
 ///<summary>
 ///根据选中任务获得群组
 ///</summary>
 ///<returns></returns>
 public List<P_Group> GetGroups(bool isPass, S_SMSMission SMSMission)
 {
     if (SMSMission != null)
     {
         var list_R_Group_Mission = SMSMission.R_Group_Mission;
         var list_group = (
            from r in list_R_Group_Mission
            where r.isPass == isPass
            select r.P_Group
             ).ToList();
         return list_group;
     }
     return null;
 }
示例#2
0
        /// <summary>
        /// 执行修改操作
        /// </summary>
        /// <param name="mission"></param>
        /// <returns></returns>
        public ActionResult DoEditSMSMissionInfo(S_SMSMission mission)
        {
            if (smsmissionBLL.EditValidation(mission.SMID, mission.SMSMissionName)) { return Content("validation fails"); }
               //创建一个新的Action方法,需要对未提交的属性进行初始化赋值
                mission.isDel = false;
                mission.isMMS = false;
                mission.ModifiedOnTime = DateTime.Now;

                try
                {
                    smsmissionBLL.Update(mission);
                    return Content("ok");
                }
                catch
                {
                    return Content("error");
                }
        }
示例#3
0
        ///<summary>
        ///根据选中任务获得部门
        ///</summary>
        ///<returns></returns>
        public List<P_DepartmentInfo> GetDepartmemts(bool isPass, S_SMSMission SMSMission)
        {
            if(SMSMission != null)
            {
                //6月20日对查询进行修改
            var list_R_Department_Mission = SMSMission.R_Department_Mission;
                var list_department = (
                   from r in list_R_Department_Mission
                   where r.isPass == isPass
                   select r.P_DepartmentInfo
                    ).Select(r => r = new P_DepartmentInfo
                    {
                        Area = r.Area,
                        DepartmentName = r.DepartmentName,
                        DID = r.DID,
                        isDel = r.isDel,
                        PDID = r.PDID,
                        Remark = r.Remark,
                        Text = r.Text,
                        selected = true,
                        Checked = true,
                        IsPass = isPass
                    }).ToList();

                return list_department;
            }
            return null;
        }
示例#4
0
 /// <summary>
 /// 执行添加操作
 /// </summary>
 /// <param name="mission"></param>
 /// <returns></returns>
 public ActionResult DoAddSMSMissionInfo(S_SMSMission mission)
 {
     //数据验证
     if (smsmissionBLL.AddValidation(mission.SMSMissionName)) { return Content("validation fails"); }
     //创建一个新的Action方法,需要对未提交的属性进行初始化赋值
     mission.isDel = false;
     mission.isMMS = false;
     //mission.SubTime = DateTime.Now;
     mission.ModifiedOnTime = DateTime.Now;
     try
     {
         smsmissionBLL.Create(mission);
         return Content("ok");
     }
     catch
     {
         return Content("error");
     }
 }