private void btnAdd_Click(object sender, EventArgs e) { CollectionManager oManager = new CollectionManager(); CollectionUnit oUnit = new CollectionUnit(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); oUnit.DocNum = this.LoanNumber; oUnit.RefNo = txtReferenceNo.Text; oUnit.ScheduleNo = this.ScheduledNo; oUnit.Remarks = txtRemarks.Text; oUnit.TotalPayment = Convert.ToDouble(txtAmount.Text); oUnit.DateCreated = System.DateTime.Now; oUnit.DateModified = System.DateTime.Now; oUnit.CreatedBy = this.ActiveUserID; oUnit.ModifiedBy = this.ActiveUserID; oManager.AddCollection(oUnit); oManager.Close(); this.Close(); }
private void BindCollections(string sDocNum) { CollectionManager oManager = new CollectionManager(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); DataTable dt = oManager.GetCollection(sDocNum); oManager.Close(); gridControl3.DataSource = dt; gridControl3.Refresh(); }
void BindPayments(DateTime dFrom, DateTime dTo) { CollectionManager oManager = new CollectionManager(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); DataTable dt = oManager.GetCollection(dFrom, dTo); gridControl3.DataSource = dt; gridControl3.Refresh(); oManager.Close(); }