Esempio n. 1
0
        public void AddBuildReference(int id, string refBy, string repo, string rev, string url)
        {
            BuildSource bs = new BuildSource();

            bs.BuildId        = id;
            bs.ReferencedBy   = refBy;
            bs.RepositoryType = repo;
            bs.Revision       = rev;
            bs.Url            = url;

            using (BT_SemiAutoEntities de = new BT_SemiAutoEntities())
            {
                de.BuildSources.Add(bs);
                de.SaveChanges();
            }
        }
Esempio n. 2
0
        public int UpdateBuildLog(int id, string log)
        {
            Build build;

            using (BT_SemiAutoEntities de = new BT_SemiAutoEntities())
            {
                build = de.Builds.Single(b => b.Id == id);

                if (build != null)
                {
                    build.BuildLog = log;
                    de.SaveChanges();
                }
            }

            return(build.Id);
        }
Esempio n. 3
0
        public int UpdateBuildDate(int id)
        {
            Build build;

            using (BT_SemiAutoEntities de = new BT_SemiAutoEntities())
            {
                build = de.Builds.Single(b => b.Id == id);

                if (build != null)
                {
                    build.BuildDate = DateTime.Now;
                    de.SaveChanges();
                }
            }

            return(build.Id);
        }
Esempio n. 4
0
        public int UpdateBuildBinaryRevision(int id, string binaryRev)
        {
            Build build;

            using (BT_SemiAutoEntities de = new BT_SemiAutoEntities())
            {
                build = de.Builds.Single(b => b.Id == id);

                if (build != null)
                {
                    build.BinaryRevision = binaryRev;
                    de.SaveChanges();
                }
            }

            return(build.Id);
        }
Esempio n. 5
0
        public int UpdateBuildChangeControl(int id, string cc)
        {
            Build build;

            using (BT_SemiAutoEntities de = new BT_SemiAutoEntities())
            {
                build = de.Builds.Single(b => b.Id == id);

                if (build != null)
                {
                    build.ChangeControl = cc;
                    de.SaveChanges();
                }
            }

            return(build.Id);
        }
Esempio n. 6
0
        public int UpdateBuildStatus(int id, string status)
        {
            Build build;

            using (BT_SemiAutoEntities de = new BT_SemiAutoEntities())
            {
                build = de.Builds.Single(b => b.Id == id);

                if (build != null)
                {
                    build.Status = status;

                    de.SaveChanges();
                }
            }

            return(build.Id);
        }
Esempio n. 7
0
        public int SaveBuild(string binaryRev, string log, string changeControl, string status)
        {
            Build b = new Build();

            b.BinaryRevision = binaryRev;
            b.BuildDate      = DateTime.Now;
            b.BuildLog       = log;
            b.ChangeControl  = changeControl;
            b.Status         = status;

            using (BT_SemiAutoEntities de = new BT_SemiAutoEntities())
            {
                de.Builds.Add(b);
                de.SaveChanges();
            }

            return(b.Id);
        }