public void AddGuarantorFinancer(GuarantorFinancerUnit oUnit)
        {
            SqlCommand oCommand = new SqlCommand();

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

            oCommand.Parameters.Add(new SqlParameter("@GuarantorFinancerCode", oUnit.GuarantorFinancerCode));
            oCommand.Parameters.Add(new SqlParameter("@GuarantorFinancerName", oUnit.GuarantorFinancerName));
            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();
        }
        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();
        }
        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;
        }