Example #1
0
        public override Boolean Equals(object obj)
        {
            if ((obj == null) || (obj.GetType() != this.GetType()))
            {
                return(false);
            }
            TaskByUser castObj = (TaskByUser)obj;

            return((castObj != null) &&
                   (this.RowID == castObj.RowID));
        }
Example #2
0
        public IList<TaskByUser> Select(TaskByUser data)
        {
            IList<TaskByUser> datos = new List<TaskByUser>();

            try {
            datos = GetHsql(data).List<TaskByUser>();
            if (!Factory.IsTransactional)
                Factory.Commit();
            }
            catch (Exception e)
            {
                NHibernateHelper.WriteEventLog(WriteLog.GetTechMessage(e));
            }

            return datos;
        }
Example #3
0
 public void DeleteTaskByUser(TaskByUser data) { Factory.DaoTaskByUser().Delete(data); }
Example #4
0
 public void UpdateTaskByUser(TaskByUser data) { Factory.DaoTaskByUser().Update(data); }
Example #5
0
 public TaskByUser SaveTaskByUser(TaskByUser data) { return Factory.DaoTaskByUser().Save(data); }
Example #6
0
 public IList<Document> GetTaskByUser(TaskByUser data, Location location) 
 {
     return TranMngr.GetTaskByUser(data, location);
 }
Example #7
0
 public TaskByUser SelectById(TaskByUser data)
 {
     return (TaskByUser)base.SelectById(data);
 }
Example #8
0
 public Boolean Delete(TaskByUser data)
 {
     return base.Delete(data);
 }
Example #9
0
 public Boolean Update(TaskByUser data)
 {
     return base.Update(data);
 }
Example #10
0
 public TaskByUser Save(TaskByUser data)
 {
     return (TaskByUser)base.Save(data);
 }
        public IList<Document> GetTaskByUser(TaskByUser data, Location location)
        {
            IList<Document> list;

            try
            {
                list = Factory.DaoTaskByUser().Select(data).Select(f => f.TaskDocument).ToList();
            }
            catch
            {
                list = new List<Document>();
            }


            list = list.Union<Document>(
                Factory.DaoDocument().SelectPending(new Document
                {
                    Location = location,
                    DocType = new DocumentType { DocClass = new DocumentClass { DocClassID = SDocClass.Task } }

                }, WmsSetupValues.HistoricDaysToShow, WmsSetupValues.NumRegsDevice)
             ).ToList<Document>();


            return list;
        }
Example #12
0
        //Asocia los usuarios que van a trabajar en un documento de recibo o despacho
        public void AssociateUserDocument(Document document, IList<SysUser> userList)
        {
            try
            {
                //Start Transaction
                Factory.IsTransactional = true;

                //Asocia los documentos del Task a TaskDocument
                TaskByUser TaskByUserRel;
                foreach (SysUser curUser in userList)
                {
                    TaskByUserRel = new TaskByUser
                    {
                        TaskDocument = document,
                        User = curUser,
                        CreatedBy = "",
                        CreationDate = DateTime.Now
                    };

                    Factory.DaoTaskByUser().Save(TaskByUserRel);
                }

            }

            catch (Exception ex)
            {
                Factory.Rollback();
                ExceptionMngr.WriteEvent("AssociteUserDocument:Doc#" + document.DocNumber, ListValues.EventType.Fatal, ex, null, ListValues.ErrorCategory.Business);
                throw;
            }
        }