Exemplo n.º 1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            LoanDSTableAdapters.GetLoanReportTableAdapter LoanRpt = new LoanDSTableAdapters.GetLoanReportTableAdapter();
            LoanDS.GetLoanReportDataTable tblLoanRpt = LoanRpt.GetLoanReport(MySessionManager.AppID, MySessionManager.ClientID);

            if (!(tblLoanRpt.Rows.Count > 0))
            {
                LoanRpt.InsertLoanReport(txtDescription.Value.Trim(),
                                         MySessionManager.ClientID,
                                         MySessionManager.AppID,
                                         MySessionManager.CurrentUser.UserID);
                this.editskip.Value = "1";
            }
            else
            {
                int id = Convert.ToInt32(tblLoanRpt[0].datID.ToString());
                LoanRpt.UpdateLoanReport(txtDescription.Value.Trim(),
                                         MySessionManager.ClientID,
                                         MySessionManager.AppID);
                this.editskip.Value = "1";
            }
        }
    }
Exemplo n.º 2
0
 public void LoadLoanRpt()
 {
     LoanDSTableAdapters.GetLoanReportTableAdapter LoanRpt = new LoanDSTableAdapters.GetLoanReportTableAdapter();
     LoanDS.GetLoanReportDataTable tblLoanRpt = LoanRpt.GetLoanReport(MySessionManager.AppID, MySessionManager.ClientID);
     if (tblLoanRpt.Rows.Count > 0)
     {
         txtDescription.Value = Convert.ToString(tblLoanRpt[0].datDescription);
     }
     this.editskip.Value = "2";
 }