Example #1
0
        private void BindEmployers()
        {
            EmployerManager oManager = new EmployerManager();

            oManager.ConnectionString = this.ConnectionString;
            oManager.Open();

            gridControl2.DataSource = oManager.GetEmployerInfo();
            gridControl2.Refresh();

            oManager.Close();
        }
Example #2
0
        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();
        }
Example #3
0
        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();
        }