示例#1
0
 public IList <TicketComments> GetTicketCommentsByTicketId(long TicketId)
 {
     try
     {
         IList <TicketComments> TicketComments = null;
         if (TicketId > 0)
         {
             TicketComments = PSF.GetListById <TicketComments>("TicketId", TicketId);
         }
         else
         {
             throw new Exception("Id is required and it cannot be 0");
         }
         return(TicketComments);
     }
     catch (Exception)
     {
         throw;
     }
 }
        public bool BulkCompleteInformationActivity(string Template, string userId, long[] ActivityId)
        {
            bool             retValue        = false;
            IList <Activity> CurrentActivity = PSF.GetListById <Activity>("Id", ActivityId);

            if (CurrentActivity != null && CurrentActivity.Count > 0 && CurrentActivity.First() != null)
            {
                foreach (Activity ac in CurrentActivity)
                {
                    ac.Completed = true;
                    ac.Available = false;
                    ac.Assigned  = false;
                    ac.Performer = userId;
                    PSF.SaveOrUpdate(ac);
                    ProcessInstance pi = PSF.Get <ProcessInstance>(ac.InstanceId);
                    pi.Status = "Completed";
                    PSF.SaveOrUpdate(pi);
                    retValue = true;
                }
            }
            return(retValue);
        }