예제 #1
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"]);
            }
        }
    }
예제 #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
        public void SetSubstitute(int jobId, int substituteId, int status)
        {
            DalJob.SetSubstitute(jobId, substituteId, status);
            Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
            DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);

            (new Dal.User()).InsertUsage(4, Convert.ToInt32(dv[0]["LocationId"].ToString()));
        }
예제 #4
0
    protected void SaveButton_Click(object sender, EventArgs e)
    {
        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);

        Miami.Substitute.Bll.Substitute subst = new Miami.Substitute.Bll.Substitute();
        subst.LoadByUserId(UserId);

        (new Miami.Substitute.Dal.User()).UpdateSubstitute(locationId, Micajah.Common.Security.UserContext.Current.UserId, subst.SubstituteId, Preferred.Checked, AltPhone.Text, Notes.Text);
        ClientScript.RegisterStartupScript(Page.GetType(), "CloseAndRebindScript", "CloseAndRebind();", true);
    }
예제 #5
0
    protected void SaveButton_Click(object sender, EventArgs e)
    {
        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);

        Miami.Substitute.Bll.Substitute subst = new Miami.Substitute.Bll.Substitute();
        subst.LoadByUserId(UserId);

        (new Miami.Substitute.Dal.User()).UpdateSubstitute(locationId, Micajah.Common.Security.UserContext.Current.UserId, subst.SubstituteId, Preferred.Checked, AltPhone.Text, Notes.Text);
        ClientScript.RegisterStartupScript(Page.GetType(), "CloseAndRebindScript", "CloseAndRebind();", true);
    }
예제 #6
0
    protected void SaveButton_Click(object sender, EventArgs e)
    {
        Miami.Substitute.Bll.Job job = new Miami.Substitute.Bll.Job(JobId);
        Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute(job.m_substituteId);

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

        string confirmNote = String.Format("Confirmed by Clerk {0} on {1} {2}", userView[0]["FirstName"].ToString().Trim() + " " + userView[0]["LastName"].ToString().Trim(), DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());
        job.ConfirmJob(JobId, substitute.SubstituteId, 2, confirmNote + " " + Notes.Text);

        ClientScript.RegisterStartupScript(Page.GetType(), "WorksheetCloseAndRebindScript", "CloseAndRebind();", true);
    }
예제 #7
0
    protected void SaveButton_Click(object sender, EventArgs e)
    {
        Miami.Substitute.Bll.Job        job        = new Miami.Substitute.Bll.Job(JobId);
        Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute(job.m_substituteId);

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

        string confirmNote = String.Format("Confirmed by Clerk {0} on {1} {2}", userView[0]["FirstName"].ToString().Trim() + " " + userView[0]["LastName"].ToString().Trim(), DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());

        job.ConfirmJob(JobId, substitute.SubstituteId, 2, confirmNote + " " + Notes.Text);

        ClientScript.RegisterStartupScript(Page.GetType(), "WorksheetCloseAndRebindScript", "CloseAndRebind();", true);
    }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["jobtoken"]))
        {
            string   decrypted = Decrypt(Request.QueryString["jobtoken"], "Dshd*&^*@dsdss", "237w&@2d", "SHA1", 2, "&s2hfyDjuf372*73", 256);
            string[] splitted  = decrypted.Split('&');
            if (splitted.Length > 1)
            {
                int        jobId; int.TryParse(splitted[0], out jobId);
                int        substId; int.TryParse(splitted[1], out substId);
                int        type; int.TryParse(splitted[2], out type);
                Job        job                 = new Job(jobId);
                Substitute substitute          = new Substitute(substId);
                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} by clicking email link", userView[0]["FirstName"].ToString().Trim() + " " + userView[0]["LastName"].ToString().Trim(), DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());

                if (job.m_statusId == 3)
                {
                    (new Miami.Substitute.Bll.Job()).ConfirmJob(jobId, substId, type, confirmNote);

                    if (type == 2)
                    {
                        Message.Text = "You have successfully confirmed your job assignment.";
                    }
                    else
                    {
                        Message.Text = "You have declined your job assignment.";
                    }
                }
                else
                {
                    if (job.m_statusId == 2)
                    {
                        Message.Text = "Job was already confirmed.";
                    }
                    else
                    {
                        Message.Text = "Job was already declined.";
                    }
                }
            }
        }
    }
예제 #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request.QueryString["jobtoken"]))
        {
            string decrypted = Decrypt(Request.QueryString["jobtoken"], "Dshd*&^*@dsdss", "237w&@2d", "SHA1", 2, "&s2hfyDjuf372*73", 256);
            string[] splitted = decrypted.Split('&');
            if (splitted.Length > 1)
            {
                int jobId; int.TryParse(splitted[0], out jobId);
                int substId; int.TryParse(splitted[1], out substId);
                int type; int.TryParse(splitted[2], out type);
                Job job = new Job(jobId);
                Substitute substitute = new Substitute(substId);
                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} by clicking email link", userView[0]["FirstName"].ToString().Trim() + " " + userView[0]["LastName"].ToString().Trim(), DateTime.Now.ToShortDateString(), DateTime.Now.ToShortTimeString());

                if (job.m_statusId == 3)
                {
                    (new Miami.Substitute.Bll.Job()).ConfirmJob(jobId, substId, type, confirmNote);

                    if (type == 2)
                        Message.Text = "You have successfully confirmed your job assignment.";
                    else
                        Message.Text = "You have declined your job assignment.";
                }
                else
                {
                    if (job.m_statusId == 2)
                        Message.Text = "Job was already confirmed.";
                    else
                        Message.Text = "Job was already declined.";
                }
            }
        }
    }
예제 #10
0
 public void SetSubstitute(int jobId, int substituteId, int status)
 {
     DalJob.SetSubstitute(jobId, substituteId, status);
     Miami.Substitute.Dal.User user = new Miami.Substitute.Dal.User();
     DataView dv = user.LoadForMain(Micajah.Common.Security.UserContext.Current.UserId);
     (new Dal.User()).InsertUsage(4, Convert.ToInt32(dv[0]["LocationId"].ToString()));
 }