Ejemplo n.º 1
0
        public void AddEmployer(EmployerUnit oUnit)
        {
            SqlCommand oCommand = new SqlCommand();

            oCommand.Connection = this.Connection;
            oCommand.CommandType = CommandType.StoredProcedure;
            oCommand.CommandText = "SP_TRANS_INSERT_EMPLOYER";

            oCommand.Parameters.Add(new SqlParameter("@EmployerCode", oUnit.EmployerCode));
            oCommand.Parameters.Add(new SqlParameter("@EmployerName", oUnit.EmployerName));
            oCommand.Parameters.Add(new SqlParameter("@EmployerTINIDNo", oUnit.EmployerTINIDNo));
            oCommand.Parameters.Add(new SqlParameter("@Address", oUnit.Address));
            oCommand.Parameters.Add(new SqlParameter("@ContactNumber", oUnit.ContactNumber));
            oCommand.Parameters.Add(new SqlParameter("@EmailAddress", oUnit.EmailAddress));
            oCommand.Parameters.Add(new SqlParameter("@ContactPerson", oUnit.ContactPerson));

            oCommand.ExecuteNonQuery();
        }
Ejemplo n.º 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;
        }