Ejemplo n.º 1
0
 public ActionResult Details(int?id)
 {
     if (Session["ClientId"] != null)
     {
         if (Roles.IsUserInRole("CenterManager"))
         {
             if (Session["BranchId"] != null)
             {
                 ViewData.Model = BranchModels.GetBranchDetailsById((int)Session["BranchId"]);
             }
             else
             {
                 ViewData.Model = null;
             }
         }
         else
         {
             List <vw_Branches> brList = new List <vw_Branches>();
             brList = BranchModels.GetBranchesList((int)Session["ClientId"]);
             if (brList.Any(bl => bl.Id == id))
             {
                 ViewData.Model = BranchModels.GetBranchDetailsById((int)id);
             }
             else
             {
                 ViewData.Model = null;
             }
         }
     }
     return(View());
 }
Ejemplo n.º 2
0
 public ActionResult CourseBrandList(int?id)
 {
     if (Session["ClientId"] != null)
     {
         if (!Roles.IsUserInRole("CenterManager"))
         {
             if (id == null)
             {
                 ViewData.Model = CourseModels.GetCourseBrands((int)Session["ClientId"], id);
                 if (Session["BranchId"] != null)
                 {
                     ViewData["Branchs"] = BranchModels.GetBranchDetailsById((int)id);
                 }
             }
             else
             {
                 ViewData.Model = CourseModels.GetCourseBrands((int)Session["ClientId"], (int)Session["BranchId"]);
                 if (Session["BranchId"] != null)
                 {
                     ViewData["Branchs"] = BranchModels.GetBranchDetailsById((int)Session["BranchId"]);
                 }
             }
         }
         else
         {
             if (Session["BranchId"] != null)
             {
                 ViewData["Branches"] = BranchModels.GetBranchDetailsById((int)Session["BranchId"]);
                 ViewData.Model       = CourseModels.GetCourseBrands((int)Session["ClientId"], (int)Session["BranchId"]);
             }
         }
     }
     return(View());
 }
Ejemplo n.º 3
0
 public ActionResult AdmReceipt()
 {
     if (Session["CurrentAdmId"] != null)
     {
         int id = (int)Session["CurrentAdmId"];
         ViewData.Model = StudentModels.GetAdmissionDetailsById(id);
         if (Session["BranchId"] != null)
         {
             ViewData["BranchName"] = BranchModels.GetBranchDetailsById((int)Session["BranchId"]);
         }
     }
     return(View());
 }