private void dataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            IConverter converter        = new DateConverter();
            IConverter booleanConverter = new RMX_TOOLS.converter.BooleanConverter();

            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.name_FIELD) != null)
            {
                txtName.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.name_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.family_FIELD) != null)
            {
                txtFamily.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.family_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.phoneNumber_FIELD) != null)
            {
                txtPhoneNumber.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.phoneNumber_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.insuranceNumber_FIELD) != null)
            {
                txtInsuranceNumber.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.insuranceNumber_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.caption_FIELD) != null)
            {
                cmbInsuranceType.SelectedText = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.caption_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.insuranceType_FIELD) != null)
            {
                cmbInsuranceType.SelectedValue = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.insuranceType_FIELD);
            }

            if (_gridTools.getCurrentRowValue(InsuranceInfoData.beginDate_FIELD) != null)
            {
                //txtBeginDate.Text = converter.valueToString(_gridTools.getCurrentRowValue(InsuranceInfoData.beginDate_FIELD));
                txtBeginDate.Text = _gridTools.getCurrentRowValue(InsuranceInfoData.beginDate_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(InsuranceInfoData.endDate_FIELD) != null)
            {
                //txtEndDate.Text = converter.valueToString(_gridTools.getCurrentRowValue(InsuranceInfoData.endDate_FIELD));
                txtEndDate.Text = _gridTools.getCurrentRowValue(InsuranceInfoData.endDate_FIELD).ToString().Trim();
            }

            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.haveDid_FIELD) != null)
            {
                Boolean b = Boolean.Parse(booleanConverter.valueToString(_gridTools.getCurrentRowValue(ViewInsuranceInfoData.haveDid_FIELD)));
                if (b)
                {
                    cmbHaveDid.SelectedIndex = 1;
                }
                else
                {
                    cmbHaveDid.SelectedIndex = 2;
                }
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.address_FIELD) != null)
            {
                txtAddress.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.address_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.description_FIELD) != null)
            {
                txtDescription.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.description_FIELD).ToString().Trim();
            }
        }
Beispiel #2
0
        private void dataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.id_FIELD) != null)
            {
                _id = (int)_gridTools.getCurrentRowValue(ViewInsuranceInfoData.id_FIELD);
            }
            IConverter converter        = new DateConverter();
            IConverter booleanConverter = new RMX_TOOLS.converter.BooleanConverter();

            if (_gridTools.getCurrentRowValue(InsuranceInfoData.name_FIELD) != null)
            {
                txtName.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.name_FIELD).ToString().Trim();
            }

            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.family_FIELD) != null)
            {
                txtFamily.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.family_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.phoneNumber_FIELD) != null)
            {
                txtPhoneNumber.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.phoneNumber_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.insuranceNumber_FIELD) != null)
            {
                txtInsuranceNumber.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.insuranceNumber_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.caption_FIELD) != null)
            {
                cmbInsuranceType.SelectedText = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.caption_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.insuranceType_FIELD) != null)
            {
                cmbInsuranceType.SelectedValue = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.insuranceType_FIELD);
            }

            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.beginDate_FIELD) != null)
            {
                //txtBeginDate.Text = converter.valueToString(_gridTools.getCurrentRowValue(ViewInsuranceInfoData.beginDate_FIELD));
                txtBeginDate.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.beginDate_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.endDate_FIELD) != null)
            {
                //txtEndDate.Text = converter.valueToString(_gridTools.getCurrentRowValue(ViewInsuranceInfoData.endDate_FIELD));
                txtEndDate.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.endDate_FIELD).ToString().Trim();
            }

            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.creationDate_FIELD) != null)
            {
                txtCreationDate.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.creationDate_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.lastUpdateDate_FIELD) != null)
            {
                txtLastUpdateDate.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.lastUpdateDate_FIELD).ToString().Trim();
            }

            if (_gridTools.getCurrentRowValue(ViewInsuranceInfoData.haveDid_FIELD) != null)
            {
                cbxHaveDid.Checked = Boolean.Parse(booleanConverter.valueToString(_gridTools.getCurrentRowValue(ViewInsuranceInfoData.haveDid_FIELD)));
            }

            if (_gridTools.getCurrentRowValue(InsuranceInfoData.address_FIELD) != null)
            {
                txtAddress.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.address_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(InsuranceInfoData.description_FIELD) != null)
            {
                txtDescription.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.description_FIELD).ToString().Trim();
            }

            if (_gridTools.getCurrentRowValue(InsuranceInfoData.BirthDate_FIELD) != null)
            {
                txtBirthDate.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.BirthDate_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(InsuranceInfoData.mobileNumber_FIELD) != null)
            {
                txtMobilePhone.Text = _gridTools.getCurrentRowValue(ViewInsuranceInfoData.mobileNumber_FIELD).ToString().Trim();
            }

            cmbCustomerType.SelectedIndex = -1;
            object v = _gridTools.getCurrentRowValue(InsuranceInfoData.CustomerType_FIELD);

            if (v != null && v.ToString().Length > 0)
            {
                cmbCustomerType.SelectedIndex = (int)_gridTools.getCurrentRowValue(InsuranceInfoData.CustomerType_FIELD);
            }

            getAttachmentCount();
        }
Beispiel #3
0
        private void dataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            IConverter converter        = new DateConverter();
            IConverter booleanConverter = new RMX_TOOLS.converter.BooleanConverter();

            cmbHaveDid.SelectedIndex = -1;
            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.INSURANCEINFO_NAME_FIELD) != null)
            {
                txtName.Text = _gridTools.getCurrentRowValue(ViewHaveDidLogData.INSURANCEINFO_NAME_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.INSURANCEINFO_FAMILY_FIELD) != null)
            {
                txtFamily.Text = _gridTools.getCurrentRowValue(ViewHaveDidLogData.INSURANCEINFO_FAMILY_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.PhoneNumber_FIELD) != null)
            {
                txtPhoneNumber.Text = _gridTools.getCurrentRowValue(ViewHaveDidLogData.PhoneNumber_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.InsuranceNumber_FIELD) != null)
            {
                txtInsuranceNumber.Text = _gridTools.getCurrentRowValue(ViewHaveDidLogData.InsuranceNumber_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.InsuranceType_Caption_FIELD) != null)
            {
                cmbInsuranceType.SelectedText = _gridTools.getCurrentRowValue(ViewHaveDidLogData.InsuranceType_Caption_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.InsuranceType_FIELD) != null)
            {
                cmbInsuranceType.SelectedValue = _gridTools.getCurrentRowValue(ViewHaveDidLogData.InsuranceType_FIELD);
            }

            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.BeginDate_FIELD) != null)
            {
                //txtBeginDate.Text = converter.valueToString(_gridTools.getCurrentRowValue(ViewHaveDidLogData.BeginDate_FIELD));
                txtBeginDate.Text = _gridTools.getCurrentRowValue(ViewHaveDidLogData.BeginDate_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.EndDate_FIELD) != null)
            {
                //txtEndDate.Text = converter.valueToString(_gridTools.getCurrentRowValue(ViewHaveDidLogData.EndDate_FIELD));
                txtEndDate.Text = _gridTools.getCurrentRowValue(ViewHaveDidLogData.EndDate_FIELD).ToString().Trim();
            }

            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.haveDid_FIELD) != null)
            {
                Boolean b = Boolean.Parse(booleanConverter.valueToString(_gridTools.getCurrentRowValue(ViewHaveDidLogData.haveDid_FIELD)));
                if (b)
                {
                    cmbHaveDid.SelectedIndex = 1;
                }
                //else
                //    cmbHaveDid.SelectedIndex = 2;
            }
            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.address_FIELD) != null)
            {
                txtAddress.Text = _gridTools.getCurrentRowValue(ViewHaveDidLogData.address_FIELD).ToString().Trim();
            }
            if (_gridTools.getCurrentRowValue(ViewHaveDidLogData.description_FIELD) != null)
            {
                txtDescription.Text = _gridTools.getCurrentRowValue(ViewHaveDidLogData.description_FIELD).ToString().Trim();
            }
        }