예제 #1
0
        protected void PrintLocation_CheckedChanged(object sender, EventArgs e)
        {
            int userId; int.TryParse(((System.Web.UI.WebControls.CheckBox)(sender)).ValidationGroup, out userId);

            Miami.Substitute.Bll.Preferred preferred = new Miami.Substitute.Bll.Preferred();
            Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute();

            substitute.LoadByUserId(userId);
            int substId = substitute.SubstituteId;
            int locId = Convert.ToInt32(lblLocationSelected.Text);

            preferred.DeleteForClerkSubstitute(locId, substId);

            if (((System.Web.UI.WebControls.CheckBox)(sender)).Checked)
                preferred.ClerkInsert(locId, substId);
        }
        protected void SubstituteAssignment_CheckedChanged(object sender, EventArgs e)
        {
            int substId; int.TryParse(((System.Web.UI.WebControls.CheckBox)(sender)).ValidationGroup, out substId);

            Miami.Substitute.Bll.Preferred preferred = new Miami.Substitute.Bll.Preferred();
            Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute();

            Dal.Job job = new Miami.Substitute.Dal.Job();
            job.LoadByPrimaryKeyBase(Convert.ToInt32(Request.QueryString["JobId"]));
            int locId = job.LocationId;

            preferred.DeleteForClerkSubstitute(locId, substId);

            if (((System.Web.UI.WebControls.CheckBox)(sender)).Checked)
                preferred.ClerkInsert(locId, substId);
        }
예제 #3
0
        protected void PrintLocation_CheckedChanged(object sender, EventArgs e)
        {
            int userId; int.TryParse(((System.Web.UI.WebControls.CheckBox)(sender)).ValidationGroup, out userId);

            Miami.Substitute.Bll.Preferred  preferred  = new Miami.Substitute.Bll.Preferred();
            Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute();

            substitute.LoadByUserId(userId);
            int substId = substitute.SubstituteId;
            int locId   = Convert.ToInt32(lblLocationSelected.Text);

            preferred.DeleteForClerkSubstitute(locId, substId);

            if (((System.Web.UI.WebControls.CheckBox)(sender)).Checked)
            {
                preferred.ClerkInsert(locId, substId);
            }
        }
        protected void SubstituteAssignment_CheckedChanged(object sender, EventArgs e)
        {
            int substId; int.TryParse(((System.Web.UI.WebControls.CheckBox)(sender)).ValidationGroup, out substId);

            Miami.Substitute.Bll.Preferred  preferred  = new Miami.Substitute.Bll.Preferred();
            Miami.Substitute.Bll.Substitute substitute = new Miami.Substitute.Bll.Substitute();

            Dal.Job job = new Miami.Substitute.Dal.Job();
            job.LoadByPrimaryKeyBase(Convert.ToInt32(Request.QueryString["JobId"]));
            int locId = job.LocationId;

            preferred.DeleteForClerkSubstitute(locId, substId);

            if (((System.Web.UI.WebControls.CheckBox)(sender)).Checked)
            {
                preferred.ClerkInsert(locId, substId);
            }
        }