/// <summary>
 /// 下发操作
 /// </summary>
 public bool Issue(int commandId, AdvertManage.Model.Enum.CommandType command)
 {
     try
     {
         foreach (SchoolNodes school in SchoolInfo)
         {
             if (school.IsChecked)
             {
                 AdvertManage.Model.AMS_CommandListModel model = new AdvertManage.Model.AMS_CommandListModel();
                 model.Command     = command;
                 model.CommandId   = commandId;
                 model.FinishFlag  = AdvertManage.Model.Enum.CommandHandleResult.Wait;
                 model.ReleaseTime = DateTime.Now;
                 model.SchoolId    = school.SchoolId;
                 AdvertManage.BLL.AMS_CommandBLL.AddAMS_CommandList(model);
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(ex.Message);
         return(false);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 绑定命令类型
        /// </summary>
        /// <param name="id"></param>
        /// <param name="commandType"></param>
        /// <param name="handleResult"></param>
        public void BindCommandModel(int id, AdvertManage.Model.Enum.CommandType commandType, AdvertManage.Model.Enum.CommandHandleResult handleResult)
        {
            CommandList.Clear();
            List <AdvertManage.Model.AMS_CommandListModel> cmdList = AdvertManage.BLL.AMS_CommandBLL.GetCommandListByCondition(id, commandType, handleResult);

            foreach (AdvertManage.Model.AMS_CommandListModel model in cmdList)
            {
                CommandList.Add(model);
            }
        }