public Issue UpdateModel(Issue dbm)
 {
     dbm.assignedid = assignedid;
     dbm.startdate  = DateUtils.ConvertToTimeStamp(startdate + " " + starttime);
     dbm.enddate    = DateUtils.ConvertToTimeStamp(enddate + " " + endtime);
     return(dbm);
 }
Example #2
0
        public Issue CreateModel()
        {
            Issue model = new Issue();

            model.status       = Issue.STATUS_PRELIMINARY;
            model.customerid   = this.customerid;
            model.assignedid   = this.assignedid;
            model.residentid   = this.residentid;
            model.prio         = this.prio;
            model.responsible  = this.responsible;
            model.areatype     = this.areatype;
            model.issueclassid = this.issueclassid;
            model.name         = this.name;
            model.description  = this.description;
            model.startdate    = DateUtils.ConvertToTimeStamp(this.startdatestring + " " + this.starttimestring);
            model.enddate      = DateUtils.ConvertToTimeStamp(this.enddatestring + " " + this.endtimestring);
            model.firstname    = this.firstname;
            model.lastname     = this.lastname;
            model.phone        = this.phone;
            model.email        = this.email;
            model.address      = this.address;
            model.floor        = this.floor;
            model.apartment    = this.apartment;
            return(model);
        }
Example #3
0
        protected long ValidateDateTime(string date, string time, string error)
        {
            date = CheckAndTrim(date, error);
            long timestamp = DateUtils.ConvertToTimeStamp(date + " " + time);

            if (timestamp == 0)
            {
                throw new ServerValidateException(error);
            }
            return(timestamp);
        }
Example #4
0
 public Offer UpdateModel(Offer model, Account author)
 {
     model.customerid = this.customerid;
     model.category   = this.category;
     model.headline   = this.headline;
     model.message    = this.message;
     model.author     = author.Name;
     model.sent       = DateUtils.TimeStamp;
     model.showfrom   = DateUtils.ConvertToTimeStamp(this.showfromdate + " " + this.showfromtime);
     model.showuntil  = DateUtils.ConvertToTimeStamp(this.showuntildate + " " + this.showuntiltime);
     return(model);
 }
Example #5
0
 public News UpdateModel(News model, Account author)
 {
     model.customerid = this.customerid;
     model.category   = this.category;
     model.headline   = this.headline;
     model.message    = this.message;
     model.author     = author.IsAtMostCustomer() ? author.Name : author.Name + " (Renew)";
     model.sent       = DateUtils.TimeStamp;
     model.showfrom   = DateUtils.ConvertToTimeStamp(this.showfromdate + " " + this.showfromtime);
     model.showuntil  = DateUtils.ConvertToTimeStamp(this.showuntildate + " " + this.showuntiltime);
     return(model);
 }
Example #6
0
 public Issue UpdateModel(Issue model)
 {
     model.name         = this.name;
     model.assignedid   = this.assignedid;
     model.startdate    = DateUtils.ConvertToTimeStamp(this.startdatestring + " " + this.starttimestring);
     model.enddate      = DateUtils.ConvertToTimeStamp(this.enddatestring + " " + this.endtimestring);
     model.issueclassid = this.issueclassid;
     model.prio         = this.prio;
     model.responsible  = this.responsible;
     model.areatype     = this.areatype;
     model.description  = this.description;
     return(model);
 }