Ejemplo n.º 1
0
    protected void SumitButton_Click(object sender, EventArgs e)
    {
        int key = (int)Session["userKey"];

        WCFReference.GrantRequest gre = new WCFReference.GrantRequest();
        gre.GrantRequestAmount      = decimal.Parse(GrantTextBox.Text);
        gre.GrantRequestDate        = DateTime.Now;
        gre.GrantRequestExplanation = ExplanationTextBox.Text;
        gre.GrantTypeKey            = int.Parse(DropDownGrantTypes.SelectedValue.ToString());
        gre.PersonKey = key;

        bool result = gc.newGrant(gre);

        if (result)
        {
            WCFReference.GrantRequestInfo[] grf = gc.GetRequestGrantAmount(key);
            GridView1.DataSource = grf;
            GridView1.DataBind();
        }
        else
        {
            ResultLabel.Text = "Something wrong";
        }
    }