protected void btnSubmit_Click(object sender, System.EventArgs e)
        {
            try
            {
                if (!chkMOUTerms.Checked)
                {
                    lblMssg.Text = "Please make sure above checkbox is checked";

                    return;
                }

                physicianRepos.UpdateMOU(HttpContext.Current.User.Identity.Name, chkMOUTerms.Checked ? 1 : 0);

                UserHelper.ReloadUser(HttpContext.Current.Session);


                Controls.PhysicianSpeceficRequirements actionItemCntrl =
                    Page.Master.FindControl("actionItem") as Controls.PhysicianSpeceficRequirements;

                actionItemCntrl.Reload();

                Master.LoadPortalVisibility();

                pnlMain.Enabled = false;

                lblMssg.Text = "Updated Successfully";
            }
            catch (Exception exc)
            {
                lblMssg.Text = exc.InnerException.Message;
            }
        }
예제 #2
0
        protected void btnSubmit_Click(object sender, System.EventArgs e)
        {
            try
            {
                if (rblPayMethod.SelectedItem == null)
                {
                    lblRdo.Visible = true;
                    return;
                }

                Domain.Payee newPayee = new Payee();

                PhysicianRepository phyRepos = new PhysicianRepository();

                newPayee.UserID                 = UserHelper.GetLoggedInUser(HttpContext.Current.Session).UserID;
                newPayee.PaymentMethod          = rblPayMethod.SelectedItem.Value;
                newPayee.ChequePayableTo        = this.txtChequePayableTo.Text;
                newPayee.AttentionTo            = this.txtAttentionTo.Text;
                newPayee.MailingAddr1           = this.txtMailingAddr1.Text;
                newPayee.MailingAddr2           = this.txtMailingAddr2.Text;
                newPayee.City                   = this.txtCity.Text;
                newPayee.ProvinceID             = Int32.Parse(this.DDListPro.SelectedValue);
                newPayee.PostalCode             = this.txtPostalCode.Text;
                newPayee.TaxNumber              = this.txtTaxNumber.Text;
                newPayee.AdditionalInstructions = txtInstructions.Text;
                newPayee.InternalRefNum         = this.txtInternal.Text;

                payeeRepos.AddPayee(newPayee);  //add payee info

                phyRepos.UpdatePayeeInformation(HttpContext.Current.User.Identity.Name, 1);

                UserHelper.ReloadUser(HttpContext.Current.Session);

                Controls.PhysicianSpeceficRequirements actionItemCntrl =
                    Page.Master.FindControl("actionItem") as Controls.PhysicianSpeceficRequirements;

                actionItemCntrl.Reload();

                Master.LoadPortalVisibility();

                pnlMain.Enabled = false;

                lblSystemMsg.Text = "Payee Info saved successfully";
            }
            catch (Exception exc)
            {
                lblSystemMsg.Text = "Error occuued while trying to save Payee Info";
            }
        }