Ejemplo n.º 1
0
    protected void btnCalculate_Click(object sender, EventArgs e)
    {
        int    quoteID      = Convert.ToInt32(Session["QuoteID"]);
        string strQuoteMode = Convert.ToString(Session["QuoteMode"]);

        if (strQuoteMode == "EDIT")
        {
            LimitDetailsHandler objLimitDtlsHandler = new LimitDetailsHandler();

            LimitDetails objLimitDtls = objLimitDtlsHandler.GetClassDetailsByQuoteID(quoteID);

            LimitDetails objLimits = new LimitDetails();
            objLimits.ID                 = objLimitDtls.ID;
            objLimits.Quote_ID           = objLimitDtls.Quote_ID;
            objLimits.EachOccurence      = Convert.ToString(ddlOccurance.SelectedValue);
            objLimits.GeneralAggregate   = Convert.ToString(ddlGeneralAggregate.SelectedValue);
            objLimits.PremisesDamage     = Convert.ToString(ddlDamagetoPremises.SelectedValue);
            objLimits.MedicalExpense     = Convert.ToString(ddlMedicalExpense.SelectedValue);
            objLimits.ProductCompleted   = Convert.ToString(ddlProdAggregate.SelectedValue);
            objLimits.DeductablePerClaim = Convert.ToString(ddlDeductibleperClaim.SelectedValue);
            objLimits.PersonalInjury     = Convert.ToString(ddlInjury.SelectedValue);

            LimitDetailsHandler limitHandler = new LimitDetailsHandler();
            limitHandler.Update(objLimits);
        }
        else
        {
            LimitDetails objLimits = new LimitDetails();
            objLimits.Quote_ID           = Convert.ToInt32(Session["QuoteID"]);
            objLimits.EachOccurence      = Convert.ToString(ddlOccurance.SelectedValue);
            objLimits.GeneralAggregate   = Convert.ToString(ddlGeneralAggregate.SelectedValue);
            objLimits.PremisesDamage     = Convert.ToString(ddlDamagetoPremises.SelectedValue);
            objLimits.MedicalExpense     = Convert.ToString(ddlMedicalExpense.SelectedValue);
            objLimits.ProductCompleted   = Convert.ToString(ddlProdAggregate.SelectedValue);
            objLimits.DeductablePerClaim = Convert.ToString(ddlDeductibleperClaim.SelectedValue);
            objLimits.PersonalInjury     = Convert.ToString(ddlInjury.SelectedValue);

            LimitDetailsHandler limitHandler = new LimitDetailsHandler();
            limitHandler.AddNew(objLimits);
        }
        lblMsg.Text = "Data has been successfully saved.";
        mpShow.Show();
    }
Ejemplo n.º 2
0
 public bool Update(LimitDetails objLimit)
 {
     return(limitDetails.Update(objLimit));
 }
Ejemplo n.º 3
0
 public bool AddNew(LimitDetails objLimit)
 {
     return(limitDetails.AddNew(objLimit));
 }