protected void btnMasterLoad_Click(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request[txtMasterNo.UniqueID].Trim().ToUpper()))
        {
            CustomerDetails oCustomerDetails = new CustomerDetails();
            oCustomerDetails.MasterNo = txtMasterNo.Text;
            CustomerDetailsDAL oCustomerDetailsDAL = new CustomerDetailsDAL();
            Result             oResult             = new Result();
            ClearTextValue();
            oResult = oCustomerDetailsDAL.LoadByID(oCustomerDetails);
            if (oResult.Status)
            {
                txtMasterNo.Text     = oCustomerDetails.MasterNo;
                txtCustomerName.Text = oCustomerDetails.CustomerName;
                txtPhone.Text        = oCustomerDetails.Phone;
                txtAddress.Text      = oCustomerDetails.Address;
                txtNationalID.Text   = oCustomerDetails.NationalID;
                txtEmail.Text        = oCustomerDetails.EmailAddress;

                hdCustomerID.Value = "";
            }
        }
        else
        {
            ucMessage.OpenMessage("Master ID cannot be null for this types of searching", Constants.MSG_TYPE_ERROR);
        }
    }
    private void LoadDataByID(int sCustomerID)
    {
        CustomerDetails    oCustomerDetails    = new CustomerDetails(sCustomerID);
        CustomerDetailsDAL oCustomerDetailsDAL = new CustomerDetailsDAL();
        Result             oResult             = new Result();

        oResult = oCustomerDetailsDAL.LoadByID(oCustomerDetails);
        if (oResult.Status)
        {
            oCustomerDetails = (CustomerDetails)oResult.Return;

            txtCustomerID.Text     = oCustomerDetails.CustomerID.ToString();
            txtCustomerID.ReadOnly = true;
            txtCustomerName.Text   = oCustomerDetails.CustomerName;
            txtAddress.Text        = oCustomerDetails.Address;
            txtForignAddress.Text  = oCustomerDetails.ForeignAddress;
            txtPhone.Text          = oCustomerDetails.Phone;
            txtDateofBirth.Text    = oCustomerDetails.DateOfBirth.ToString(Constants.DATETIME_FORMAT);
            ddlSex.Text            = oCustomerDetails.Sex.ToString();
            txtNationality.Text    = oCustomerDetails.Nationality;
            txtPassportNo.Text     = oCustomerDetails.PassportNo;
            txtIssueAt.Text        = oCustomerDetails.PassportNo_IssuedAt;
            txtNationalID.Text     = oCustomerDetails.NationalID;
            txtBirthCertNo.Text    = oCustomerDetails.BirthCertificateNo;
            txtEmail.Text          = oCustomerDetails.EmailAddress;

            txtCustomerName2.Text  = oCustomerDetails.CustomerName2;
            txtAddress2.Text       = oCustomerDetails.Address2;
            txtForignAddress2.Text = oCustomerDetails.ForeignAddress2;
            txtPhone2.Text         = oCustomerDetails.Phone2;
            txtDateofBirth2.Text   = oCustomerDetails.DateOfBirth2.ToString(Constants.DATETIME_FORMAT);
            ddlSex2.Text           = oCustomerDetails.Sex2.ToString();
            txtNationality2.Text   = oCustomerDetails.Nationality2;
            txtPassportNo2.Text    = oCustomerDetails.PassportNo2;
            txtIssueAt2.Text       = oCustomerDetails.IssuedAt2;
            txtNationalID2.Text    = oCustomerDetails.NationalID2;
            txtBirthCertNo2.Text   = oCustomerDetails.BirthCertificateNo2;
            txtEmail2.Text         = oCustomerDetails.EmailAddress2;

            ucUserDet.UserDetail = oCustomerDetails.UserDetails;

            hdCustomerID.Value = sCustomerID.ToString();
        }
        else
        {
            ucMessage.OpenMessage(Constants.MSG_ERROR_NOT_FOUND, Constants.MSG_TYPE_ERROR);
        }
    }
    protected void btnCustomerLoad_Click(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(Request[txtCustomerID.UniqueID].Trim().ToUpper()))
        {
            CustomerDetails    oCustomerDetails    = new CustomerDetails(Util.GetIntNumber(Request[txtCustomerID.UniqueID].Trim().ToUpper()));
            CustomerDetailsDAL oCustomerDetailsDAL = new CustomerDetailsDAL();
            Result             oResult             = new Result();

            oResult = oCustomerDetailsDAL.LoadByID(oCustomerDetails);
            if (oResult.Status)
            {
                ClearTextValue();
                oCustomerDetails      = (CustomerDetails)oResult.Return;
                txtCustomerID.Text    = oCustomerDetails.CustomerID.ToString();
                txtCustomerName.Text  = oCustomerDetails.CustomerName;
                txtAddress.Text       = oCustomerDetails.Address;
                txtForignAddress.Text = oCustomerDetails.ForeignAddress;
                txtPhone.Text         = oCustomerDetails.Phone;
                txtDateofBirth.Text   = oCustomerDetails.DateOfBirth.ToString(Constants.DATETIME_FORMAT);
                ddlSex.Text           = oCustomerDetails.Sex.ToString();
                txtNationality.Text   = oCustomerDetails.Nationality;
                txtPassportNo.Text    = oCustomerDetails.PassportNo;
                txtIssueAt.Text       = oCustomerDetails.PassportNo_IssuedAt;
                txtNationalID.Text    = oCustomerDetails.NationalID;
                txtBirthCertNo.Text   = oCustomerDetails.BirthCertificateNo;
                txtEmail.Text         = oCustomerDetails.EmailAddress;

                txtCustomerName2.Text  = oCustomerDetails.CustomerName2;
                txtAddress2.Text       = oCustomerDetails.Address2;
                txtForignAddress2.Text = oCustomerDetails.ForeignAddress2;
                txtPhone2.Text         = oCustomerDetails.Phone2;
                txtDateofBirth2.Text   = oCustomerDetails.DateOfBirth2.ToString(Constants.DATETIME_FORMAT);
                ddlSex2.Text           = oCustomerDetails.Sex2.ToString();
                txtNationality2.Text   = oCustomerDetails.Nationality2;
                txtPassportNo2.Text    = oCustomerDetails.PassportNo2;
                txtIssueAt2.Text       = oCustomerDetails.IssuedAt2;
                txtNationalID2.Text    = oCustomerDetails.NationalID2;
                txtBirthCertNo2.Text   = oCustomerDetails.BirthCertificateNo2;
                txtEmail2.Text         = oCustomerDetails.EmailAddress2;

                hdCustomerID.Value = oCustomerDetails.CustomerID.ToString();
            }
        }
        else
        {
            ucMessage.OpenMessage("Customer ID cannot be null for this types of searching", Constants.MSG_TYPE_ERROR);
        }
    }