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)); }
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; }
public void DeleteTaskByUser(TaskByUser data) { Factory.DaoTaskByUser().Delete(data); }
public void UpdateTaskByUser(TaskByUser data) { Factory.DaoTaskByUser().Update(data); }
public TaskByUser SaveTaskByUser(TaskByUser data) { return Factory.DaoTaskByUser().Save(data); }
public IList<Document> GetTaskByUser(TaskByUser data, Location location) { return TranMngr.GetTaskByUser(data, location); }
public TaskByUser SelectById(TaskByUser data) { return (TaskByUser)base.SelectById(data); }
public Boolean Delete(TaskByUser data) { return base.Delete(data); }
public Boolean Update(TaskByUser data) { return base.Update(data); }
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; }
//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; } }