Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            RequestedEvents tl = obj as RequestedEvents;

            if ((object)tl == null)
            {
                return(false);
            }
            return((this.EventId == tl.EventId) && (this.TechLog_Client == tl.TechLog_Client) && (this.RequestedDate == tl.RequestedDate) && (this.CompletedDate == tl.CompletedDate) && (this.Status == tl.Status) && (this.Remarks == tl.Remarks && (this.SkillRequired == tl.SkillRequired)));
        }
Exemplo n.º 2
0
        public List <RequestedEvents> GetRequestedEvents()
        {
            Datahandler            dh     = Datahandler.getData();
            List <RequestedEvents> events = new List <RequestedEvents>();
            DataTable table = dh.readDataFromDB(DataAccesHelper.QueryGetRequestedEvents);

            foreach (DataRow item in table.Rows)
            {
                RequestedEvents tl = new RequestedEvents();
                tl.EventId        = Convert.ToInt32(item[DataAccesHelper.eventId].ToString());
                tl.TechLog_Client = new Client(item[DataAccesHelper.clientId].ToString(), item[DataAccesHelper.clientName].ToString(), item[DataAccesHelper.clientSurname].ToString(), new Address(), new Contact(), "", "", item[DataAccesHelper.clientIdentifier].ToString());
                tl.RequestedDate  = Convert.ToDateTime(item[DataAccesHelper.eventReqDate].ToString());
                try { tl.CompletedDate = Convert.ToDateTime(item[DataAccesHelper.eventCompDate].ToString()); } catch { }
                tl.Remarks       = item[DataAccesHelper.eventRemarks].ToString();
                tl.SkillRequired = item[DataAccesHelper.skillReq].ToString();
                tl.Status        = item[DataAccesHelper.eventStatus].ToString();
                tl.ScheduleOrder = Convert.ToInt32(item[DataAccesHelper.eventScheduleOrder].ToString());
                events.Add(tl);
            }

            return(events);
        }
Exemplo n.º 3
0
 public TechnicalLog(RequestedEvents reqEvent, Technicians tlTech)
 {
     this.ReqEvent = reqEvent;
     this.TlTech   = tlTech;
 }