Example #1
0
        public ActionResult Edit(int id)
        {
            BugTrackerModel btm     = new BugTrackerModel();
            BugTracker      rettemp = btm.FindBugById(id);

            return(View(rettemp));
        }
Example #2
0
        public ActionResult Delete(BugTracker bugtracker)
        {
            BugTrackerModel btm = new BugTrackerModel();

            btm.Remove(bugtracker);
            return(RedirectToAction("BugsList"));
        }
Example #3
0
        public ActionResult Delete(int id)
        {
            BugTrackerModel btm    = new BugTrackerModel();
            BugTracker      retbug = btm.FindBugById(id);

            return(View(retbug));
        }
Example #4
0
        public ActionResult Create(BugTracker bugtracker)
        {
            BugTrackerModel btm = new BugTrackerModel();

            btm.Add(bugtracker);
            return(RedirectToAction("BugsList"));
        }
 public UserProfileViewModel(BugTracker.DAL.UserProfile profile)
 {
     this.UserId = profile.UserId;
     this.UserName = profile.UserName;
     this.FirstName = profile.FirstName;
     this.LastName = profile.LastName;
     this.Email = profile.Email;
     this.PhoneNumber = profile.PhoneNumber;
 }
Example #6
0
        /// <summary>
        /// Creates the <see cref="CCNetConfig.BugTracking.BugTracker">BugTracker</see>.
        /// </summary>
        /// <param name="parent">The parent.</param>
        /// <param name="configContextm">The config contextm.</param>
        /// <param name="section">The section.</param>
        /// <returns></returns>
        public BugTracker Create(object parent, object configContextm, XmlElement section)
        {
            BugTracker bt = new BugTracker();

            bt.Enabled    = string.Compare(section.GetAttribute("Enabled"), bool.TrueString, true) == 0;
            bt.ServiceUri = new Uri(section.GetAttribute("ServiceUri"));

            XmlElement ele = (XmlElement)section.SelectSingleNode("ProjectId");

            if (ele != null)
            {
                int id = 0;
                int.TryParse(ele.GetAttribute("Value"), out id);
                bt.ProjectId = id;
            }

            ele = ( XmlElement )section.SelectSingleNode("TfsServer");
            if (ele != null)
            {
                bt.TfsServer = ele.GetAttribute("Value");
            }


            ele = (XmlElement)section.SelectSingleNode("Categories");
            if (ele != null)
            {
                foreach (XmlElement tele in ele.SelectNodes("./*"))
                {
                    BugTracker.Category cat = new BugTracker.Category();
                    int id = 0;
                    int.TryParse(tele.GetAttribute("Id"), out id);
                    cat.Id       = id;
                    cat.Name     = tele.GetAttribute("Name");
                    cat.Assembly = tele.GetAttribute("Assembly");
                    bt.Categories.Add(cat.Name, cat);
                }
            }
            return(bt);
        }