Example #1
0
 public PragmaInstanceInfo(PragmaInfo pragma)
 {
     this.pragma  = pragma;
     id           = 0;
     date         = DateTime.Today;
     project      = pragma.Project;
     projectGroup = pragma.ProjectGroup;
     CreateValuesMatix();
 }
Example #2
0
 public PragmaInfo()
 {
     id           = 0;
     name         = "";
     isActive     = true;
     attributes   = new Dictionary <int, PragmaAttributeInfo>();
     project      = new ProjectInfo();
     projectGroup = new ProjectGroupInfo();
 }
Example #3
0
 /// <summary>
 /// Gets the smart code as
 /// if isShort --> XAR : XP
 /// else       --> XAR : Xposed
 /// </summary>
 /// <returns>A smart code</returns>
 public string GetSmartCode(ProjectGroupInfo projectGroup, bool isShort)
 {
     if (ID > 0)
     {
         if (isShort)
         {
             return(projectGroup.Code + "▫" + Code);
         }
         else
         {
             return(projectGroup.Code + " | " + Name);
         }
     }
     else
     {
         return("");
     }
 }
Example #4
0
        public string GetSmartProjectCode(bool isShort)
        {
            string result = "";

            if (project != null && projectGroup != null)
            {
                if (project.ID > 0)
                {
                    ProjectGroupInfo pG = DB.ProjectGroups.GetProjectGroup(project.ProjectGroupID);
                    result = project.GetSmartCode(pG, isShort);
                }
                else if (projectGroup.ID > 0)
                {
                    result = projectGroup.Code;
                }
            }

            return(result);
        }