private void BindEmployers() { EmployerManager oManager = new EmployerManager(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); gridControl2.DataSource = oManager.GetEmployerInfo(); gridControl2.Refresh(); oManager.Close(); }
public void AddEmployer() { EmployerManager oManager = new EmployerManager(); EmployerUnit oUnit = new EmployerUnit(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); oUnit.EmployerCode = txtCode.Text; oUnit.EmployerName = txtEmployerName.Text; oUnit.EmployerTINIDNo = txtTINIDNo.Text; oUnit.Address = txtAddress.Text; oUnit.ContactNumber = txtContactNo.Text; oUnit.EmailAddress = txtEmailAddress.Text; oUnit.ContactNumber = txtContactNo.Text; oUnit.ContactPerson = txtContactPerson.Text; oManager.AddEmployer(oUnit); oManager.Close(); txtCode.Enabled = false; }
public void OpenEmployerInfo(string sCode) { EmployerManager oManager = new EmployerManager(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); DataTable dtEmployer = oManager.GetEmployerInfo(sCode); DataRow dtRow = dtEmployer.Rows[0]; txtCode.Text = dtRow["EmployerCode"].ToString(); txtEmployerName.Text = dtRow["EmployerName"].ToString(); txtTINIDNo.Text = dtRow["EmployerTINIDNo"].ToString(); txtAddress.Text = dtRow["Address"].ToString(); txtContactNo.Text = dtRow["ContactNumber"].ToString(); txtEmailAddress.Text = dtRow["EmailAddress"].ToString(); txtContactPerson.Text = dtRow["ContactPerson"].ToString(); txtCode.Enabled = false; oManager.Close(); }
void BindEmployer() { EmployerManager oManager = new EmployerManager(); DataTable dtEmployer = new DataTable(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); dtEmployer = oManager.GetEmployerInfo(); oManager.Close(); cboEmployer.Properties.DataSource = dtEmployer; cboEmployer.Properties.DisplayMember = "EmployerName"; cboEmployer.Properties.ValueMember = "EmployerCode"; DevExpress.XtraEditors.Controls.LookUpColumnInfo col; col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("EmployerCode", "Code", 100); cboEmployer.Properties.Columns.Add(col); col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("EmployerName", "Name", 100); cboEmployer.Properties.Columns.Add(col); cboEmployer.Refresh(); }
private bool IsEmployerCodeExists(string sCode) { EmployerManager oManager = new EmployerManager(); oManager.ConnectionString = this.ConnectionString; oManager.Open(); bool _returnValue = oManager.IsCodeExists(sCode); oManager.Close(); return _returnValue; }