コード例 #1
0
 public void Update(int id, WebLocation location, DeveloperTeam team, bool broken, string name)
 {
     this.Id = id;
     this.IsBroken = broken;
     this.Team = team;
     this.Location = location;
     this.Name = name;
 }
コード例 #2
0
 public Feature(WebLocation location, DeveloperTeam team, bool broken, string name)
 {
     this.Id = ++IdNumber;
     this.IsBroken = broken;
     this.Team = team;
     this.Location = location;
     this.Name = name;
 }
コード例 #3
0
        public static void PostDeveloperTeam(List<Dto.Developer> devs, string name)
        {
            List<Dmn.Developer> dmnDevs = new List<Domain.Developer>();

            foreach (Dto.Developer dev in devs)
            {
                dmnDevs.Add(new Dmn.Developer(dev.Id, dev.Name, dev.PhoneNumber, dev.Email));
            }

            Dmn.DeveloperTeam devTeam = new Dmn.DeveloperTeam(dmnDevs, name);
            Dmn.DummyDatabase.DeveloperTeams.Add(devTeam);
        }
コード例 #4
0
        public static Dto.Feature PostFeature(string url, string website, string webpage, int id, List<Dto.Developer> devs, string teamName, bool isBroken, string featureName)
        {
            List<Dmn.Developer> dmnDevs = new List<Domain.Developer>();

            foreach (Dto.Developer dev in devs)
            {
                dmnDevs.Add(new Dmn.Developer(dev.Name, dev.PhoneNumber, dev.Email));
            }

            Dmn.WebLocation location = new Dmn.WebLocation(url, website, webpage);
            Dmn.DeveloperTeam team = new Dmn.DeveloperTeam(id, dmnDevs, teamName);
            Dmn.Feature feature = new Dmn.Feature(location, team, isBroken, featureName);
            Dmn.DummyDatabase.Features.Add(feature);
            return FeatureConverter.ToDto(feature);
        }
コード例 #5
0
        public static Dto.Ticket PostTicket(
            Dmn.Priority prio,
            string devnotes,
            string name,
            string email,
            string phoneNumber,
            string message,
            string twitterHandle,
            string facebookName,
            string contactMethod,
            string url,
            string website,
            string webpage,
            List<Dto.Developer> devs,
            string teamName,
            int teamId, 
            bool isBroken, 
            string featureName)
        {
            List<Dmn.Developer> dmnDevs = new List<Domain.Developer>();

            foreach (Dto.Developer dev in devs)
            {
                dmnDevs.Add(new Dmn.Developer(dev.Name, dev.PhoneNumber, dev.Email));
            }
            Dmn.WebLocation location = new Dmn.WebLocation(url, website, webpage);
            Dmn.DeveloperTeam team = new Dmn.DeveloperTeam(teamId, dmnDevs, teamName);
            Dmn.TicketInformation info = new Dmn.TicketInformation(prio, devnotes);
            Dmn.Customer customer = new Dmn.Customer(name, email, phoneNumber, message, twitterHandle, facebookName, contactMethod);
            Dmn.Feature feature = new Dmn.Feature(location, team, isBroken, featureName);

            Dmn.Ticket ticket = new Dmn.Ticket(info, customer, feature);
            Dmn.DummyDatabase.Tickets.Add(ticket);
            return TicketConverter.ToDto(ticket);
        }
コード例 #6
0
        public static bool PutTicket(
            int tid,
            Dmn.Priority prio,
            string devnotes,
            string name,
            string email,
            string phoneNumber,
            string message,
            string twitterHandle,
            string facebookName,
            string contactMethod,
            string url,
            string website,
            string webpage,
            List<Dto.Developer> devs,
            string teamName,
            int teamId,
            bool isBroken,
            string featureName)
        {
            Dmn.Ticket ticket = Dmn.DummyDatabase.Tickets.FirstOrDefault(i => i.TicketInfo.Id == tid);
            if (ticket == null)
            {
                return false;
            }

            List<Dmn.Developer> dmnDevs = new List<Domain.Developer>();

            foreach (Dto.Developer dev in devs)
            {
                dmnDevs.Add(new Dmn.Developer(dev.Name, dev.PhoneNumber, dev.Email));
            }

            Dmn.WebLocation location = new Dmn.WebLocation(url, website, webpage);
            Dmn.DeveloperTeam team = new Dmn.DeveloperTeam(teamId, dmnDevs, teamName);
            Dmn.TicketInformation info = new Dmn.TicketInformation(tid, prio, devnotes);
            Dmn.Customer customer = new Dmn.Customer(name, email, phoneNumber, message, twitterHandle, facebookName, contactMethod);
            Dmn.Feature feature = new Dmn.Feature(location, team, isBroken, featureName);

            ticket.Update(info, customer, feature);
            return true;
        }
コード例 #7
0
        public static bool PutFeature(int fid, string url, string website, string webpage, int did, List<Dto.Developer> devs, string teamName, bool isBroken, string featureName)
        {
            Dmn.Feature feature = Dmn.DummyDatabase.Features.FirstOrDefault(i => i.Id == fid);
            if (feature == null)
            {
                return false;
            }

            List<Dmn.Developer> dmnDevs = new List<Domain.Developer>();

            foreach (Dto.Developer dev in devs)
            {
                dmnDevs.Add(new Dmn.Developer(dev.Name, dev.PhoneNumber, dev.Email));
            }

            Dmn.WebLocation location = new Dmn.WebLocation(url, website, webpage);
            Dmn.DeveloperTeam team = new Dmn.DeveloperTeam(did, dmnDevs, teamName);
            feature.Update(fid, location, team, isBroken, featureName);
            return true;
        }