Пример #1
0
    protected void btnPopupOK_Click(object sender, EventArgs e)
    {
        if (Membership.ValidateUser(txtUserName.Text, txtPassword.Text) &&
            employeeProvider.CanReprintInvoice(txtUserName.Text))
        {
            InvoiceHeader invoice = invoiceProvider.GetInvoice(txtInvoiceNo.Text);

            mopAuth.Hide();
            switch (invoice.InvoiceType)
            {
            case "F":
                Response.Redirect(String.Format("FreshMemberCompleted.aspx?InvoiceNo={0}", invoice.InvoiceNo));
                break;

            case "X":
                Response.Redirect(String.Format("ExistingMemberCompleted.aspx?InvoiceNo={0}", invoice.InvoiceNo));
                break;
            }
        }
        else
        {
            mopAuth.Hide();
            WebFormHelper.SetLabelTextWithCssClass(lblStatus0,
                                                   "Invalid user name/password, or user does not have permission to reprint invoice.",
                                                   LabelStyleNames.ErrorMessage);
        }
    }