Ejemplo n.º 1
0
    protected void dvDataSource_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Damage       d = e.InputParameters["entityToInsert"] as Damage;
        TextBox      tbPolicyNumber        = DetailsView1.FindControl("tbPolicyNumber") as TextBox;
        string       policyNumber          = tbPolicyNumber.Text;
        DropDownList ddlInsuranceSubTypes  = DetailsView1.FindControl("ddlInsuranceSubTypes") as DropDownList;
        int          insuranceSubTypeID    = Convert.ToInt32(ddlInsuranceSubTypes.SelectedValue);
        DropDownList ddlInsuranceCompanies = DetailsView1.FindControl("ddlInsuranceCompanies") as DropDownList;
        int          insuranceCompanyID    = Convert.ToInt32(ddlInsuranceCompanies.SelectedValue);

        DamageController.ValidateInsertDamageNumber(d.DamageNumber, policyNumber, insuranceSubTypeID, insuranceCompanyID);
    }