Ejemplo n.º 1
0
 public Residue(
     int begin,
     int end,
     int grouping,
     int partitions,
     int partitionValues,
     int groupBook,
     int[] secondStages,
     int[] bookList,
     int[] classMetric1,
     int[] classMetric2,
     ResidueType residueType)
 {
     Begin = begin;
     End = end;
     Grouping = grouping;
     Partitions = partitions;
     PartitionValues = partitionValues;
     GroupBook = groupBook;
     SecondStages = secondStages.ToFixedLength(64);
     BookList = bookList.ToFixedLength(512);
     ClassMetric1 = classMetric1.ToFixedLength(64);
     ClassMetric2 = classMetric2.ToFixedLength(64);
     ResidueType = residueType;
 }
Ejemplo n.º 2
0
        public ActionResult DeleteConfirmed(int id)
        {
            ResidueType residueType = residual.ResidueTypes.Find(id);

            residual.ResidueTypes.Remove(residueType);
            residual.SaveChanges();
            return(RedirectToAction("ListResidues"));
        }
Ejemplo n.º 3
0
 public ActionResult EditResidue([Bind(Include = "ID,Name,Unit")] ResidueType residueType)
 {
     if (ModelState.IsValid)
     {
         residual.Entry(residueType).State = EntityState.Modified;
         residual.SaveChanges();
         return(RedirectToAction("ListResidues"));
     }
     return(View(residueType));
 }
Ejemplo n.º 4
0
        public ActionResult CreateResidue([Bind(Include = "ID,Name,Unit")] ResidueType residueType)
        {
            if (ModelState.IsValid)
            {
                residual.ResidueTypes.Add(residueType);
                residual.SaveChanges();
                return(RedirectToAction("ListResidues"));
            }

            return(View(residueType));
        }
Ejemplo n.º 5
0
 public Residue Clone(ResidueType residueTypeOverride, int groupingOverride)
     => new Residue(
         Begin,
         End,
         groupingOverride,
         Partitions,
         PartitionValues,
         GroupBook,
         SecondStages,
         BookList,
         ClassMetric1,
         ClassMetric2,
         residueTypeOverride);
Ejemplo n.º 6
0
        public ActionResult DeleteResidue(int?id)
        {
            if (id == null)
            {
                return(View("Index"));
            }
            ResidueType residueType = residual.ResidueTypes.Find(id);

            if (residueType == null)
            {
                return(HttpNotFound());
            }
            return(View(residueType));
        }
Ejemplo n.º 7
0
 public ResidueTemplate(
     ResidueType residueType,
     ResidueLimitType limitType,
     int grouping,
     ResidueEntry residue,
     IStaticCodeBook bookAux,
     IStaticCodeBook booxAuxManaged,
     IStaticBookBlock booksBase,
     IStaticBookBlock booksBaseManaged)
 {
     ResidueType      = residueType;
     LimitType        = limitType;
     Residue          = residue;
     BookAux          = bookAux;
     BookAuxManaged   = booxAuxManaged;
     BooksBase        = booksBase;
     BooksBaseManaged = booksBaseManaged;
     Grouping         = grouping;
 }
Ejemplo n.º 8
0
 /// <summary>
 ///     Create an object using the contents of the corresponding MzIdentML object
 /// </summary>
 /// <param name="r"></param>
 /// <param name="idata"></param>
 public ResidueObj(ResidueType r, IdentDataObj idata)
     : base(idata)
 {
     Code = r.code;
     Mass = r.mass;
 }