Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (MailLogList.Items.Count == 0)
                {
                    RadToolTipManager1.Enabled = false;
                }
                Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
                DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
                DefaultLocationLabel.Text = "Location: <b>" + dv[0]["LocationName"] + "</b><br>Region: <b>" + dv[0]["RegionName"] + "</b>";

                SMTPServerLabel.Text = "SMTP Server: <b>" + System.Configuration.ConfigurationManager.AppSettings["SmtpServer"] + "</b>";
                MailModeLabel.Text   = "Mode: ";
                if (Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["UseTestEmailAddress"]))
                {
                    MailModeLabel.Text += "<b>Test</b>";
                }
                else
                {
                    MailModeLabel.Text += "<b>Live</b>";
                }

                DefaultLocationLabel.Visible = !IsAdmin;
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MagicForm.ApplyColorScheme(AddJobPanelTable, WebApplicationSettings.DefaultColorScheme);

            if (!IsPostBack)
            {
                Session["lblStatusSelected"] = 1;
                Session["lblDateSelectedTo"] = null;
                Session["lblDateSelected"]   = null;
                Session["IsFirstTime"]       = null;
                Session["SortDefault"]       = true;
                Session["SelectedRange"]     = "all";
                Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
                DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
                lblLocationId.Text                 = dv[0]["LocationId"].ToString();
                StartDate.MinDate                  = DateTime.Now.Date;
                EndDate.MinDate                    = DateTime.Now.Date;
                StartDate.SelectedDate             = DateTime.Now.Date;
                StartTimePicker.TimeView.StartTime = new TimeSpan(1, 0, 0);
                StartTimePicker.TimeView.EndTime   = new TimeSpan(22, 0, 0);
                StartTimePicker.TimeView.Interval  = new TimeSpan(0, 15, 0);
                StartTimePicker.TimeView.Columns   = 4;
                StartTimePicker.TimeView.Width     = 280;
                StartTimePicker.SelectedDate       = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 7, 0, 0);
                EndTimePicker.SelectedDate         = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 17, 0, 0);
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["pageid"] != null)
            {
                return;
            }

            Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
            DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);

            if (Session["IsCounted"] == null || Convert.ToInt32(Session["IsCounted"]) == 0)
            {
                user.InsertUsage(1, Convert.ToInt32(dv[0]["LocationId"].ToString()));
                Session["IsCounted"] = 1;
            }

            if (user.FirstName.Length > 0)
            {
                lblName.Text = "Hi, " + Convert.ToString(user.FirstName[0].ToString().ToUpper() + user.FirstName.ToLower().Substring(1, user.FirstName.IndexOf(' ') > 1?user.FirstName.IndexOf(' '):user.FirstName.Length - 1)).TrimEnd(' ');
                DefaultLocationLabel.Text = dv[0]["RegionName"] + "&nbsp;&nbsp;>&nbsp;&nbsp;" + dv[0]["LocationName"];
            }

            Master.VisibleLeftArea    = false;
            Master.VisibleMainMenu    = false;
            Master.VisiblePageTitle   = false;
            Master.VisibleBreadCrumbs = false;
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MagicForm.ApplyColorScheme(AddJobPanelTable, WebApplicationSettings.DefaultColorScheme);

            if (!IsPostBack)
            {
                Session["lblStatusSelected"] = 1;
                Session["lblDateSelectedTo"] = null;
                Session["lblDateSelected"] = null;
                Session["IsFirstTime"] = null;
                Session["SortDefault"] = true;
                Session["SelectedRange"] = "all";
                Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
                DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
                lblLocationId.Text = dv[0]["LocationId"].ToString();
                StartDate.MinDate = DateTime.Now.Date;
                EndDate.MinDate = DateTime.Now.Date;
                StartDate.SelectedDate = DateTime.Now.Date;
                StartTimePicker.TimeView.StartTime = new TimeSpan(1, 0, 0);
                StartTimePicker.TimeView.EndTime = new TimeSpan(22, 0, 0);
                StartTimePicker.TimeView.Interval = new TimeSpan(0, 15, 0);
                StartTimePicker.TimeView.Columns = 4;
                StartTimePicker.TimeView.Width = 280;
                StartTimePicker.SelectedDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 7, 0, 0);
                EndTimePicker.SelectedDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 17, 0, 0);
            }
        }
Ejemplo n.º 5
0
 protected void MailLogDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (!IsAdmin)
     {
         Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
         DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
         e.InputParameters["LocationId"] = dv[0]["LocationId"];
     }
 }
Ejemplo n.º 6
0
 protected void MailLogDataSource_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
 {
     if (!IsAdmin)
     {
         Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
         DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
         e.InputParameters["LocationId"] = dv[0]["LocationId"];
     }
 }
Ejemplo n.º 7
0
 protected void Accept_Command(object sender, CommandEventArgs e)
 {
     int jobId; int.TryParse(e.CommandArgument.ToString(), out jobId);
     Bll.Substitute substitute = new Bll.Substitute();
     substitute.LoadByUserId(Micajah.Common.Security.UserContext.Current.UserId);
     Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
     DataView userView = user.LoadForMain(substitute.UserId);
     string confirmNote = String.Format("Confirmed by Substitute {0} on {1} {2}", userView[0]["FirstName"].ToString().Trim() + " " + userView[0]["LastName"].ToString().Trim(), DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());
     (new Bll.Job()).ConfirmJob(jobId, substitute.SubstituteId, 2, confirmNote);
     Response.Redirect("Default.aspx");
 }
Ejemplo n.º 8
0
        protected void Accept_Command(object sender, CommandEventArgs e)
        {
            int jobId; int.TryParse(e.CommandArgument.ToString(), out jobId);

            Bll.Substitute substitute = new Bll.Substitute();
            substitute.LoadByUserId(Micajah.Common.Security.UserContext.Current.UserId);
            Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
            DataView userView    = user.LoadForMain(substitute.UserId);
            string   confirmNote = String.Format("Confirmed by Substitute {0} on {1} {2}", userView[0]["FirstName"].ToString().Trim() + " " + userView[0]["LastName"].ToString().Trim(), DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());

            (new Bll.Job()).ConfirmJob(jobId, substitute.SubstituteId, 2, confirmNote);
            Response.Redirect("Default.aspx");
        }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
            DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);

            lblLocationSelected.Text  = dv[0]["LocationId"].ToString();
            DefaultLocationLabel.Text = "Location: <b>" + dv[0]["RegionName"] + "&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["LocationName"] + "</b>";
            if (Request.QueryString["Assign"] != null && Request.QueryString["Assign"].ToString().Length > 0)
            {
                Session["Assign"] = Request.QueryString["Assign"].ToString();
                Response.Redirect("Worksheet.aspx");
            }

            if (Session["lblStatusSelected"] != null && Session["lblStatusSelected"].ToString().Length > 0)
            {
                lblStatusSelected.Text = Session["lblStatusSelected"].ToString();
            }
            else
            {
                lblStatusSelected.Text = "1";
            }

            if (Session["lblDateSelected"] != null && Session["lblDateSelected"].ToString().Length > 0)
            {
                lblDateSelected.Text = Session["lblDateSelected"].ToString();
            }
            else
            {
                lblDateSelected.Text = string.Empty;
            }

            if (Session["lblDateSelectedTo"] != null && Session["lblDateSelectedTo"].ToString().Length > 0)
            {
                lblDateSelectedTo.Text = Session["lblDateSelectedTo"].ToString();
            }
            else
            {
                lblDateSelectedTo.Text = string.Empty;
            }

            IndicateSelected();

            JobList.DataBind();
            bool isNoRecords = JobList.MasterTableView.Items.Count == 0;

            lblNoRecords.Visible = isNoRecords;
            JobList.Visible      = !isNoRecords;
        }
Ejemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MagicForm.ApplyColorScheme(AddJobPanelTable, WebApplicationSettings.DefaultColorScheme);

            if (!IsPostBack)
            {
                if (Page.Request.QueryString["JobId"] != null)
                {
                    lblJobId.Text = Page.Request.QueryString["JobId"];
                }

                Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
                DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
                lblLocationId.Text = dv[0]["LocationId"].ToString();

                Job job = new Job();
                //job.m_statusId
                job.LoadByPrimaryKeyBase(Convert.ToInt32(Page.Request.QueryString["JobId"]));
                Subtype.SelectedValue        = job.DalJob.SubtypeId.ToString();
                Grade.SelectedValue          = job.DalJob.GradeId.ToString();
                StartDate.SelectedDate       = job.DalJob.DatetimeStart;
                EndDate.SelectedDate         = job.DalJob.DatetimeEnd;
                StartTimePicker.SelectedDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, job.DalJob.DatetimeStart.Hour, job.DalJob.DatetimeStart.Minute, 0);
                EndTimePicker.SelectedDate   = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, job.DalJob.DatetimeEnd.Hour, job.DalJob.DatetimeEnd.Minute, 0);
                Room.Text           = job.DalJob.Room;
                Teacher.Text        = job.DalJob.Teacher;
                Subject.Text        = job.DalJob.Subject;
                Note.Text           = job.DalJob.Note;
                StartDateValid.Text = "1";
                EndDateValid.Text   = "1";

                EndDate.MinDate = StartDate.SelectedDate.Value;

                EditButton.Enabled
                                    = Subtype.Enabled
                                    = Grade.Enabled
                                    = StartDate.Enabled
                                    = EndDate.Enabled
                                    = Room.Enabled
                                    = Teacher.Enabled
                                    = Subject.Enabled
                                    = Note.Enabled
                                    = job.m_statusId < 2;
            }
        }
Ejemplo n.º 11
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Session["lblStatusSelected"] = 1;
     Session["lblDateSelectedTo"] = null;
     Session["lblDateSelected"] = null;
     Session["SortDefault"] = true;
     Session["IsFirstTime"] = null;
     Session["SelectedRange"] = "all";
     if (!IsPostBack)
     {
         Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
         DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
         lblLocationSelected.Text = dv[0]["LocationId"].ToString();
         DefaultLocationLabel.Text = "Location: <b>" + dv[0]["LocationName"] + "</b>&nbsp;&nbsp;Region: <b>" + dv[0]["RegionName"] + "</b>";
         PrintList.DataBind();
         SetNoRecords();
     }
 }
Ejemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Session["lblStatusSelected"] = 1;
     Session["lblDateSelectedTo"] = null;
     Session["lblDateSelected"]   = null;
     Session["SortDefault"]       = true;
     Session["IsFirstTime"]       = null;
     Session["SelectedRange"]     = "all";
     if (!IsPostBack)
     {
         Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
         DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
         lblLocationSelected.Text  = dv[0]["LocationId"].ToString();
         DefaultLocationLabel.Text = "Location: <b>" + dv[0]["LocationName"] + "</b>&nbsp;&nbsp;Region: <b>" + dv[0]["RegionName"] + "</b>";
         PrintList.DataBind();
         SetNoRecords();
     }
 }
Ejemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            MagicForm.ApplyColorScheme(AddJobPanelTable, WebApplicationSettings.DefaultColorScheme);

            if (!IsPostBack)
            {
                if (Page.Request.QueryString["JobId"] != null)
                    lblJobId.Text = Page.Request.QueryString["JobId"];

                Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
                DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
                lblLocationId.Text = dv[0]["LocationId"].ToString();

                Job job = new Job();
                //job.m_statusId
                job.LoadByPrimaryKeyBase(Convert.ToInt32(Page.Request.QueryString["JobId"]));
                Subtype.SelectedValue = job.DalJob.SubtypeId.ToString();
                Grade.SelectedValue = job.DalJob.GradeId.ToString();
                StartDate.SelectedDate = job.DalJob.DatetimeStart;
                EndDate.SelectedDate = job.DalJob.DatetimeEnd;
                StartTimePicker.SelectedDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, job.DalJob.DatetimeStart.Hour, job.DalJob.DatetimeStart.Minute, 0);
                EndTimePicker.SelectedDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, job.DalJob.DatetimeEnd.Hour, job.DalJob.DatetimeEnd.Minute, 0);
                Room.Text = job.DalJob.Room;
                Teacher.Text = job.DalJob.Teacher;
                Subject.Text = job.DalJob.Subject;
                Note.Text = job.DalJob.Note;
                StartDateValid.Text = "1";
                EndDateValid.Text = "1";

                EndDate.MinDate = StartDate.SelectedDate.Value;

                EditButton.Enabled
                    = Subtype.Enabled
                    = Grade.Enabled
                    = StartDate.Enabled
                    = EndDate.Enabled
                    = Room.Enabled
                    = Teacher.Enabled
                    = Subject.Enabled
                    = Note.Enabled
                    = job.m_statusId < 2;
            }
        }
Ejemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (MailLogList.Items.Count == 0)
                    RadToolTipManager1.Enabled = false;
                Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
                DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
                DefaultLocationLabel.Text = "Location: <b>" + dv[0]["LocationName"] + "</b><br>Region: <b>" + dv[0]["RegionName"] + "</b>";

                SMTPServerLabel.Text = "SMTP Server: <b>" + System.Configuration.ConfigurationManager.AppSettings["SmtpServer"] + "</b>";
                MailModeLabel.Text = "Mode: ";
                if (Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["UseTestEmailAddress"]))
                    MailModeLabel.Text += "<b>Test</b>";
                else
                    MailModeLabel.Text += "<b>Live</b>";

                DefaultLocationLabel.Visible = !IsAdmin;
            }
        }
Ejemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["pageid"] != null) return;

            Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
            DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
            if (Session["IsCounted"] == null || Convert.ToInt32(Session["IsCounted"]) == 0)
            {
                user.InsertUsage(1, Convert.ToInt32(dv[0]["LocationId"].ToString()));
                Session["IsCounted"] = 1;
            }

            if (user.FirstName.Length > 0)
            {
                lblName.Text = "Hi, " + Convert.ToString(user.FirstName[0].ToString().ToUpper() + user.FirstName.ToLower().Substring(1, user.FirstName.IndexOf(' ')>1?user.FirstName.IndexOf(' '):user.FirstName.Length - 1)).TrimEnd(' ');
                DefaultLocationLabel.Text = dv[0]["RegionName"] + "&nbsp;&nbsp;>&nbsp;&nbsp;" + dv[0]["LocationName"];
            }

            Master.VisibleLeftArea = false;
            Master.VisibleMainMenu = false;
            Master.VisiblePageTitle = false;
            Master.VisibleBreadCrumbs = false;
        }
Ejemplo n.º 16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["pageid"] != null)
            {
                return;
            }

            Miami.Substitute.Bll.Job job = new Miami.Substitute.Bll.Job();
            JobList.DataSource = job.SearchOpenJobs(DateTime.Now.Date.AddDays(-1), DateTime.Now.AddYears(10), 2);
            JobList.DataBind();

            DataView dv = job.SearchOpenJobs(DateTime.Now.Date.AddDays(-1), DateTime.Now.AddYears(10), 3);

            if (dv != null && dv.Count > 0)
            {
                ResponseGridView.DataSource = dv;
                ResponseGridView.DataBind();
            }
            else
            {
                ResponseGridView.Visible = false;
                lblResponseTitle.Visible = false;
            }


            Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
            dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
            if (Session["IsCounted"] == null || Convert.ToInt32(Session["IsCounted"]) == 0)
            {
                user.InsertUsage(2, Convert.ToInt32(dv[0]["LocationId"].ToString()));
                Session["IsCounted"] = 1;
            }

            dv.Table.Columns.Add("FullName", Type.GetType("System.String"));
            dv[0]["FullName"] = dv[0]["FirstName"] + " " + dv[0]["MiddleName"] + (String)(dv[0]["MiddleName"].ToString().Length > 0 ? ". " : "") + dv[0]["LastName"];

            dv.Table.Columns.Add("ContactInfo", Type.GetType("System.String"));
            dv[0]["ContactInfo"] = dv[0]["Address"] + "<br>" + dv[0]["Address2"] + "<br>" + dv[0]["Phone"] + "<br>" + dv[0]["EmailProfile"];

            dv.Table.Columns.Add("JobCode", Type.GetType("System.String"));
            dv[0]["JobCode"] = dv[0]["JobPosition"] + " / " + dv[0]["JobAssignmentDescription"];

            if (user.FirstName.Length > 0)
            {
                lblName.Text = "Hi, " + Convert.ToString(user.FirstName[0].ToString().ToUpper() + user.FirstName.ToLower().Substring(1, user.FirstName.Length - 1)).TrimEnd(' ');
            }

            dv.Table.Columns.Add("SubjectLevel", Type.GetType("System.String"));
            dv[0]["SubjectLevel"] = "<table border='0' cellspacing='0' cellpadding='0'>";
            //DataView dvCoverage = user.LoadCoverage(Micajah.Common.Security.UserContext.Current.UserId);
            //if (dvCoverage != null && dvCoverage.Table != null && dvCoverage.Table.Rows.Count > 0)
            //{
            //    foreach (DataRow dr in dvCoverage.Table.Rows)
            //    {
            //        if (!dr.IsNull("SubjectName") && !dr.IsNull("LevelName") && !dr.IsNull("ExpireYear") != null)
            //            dv[0]["SubjectLevel"] += "<tr><td><b>" + dr["SubjectName"].ToString() + "</b></td><td><b>&nbsp;/&nbsp;</b></td><td><b>" + dr["LevelName"].ToString() + "</b></td><td><b>&nbsp;/&nbsp;</b></td><td><b>" + dr["ExpireYear"].ToString() + "</b></td></tr>";
            //    }
            //}
            dv[0]["SubjectLevel"] += "</table>";

            ViewProfile.DataSource = dv;
            ViewProfile.DataBind();

            Master.VisibleLeftArea    = false;
            Master.VisibleMainMenu    = false;
            Master.VisiblePageTitle   = false;
            Master.VisibleBreadCrumbs = false;
        }
Ejemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["pageid"] != null) return;

            Miami.Substitute.Bll.Job job = new Miami.Substitute.Bll.Job();
            JobList.DataSource = job.SearchOpenJobs(DateTime.Now.Date.AddDays(-1), DateTime.Now.AddYears(10), 2);
            JobList.DataBind();

            DataView dv = job.SearchOpenJobs(DateTime.Now.Date.AddDays(-1), DateTime.Now.AddYears(10), 3);
            if (dv != null && dv.Count > 0)
            {
                ResponseGridView.DataSource = dv;
                ResponseGridView.DataBind();
            }
            else
            {
                ResponseGridView.Visible = false;
                lblResponseTitle.Visible = false;
            }

            Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
            dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
            if (Session["IsCounted"] == null || Convert.ToInt32(Session["IsCounted"]) == 0)
            {
                user.InsertUsage(2, Convert.ToInt32(dv[0]["LocationId"].ToString()));
                Session["IsCounted"] = 1;
            }

            dv.Table.Columns.Add("FullName", Type.GetType("System.String"));
            dv[0]["FullName"] = dv[0]["FirstName"] + " " + dv[0]["MiddleName"] + (String)(dv[0]["MiddleName"].ToString().Length > 0 ? ". " : "") + dv[0]["LastName"];

            dv.Table.Columns.Add("ContactInfo", Type.GetType("System.String"));
            dv[0]["ContactInfo"] = dv[0]["Address"] + "<br>" + dv[0]["Address2"] + "<br>" + dv[0]["Phone"] + "<br>" + dv[0]["EmailProfile"];

            dv.Table.Columns.Add("JobCode", Type.GetType("System.String"));
            dv[0]["JobCode"] = dv[0]["JobPosition"] + " / " + dv[0]["JobAssignmentDescription"];

            if (user.FirstName.Length > 0)
                lblName.Text = "Hi, " + Convert.ToString(user.FirstName[0].ToString().ToUpper() + user.FirstName.ToLower().Substring(1, user.FirstName.Length - 1)).TrimEnd(' ');

            dv.Table.Columns.Add("SubjectLevel", Type.GetType("System.String"));
            dv[0]["SubjectLevel"] = "<table border='0' cellspacing='0' cellpadding='0'>";
            //DataView dvCoverage = user.LoadCoverage(Micajah.Common.Security.UserContext.Current.UserId);
            //if (dvCoverage != null && dvCoverage.Table != null && dvCoverage.Table.Rows.Count > 0)
            //{
            //    foreach (DataRow dr in dvCoverage.Table.Rows)
            //    {
            //        if (!dr.IsNull("SubjectName") && !dr.IsNull("LevelName") && !dr.IsNull("ExpireYear") != null)
            //            dv[0]["SubjectLevel"] += "<tr><td><b>" + dr["SubjectName"].ToString() + "</b></td><td><b>&nbsp;/&nbsp;</b></td><td><b>" + dr["LevelName"].ToString() + "</b></td><td><b>&nbsp;/&nbsp;</b></td><td><b>" + dr["ExpireYear"].ToString() + "</b></td></tr>";
            //    }
            //}
            dv[0]["SubjectLevel"] += "</table>";

            ViewProfile.DataSource = dv;
            ViewProfile.DataBind();

            Master.VisibleLeftArea = false;
            Master.VisibleMainMenu = false;
            Master.VisiblePageTitle = false;
            Master.VisibleBreadCrumbs = false;
        }
Ejemplo n.º 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
            DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
            lblLocationSelected.Text = dv[0]["LocationId"].ToString();
            DefaultLocationLabel.Text = "Location: <b>" + dv[0]["RegionName"] + "&nbsp;&nbsp;&nbsp;&nbsp;" + dv[0]["LocationName"] + "</b>";
            if (Request.QueryString["Assign"] != null && Request.QueryString["Assign"].ToString().Length > 0)
            {
                Session["Assign"] = Request.QueryString["Assign"].ToString();
                Response.Redirect("Worksheet.aspx");
            }

            if (Session["lblStatusSelected"] != null && Session["lblStatusSelected"].ToString().Length > 0)
                lblStatusSelected.Text = Session["lblStatusSelected"].ToString();
            else
                lblStatusSelected.Text = "1";

            if (Session["lblDateSelected"] != null && Session["lblDateSelected"].ToString().Length > 0)
                lblDateSelected.Text = Session["lblDateSelected"].ToString();
            else
                lblDateSelected.Text = string.Empty;

            if (Session["lblDateSelectedTo"] != null && Session["lblDateSelectedTo"].ToString().Length > 0)
                lblDateSelectedTo.Text = Session["lblDateSelectedTo"].ToString();
            else
                lblDateSelectedTo.Text = string.Empty;

            IndicateSelected();

            JobList.DataBind();
            bool isNoRecords = JobList.MasterTableView.Items.Count == 0;
            lblNoRecords.Visible = isNoRecords;
            JobList.Visible = !isNoRecords;
        }