Exemplo n.º 1
0
        public string RemoveReleaseLee(string releaseto)
        {
            var release = this[releaseto];

            if (release != null)
            {
                var releaseTo = release.ReleaseTo;
                _releaseLeeList.Remove(release);
                _selectedReleaseLee = null;
                return(string.Format("The releae to [ {0} ] has been removed successfully.", releaseTo));
            }
            return(string.Format("Cannot find the specified releae to [ {0} ] for removing.", releaseto));
        }
Exemplo n.º 2
0
        public string AddReleaseLee(string releaseto)
        {
            ReleaseLee releaselee = null;
            var        msg        = string.Empty;

            if (!string.IsNullOrEmpty(releaseto) && null == this[releaseto])
            {
                releaselee = new ReleaseLee
                {
                    ReleaseTo = releaseto
                };
                releaselee.AddNewRelease(releaseto);
                _releaseLeeList.Add(releaselee);
                _selectedReleaseLee = releaselee;
                return(string.Format("Add the releae to [ {0} ] success.", releaseto));
            }
            return(string.Format("The releae to [ {0} ] alrady exists.", releaseto));
        }
Exemplo n.º 3
0
 public void UpdateReleaseLee(ReleaseLee release)
 {
     if (null != release)
     {
         var releaseLeeList = new List <ReleaseLee>();
         foreach (ReleaseLee r in _releaseLeeList)
         {
             if (r.ReleaseTo != release.ReleaseTo)
             {
                 releaseLeeList.Add(r);
             }
             else
             {
                 releaseLeeList.Add(release);
             }
         }
         this.ReleaseLees = releaseLeeList.ToArray();
     }
 }
Exemplo n.º 4
0
 public MicrocodeReleaseModel(ReleaseLee releaseLee) : this()
 {
     _releaseLeeList.Add(releaseLee);
 }