protected void RegisterNewUserButton_Click(object sender, EventArgs e)
    {
        string lastname  = LastNameTextBox.Text;
        string firstname = FirstNameTextBox.Text;
        string email     = EmailTextBox.Text;
        string password  = PasswordTextBox.Text;
        string apartment = ApartmentNumberTextBox.Text;
        string street    = StreetTextBox.Text;
        string city      = CityTextBox.Text;
        string state     = StateTextBox.Text;
        string homephone = HomePhoneTextBox.Text;
        string workphone = WorkPhoneTextBox.Text;

        CommunityAssistServRef.Community_AssistServiceClient sc =
            new CommunityAssistServRef.Community_AssistServiceClient();

        sc.RegisterPerson(LastNameTextBox.Text, FirstNameTextBox.Text,
                          EmailTextBox.Text, PasswordTextBox.Text,
                          ApartmentNumberTextBox.Text, StreetTextBox.Text, CityTextBox.Text,
                          StateTextBox.Text, ZipCodeTextBox.Text,
                          HomePhoneTextBox.Text, WorkPhoneTextBox.Text);
        //CommunityAssistServRef.Person rev = new CommunityAssistServRef.Person();

        Response.Redirect("Default.aspx");
    }
Exemplo n.º 2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string selectedGrant   = DropDownList1.SelectedValue;
        int    selectedGrantId = 1;

        foreach (var gt in grantTypes)
        {
            if (selectedGrant.Equals(gt.GrantTypeName))
            {
                selectedGrantId = gt.GrantTypeKey;
                break;
            }
        }

        decimal grantAmount      = decimal.Parse(GrantAmountTextBox.Text);
        string  grantExplanation = ExplainationTextBox.Text;

        CommunityAssistServRef.Community_AssistServiceClient sc =
            new CommunityAssistServRef.Community_AssistServiceClient();
        int personId = ((int)Session["userKey"]);

        sc.RequestGrant(selectedGrantId, grantExplanation, grantAmount, personId);

        ResultLabel.Text = "Grant requested suceesfully" + personId;;
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CommunityAssistServRef.Community_AssistServiceClient sc =
            new CommunityAssistServRef.Community_AssistServiceClient();

        var userId = (int)Session["userKey"];

        var grants = sc.ViewGrants(userId);

        GridView1.DataSource = grants;
        GridView1.DataBind();
    }
Exemplo n.º 4
0
    protected void LoginButton_Click(object sender, EventArgs e)
    {
        CommunityAssistServRef.Community_AssistServiceClient sc =
            new CommunityAssistServRef.Community_AssistServiceClient();
        int result = sc.Login(UserTextBox.Text, PasswordTextBox.Text);

        if (result != 0)
        {
            Session["userKey"] = result;
            ResultLabel.Text   = "Welcome" + result;
        }
        else
        {
            ResultLabel.Text = "Invalid login";
        }
    }
Exemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CommunityAssistServRef.Community_AssistServiceClient sc =
            new CommunityAssistServRef.Community_AssistServiceClient();

        grantTypes = sc.GetGrantTypes();

        List <string> grantNames = new List <string>();

        foreach (var gt in grantTypes)
        {
            grantNames.Add(gt.GrantTypeName);
        }

        if (!Page.IsPostBack)
        {
            DropDownList1.DataSource = grantNames;
            DropDownList1.DataBind();
        }
    }