Beispiel #1
0
    public void loadLoanPurpose(int id)
    {
        adminTableAdapters.GetLoanPurposeTableAdapter loanpurpose = new adminTableAdapters.GetLoanPurposeTableAdapter();
        admin.GetLoanPurposeDataTable tbl = loanpurpose.GetLoanPurposeDetails(id);

        if (tbl.Rows.Count > 0)
        {
            txtdescription.Value = tbl[0].datDescription.ToString();
            this.editskip.Value  = "2";
        }
    }
    public void loadLoanPurpose(int id)
    {
        adminTableAdapters.GetLoanPurposeTableAdapter loanpurpose = new adminTableAdapters.GetLoanPurposeTableAdapter();
        admin.GetLoanPurposeDataTable tbl = loanpurpose.GetLoanPurposeDetails(id);

           if(tbl.Rows.Count>0)
           {
              txtdescription.Value = tbl[0].datDescription.ToString();
              this.editskip.Value  = "2";
           }
        }
Beispiel #3
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        adminTableAdapters.GetLoanPurposeTableAdapter loanpurpose = new adminTableAdapters.GetLoanPurposeTableAdapter();
        if (!(type == "update"))
        {
            loanpurpose.InsertLoanPurpose(txtdescription.Value.Trim(), 1);
        }
        else if (type == "update")
        {
            loanpurpose.UpdateLoanPurpose(txtdescription.Value.Trim(),
                                          1,
                                          id);
        }

        Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "lpedit"));
    }
 protected void btnSave_Click(object sender, EventArgs e)
 {
     adminTableAdapters.GetLoanPurposeTableAdapter loanpurpose = new adminTableAdapters.GetLoanPurposeTableAdapter();
     if (!(type == "update"))
     {
         loanpurpose.InsertLoanPurpose(txtdescription.Value.Trim(),1);
       
     }
     else if (type == "update")
     {
         loanpurpose.UpdateLoanPurpose(txtdescription.Value.Trim(),
                                       1,
                                       id);
     }
    
     Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "lpedit"));
 }