예제 #1
0
 public static void ShowActionsPage(string pageMode = "", int staffID = 0)
 {
     if (pageMode == "" || pageMode == Amend)
     {
         pageMode = MyPermissions.Allow("EditActions") ? Amend : View;
     }
     ChangePage("ActionsPage.xaml?Mode=" + pageMode + ",StaffID=" + staffID.ToString());
 }
예제 #2
0
 public static void ShowStageHistoryPage(string pageMode = "")
 {
     if (pageMode == "" || pageMode == Amend)
     {
         pageMode = MyPermissions.Allow("EditStageHistory") ? Amend : View;
     }
     ChangePage("StageHistoryPage.xaml?Mode=" + pageMode);
 }
예제 #3
0
 public static void ShowTimelinePage(int projectID, string pageMode = "")
 {
     if (pageMode == "" || pageMode == Amend)
     {
         pageMode = MyPermissions.Allow("EditStageHistory") ? Amend : View;
     }
     ChangePage("TimelinePage.xaml?Mode=" + pageMode + ",ProjectID=" + projectID.ToString());
 }
예제 #4
0
 public static void ShowProjectPage(string pageMode, string sourcePage = "")
 {
     if (pageMode == PageFunctions.Amend && !MyPermissions.Allow("EditProjects"))
     {
         pageMode = PageFunctions.View;
     }
     ProjectSourcePage = (sourcePage != "") ? sourcePage : "ProjectPage";
     ChangePage("ProjectPage.xaml?Mode=" + pageMode);
 }
예제 #5
0
        public static void ShowClientProductsPage(int selectedProductID = 0)
        {
            string pageMode; // Mode is based on viewOnly or permissions; sourcePageMode tells us what the previous screen was

            if (ClientSourceMode == View)
            {
                pageMode = View;
            }
            else
            {
                pageMode = MyPermissions.Allow("EditClientProducts") ? Amend : View;
            }
            ChangePage("ClientProductsPage.xaml?Mode=" + pageMode + ",ProductID=" + selectedProductID.ToString());
        }
예제 #6
0
        public static void ShowStaffEntitiesPage(int selectedStaffID = 0, bool viewOnly = false, string sourcePageMode = "View")
        {
            string pageMode; // Mode is based on viewOnly or permissions; sourcePageMode tells us what the previous screen was

            if (viewOnly)
            {
                pageMode = View;
            }
            else
            {
                pageMode = MyPermissions.Allow("EditStaffEntities") ? Amend : View;
            }
            ChangePage("StaffEntitiesPage.xaml?Mode=" + pageMode + ",StaffID=" + selectedStaffID.ToString() + ",SourceMode=" + sourcePageMode);
        }
예제 #7
0
 public static void ShowProjectDetailsPage(string pageMode = "")
 {
     if (pageMode == "")
     {
         if (ProjectSourceMode == View)
         {
             pageMode = View;
         }
         else
         {
             pageMode = MyPermissions.Allow("EditProjects") ? Amend : View;
         }
     }
     ChangePage("ProjectDetailsPage.xaml?Mode=" + pageMode);
 }
예제 #8
0
 public static void ShowProjectContactsPage(string pageMode = "", int selectedContactID = 0, string sourcePage = "")
 {
     if (pageMode == "")
     {
         if (ProjectSourceMode == View)
         {
             pageMode = View;
         }
         else
         {
             pageMode = MyPermissions.Allow("EditClientTeams") ? Amend : View;
         }
     }
     if (sourcePage != "")
     {
         ProjectSourcePage = sourcePage;
     }
     ChangePage("ProjectContactsPage.xaml?Mode=" + pageMode + ",ContactID=" + selectedContactID.ToString());
 }