コード例 #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminTableAdapters.LoanTypesTableAdapter loanTypes = new adminTableAdapters.LoanTypesTableAdapter();
        if (!(type == "update"))
        {
            loanTypes.InsertLoanTypes(txtDescription.Value.Trim());
        }
        else if (type == "update")
        {
            loanTypes.UpdateLoanType(txtDescription.Value.Trim(),
                                     id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "ltedit"));
    }
コード例 #2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminTableAdapters.LoanTypesTableAdapter loanTypes = new adminTableAdapters.LoanTypesTableAdapter();
        if (!(type == "update"))
        {

            loanTypes.InsertLoanTypes(txtDescription.Value.Trim());
        }
        else if (type == "update")
        {
            loanTypes.UpdateLoanType(txtDescription.Value.Trim(),
                                     id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "ltedit"));
    }