Exemple #1
0
    protected void btnContinueBuilding_Click(object sender, EventArgs e)
    {
        vwPropertyHandler objPropertyhandler = new vwPropertyHandler();
        string            strQuoteNo         = Convert.ToString(Session["QuoteNo"]);
        vwProperty        objvwProperty      = objPropertyhandler.GetDetailsByQuoteNo(strQuoteNo);

        int      propertyID  = Convert.ToInt32(ViewState["PropertyID"]);
        Property objProperty = new Property();

        objProperty.ID       = propertyID;
        objProperty.QuoteID  = objvwProperty.QuoteID;
        objProperty.Address1 = objvwProperty.Address1;
        objProperty.Address2 = objvwProperty.Address2;
        objProperty.Zip      = objvwProperty.Zip;
        objProperty.City     = objvwProperty.City;
        objProperty.StateID  = objvwProperty.StateID;
        objProperty.ClassID  = objvwProperty.ClassID;

        objProperty.StructureDescription = txtDescription.Text;
        objProperty.ConstructionType     = Convert.ToString(ddlConstructionType.SelectedValue);
        objProperty.HigherWindHall       = Convert.ToString(ddlHigherWindHall.SelectedValue);
        objProperty.ConstType_ApplySpriniderSafeguardP1 = chkApplySpriniderSafeguardP1.Checked;
        objProperty.ConstType_ExcludeWindHall           = chkExcludeWindHall.Checked;
        objProperty.YearBuilt = Convert.ToInt32(txtYearBuilt.Text);
        objProperty.LastCompleteUpdateYear = Convert.ToInt32(txtHeading.Text);
        objProperty.Plumbing                          = Convert.ToString(txtPlumbing.Text);
        objProperty.Rooting                           = Convert.ToString(txtRooting.Text);
        objProperty.Wiring                            = Convert.ToString(txtWiring.Text);
        objProperty.Coverage_Building                 = chkBuilding.Checked;
        objProperty.Coverage_BusinessIncome           = chkBusinessIncome.Checked;
        objProperty.Coverage_PersonalPropertyofOthers = chkPersonalPropertyOfOthers.Checked;
        objProperty.Coverage_PropertyInOpen           = chkPropertyInTheOpen.Checked;
        objProperty.Coverage_Signs                    = chkSigns.Checked;

        PropertyHandler propertyHandler = new PropertyHandler();

        propertyHandler.Update(objProperty);
        mvProperty.SetActiveView(vwSpecialDeductible);
    }
Exemple #2
0
    protected void btnContinue_Click(object sender, EventArgs e)
    {
        int    quoteID      = Convert.ToInt32(Session["QuoteID"]);
        string strQuoteMode = Convert.ToString(Session["QuoteMode"]);
        string strQuoteNo   = Convert.ToString(Session["QuoteNo"]);

        if (strQuoteMode == "EDIT")
        {
            vwPropertyHandler objPropertyhandler = new vwPropertyHandler();

            vwProperty objvwProperty = objPropertyhandler.GetDetailsByQuoteNo(strQuoteNo);

            //int propertyID = Convert.ToInt32(ViewState["PropertyID"]);
            Property objProperty = new Property();
            objProperty.ID       = objvwProperty.ID;
            objProperty.QuoteID  = Convert.ToInt32(Session["QuoteID"]);
            objProperty.Address1 = Convert.ToString(txtAddress1.Text);
            objProperty.Address2 = Convert.ToString(txtAddress2.Text);
            objProperty.Zip      = Convert.ToInt32(txtZip.Text);
            objProperty.City     = Convert.ToString(txtCity.Text);
            objProperty.StateID  = Convert.ToInt32(ddlState.SelectedValue);

            objProperty.ClassID = Convert.ToInt32(ddlSelectClass.SelectedValue);

            objProperty.StructureDescription = objvwProperty.StructureDescription;
            objProperty.ConstructionType     = objvwProperty.ConstructionType;
            objProperty.HigherWindHall       = objvwProperty.HigherWindHall;
            objProperty.ConstType_ApplySpriniderSafeguardP1 = objvwProperty.ConstType_ApplySpriniderSafeguardP1;
            objProperty.ConstType_ExcludeWindHall           = objvwProperty.ConstType_ExcludeWindHall;
            objProperty.YearBuilt = objvwProperty.YearBuilt;
            objProperty.LastCompleteUpdateYear = objvwProperty.LastCompleteUpdateYear;
            objProperty.Plumbing                          = objvwProperty.Plumbing;
            objProperty.Rooting                           = objvwProperty.Rooting;
            objProperty.Wiring                            = objvwProperty.Wiring;
            objProperty.Coverage_Building                 = objvwProperty.Coverage_Building;
            objProperty.Coverage_BusinessIncome           = objvwProperty.Coverage_BusinessIncome;
            objProperty.Coverage_PersonalPropertyofOthers = objvwProperty.Coverage_PersonalPropertyofOthers;
            objProperty.Coverage_PropertyInOpen           = objvwProperty.Coverage_PropertyInOpen;
            objProperty.Coverage_Signs                    = objvwProperty.Coverage_Signs;

            PropertyHandler propertyHandler = new PropertyHandler();
            propertyHandler.Update(objProperty);
        }
        else
        {
            Property objProperty = new Property();


            objProperty.QuoteID  = Convert.ToInt32(Session["QuoteID"]);
            objProperty.Address1 = Convert.ToString(txtAddress1.Text);
            objProperty.Address2 = Convert.ToString(txtAddress2.Text);
            objProperty.Zip      = Convert.ToInt32(txtZip.Text);
            objProperty.City     = Convert.ToString(txtCity.Text);
            objProperty.StateID  = Convert.ToInt32(ddlState.SelectedValue);

            objProperty.ClassID = Convert.ToInt32(ddlSelectClass.SelectedValue);

            PropertyHandler propertyHandler = new PropertyHandler();
            propertyHandler.AddNew(objProperty);
        }
        //string strQuoteNo = Convert.ToString(Session["QuoteNo"]);
        LoadPropertyDetails(strQuoteNo);
        mvProperty.SetActiveView(vwBuilding);
    }