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

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

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

            oManager.Close();
        }
예제 #2
0
        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;
        }
예제 #3
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();
        }
예제 #4
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();
        }
예제 #5
0
        private bool IsEmployerCodeExists(string sCode)
        {
            EmployerManager oManager = new EmployerManager();
            oManager.ConnectionString = this.ConnectionString;
            oManager.Open();

            bool _returnValue = oManager.IsCodeExists(sCode);

            oManager.Close();

            return _returnValue;
        }