private void BindGuarantor() { GuarantorFinancerManager oManager = new GuarantorFinancerManager(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); DataTable dtGuarantor = oManager.GetGuarantorInfo(); oManager.Close(); grdCtlGuarantorFinancer.DataSource = dtGuarantor; grdCtlGuarantorFinancer.Refresh(); }
public void OpenGuarantorInfo(string sCode) { GuarantorFinancerManager oManager = new GuarantorFinancerManager(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); DataTable dtGuarantorInfo = oManager.GetGuarantorInfo(sCode); oManager.Close(); DataRow oRow = dtGuarantorInfo.Rows[0]; txtCode.Text = oRow["GuarantorFinancerCode"].ToString(); txtEmployerName.Text = oRow["GuarantorFinancerName"].ToString(); txtAddress.Text = oRow["Address"].ToString(); txtContactNo.Text = oRow["ContactNumber"].ToString(); txtEmailAddress.Text = oRow["EmailAddress"].ToString(); txtContactPerson.Text = oRow["ContactPerson"].ToString(); txtCode.Enabled = false; }
public void AddGuarantor() { GuarantorFinancerManager oManager = new GuarantorFinancerManager(); GuarantorFinancerUnit oUnit = new GuarantorFinancerUnit(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); oUnit.GuarantorFinancerCode = txtCode.Text; oUnit.GuarantorFinancerName = txtEmployerName.Text; oUnit.Address = txtAddress.Text; oUnit.ContactNumber = txtContactNo.Text; oUnit.EmailAddress = txtEmailAddress.Text; oUnit.ContactNumber = txtContactNo.Text; oUnit.ContactPerson = txtContactPerson.Text; oManager.AddGuarantorFinancer(oUnit); oManager.Close(); }
void BindGuarantor() { GuarantorFinancerManager oManager = new GuarantorFinancerManager(); DataTable dtGuarantor = new DataTable(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); dtGuarantor = oManager.GetGuarantorInfo(); oManager.Close(); cboGuarantorFinancer.Properties.DataSource = dtGuarantor; cboGuarantorFinancer.Properties.DisplayMember = "GuarantorFinancerName"; cboGuarantorFinancer.Properties.ValueMember = "GuarantorFinancerName"; DevExpress.XtraEditors.Controls.LookUpColumnInfo col; col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("GuarantorFinancerCode", "Code", 100); cboGuarantorFinancer.Properties.Columns.Add(col); col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("GuarantorFinancerName", "Name", 100); cboGuarantorFinancer.Properties.Columns.Add(col); cboGuarantorFinancer.Refresh(); }
bool IsExists(string sCode) { GuarantorFinancerManager oManager = new GuarantorFinancerManager(); GuarantorFinancerUnit oUnit = new GuarantorFinancerUnit(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); bool rValue = oManager.IsExists(txtCode.Text); oManager.Close(); return rValue; }