Пример #1
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);
            }
        }
Пример #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Master.VisibleHeader          = false;
        this.Master.VisibleMainMenu        = false;
        this.Master.VisibleBreadCrumbs     = false;
        this.Master.VisibleLeftArea        = false;
        this.Master.VisibleApplicationLogo = false;
        this.Master.VisiblePageTitle       = false;
        this.Master.VisibleFooter          = false;
        MagicForm.ApplyColorScheme(UpdateSubstituteTable, WebApplicationSettings.DefaultColorScheme);
        ClientScript.RegisterStartupScript(Page.GetType(), "LogoDivRemove", "document.getElementById('LogoDiv').style.visibility = 'hidden';", true);
        if (!IsPostBack)
        {
            Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
            DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
            int      locationId; int.TryParse(dv[0]["LocationId"].ToString(), out locationId);

            if (UserId > 0 && locationId > 0)
            {
                DataRowView drv = user.LoadSubstituteForUpdate(UserId, locationId);
                AltPhone.Text     = drv["AltPhone"].ToString();
                Notes.Text        = drv["Note"].ToString();
                Preferred.Checked = Convert.ToBoolean(drv["IsClerkPreferred"]);
            }
        }
    }
Пример #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.Master.VisibleHeader          = false;
        this.Master.VisibleMainMenu        = false;
        this.Master.VisibleBreadCrumbs     = false;
        this.Master.VisibleLeftArea        = false;
        this.Master.VisibleApplicationLogo = false;
        this.Master.VisiblePageTitle       = false;
        this.Master.VisibleFooter          = false;
        MagicForm.ApplyColorScheme(UpdateJobTable, WebApplicationSettings.DefaultColorScheme);

        ClientScript.RegisterStartupScript(Page.GetType(), "LogoDivRemove", "document.getElementById('LogoDiv').style.visibility = 'hidden';", true);
    }
Пример #4
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;
            }
        }