protected void btnMasterLoad_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtMasterNo.Text))
            {
                CustomerDetails oCustomerDetails = new CustomerDetails();
                oCustomerDetails.MasterNo = txtMasterNo.Text;
                CustomerDetailsDAL oCustomerDetailsDAL = new CustomerDetailsDAL();
                Result             oResult             = new Result();
                ClearData();
                oResult = oCustomerDetailsDAL.LoadByMasterID(oCustomerDetails);
                if (oResult.Status)
                {
                    //txtCustomerID.Text = Convert.ToString(oCustomerDetails.CustomerID);
                    //txtMasterNo.Text = oCustomerDetails.MasterNo;
                    //txtCustomerName.Text = oCustomerDetails.CustomerName;
                    //txtPhone.Text = oCustomerDetails.Phone;
                    //txtAddress.Text = oCustomerDetails.Address;
                    //txtDateofBirth.Text = oCustomerDetails.DateOfBirth.ToString(Constants.DATETIME_FORMAT);
                    //ddlSex.Text = oCustomerDetails.Sex;
                    //ddlResidenceStatus.Text = oCustomerDetails.ResidenceStatus;
                    //txtNationalID.Text = oCustomerDetails.NationalID;
                    //txtEmail.Text = oCustomerDetails.EmailAddress;

                    //hdTmpCustomerID.Value = "";
                    SetCustomerDetails(oCustomerDetails);
                }
            }
            StringBuilder sbUrl = new StringBuilder();

            sbUrl.Append("<script> ");
            sbUrl.Append(" CustomerDetailPopup() ");
            sbUrl.Append("</script>");
            Page.RegisterStartupScript("OpenWindows", sbUrl.ToString());
        }
        protected void btnMasterLoad_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtMasterNo.Text))
            {
                CustomerDetails oCustomerDetails = new CustomerDetails();
                oCustomerDetails.MasterNo = txtMasterNo.Text;
                CustomerDetailsDAL oCustomerDetailsDAL = new CustomerDetailsDAL();
                Result             oResult             = new Result();
                //ClearData();
                oResult = oCustomerDetailsDAL.LoadByMasterID(oCustomerDetails);
                if (oResult.Status)
                {
                    SetCustomerDetails(oCustomerDetails);
                    hdTmpCustomerID.Value = "";
                }
                else
                {
                    ClearData();
                }
            }
            StringBuilder sbUrl = new StringBuilder();

            sbUrl.Append("<script> ");
            sbUrl.Append(" CustomerDetailPopup() ");
            sbUrl.Append("</script>");
            Page.RegisterStartupScript("OpenWindows", sbUrl.ToString());
        }