示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (this.Request.QueryString["iid"] == null)
                {
                    this.ucMessanger1.ProcessMessage("Invalid link.", Utilities.enMsgType.Err, "", null, true);
                    return;
                }

                this.btnBack.PostBackUrl = this.Request.UrlReferrer.AbsolutePath + this.Request.UrlReferrer.Query;

                bizInsured bizI = new bizInsured();
                DataSet    ds;
                ds = bizI.GetInsured(Convert.ToInt32(this.Request.QueryString["iid"]));
                this.ucMessanger1.ProcessMessages(bizI.MSGS, true);

                if (ds == null)
                {
                    return;
                }

                DataRow dr = ds.Tables[0].Rows[0];
                this.lblInsuredName.Text          = dr["InsuredName"].ToString();
                this.lblAccountExecutive.Text     = dr["AccountExecutive"].ToString();
                this.lblOAMPSEmail.Text           = dr["OAMPSEmail"].ToString();
                this.lblInsurer.Text              = dr["Insurer"].ToString();
                this.lblInsurancePeriodStart.Text = String.Format("{0:dd/MM/yyyy hh tt}", dr["InsurancePeriodStart"]);
                this.lblInsurancePeriodEnd.Text   = String.Format("{0:dd/MM/yyyy hh tt}", dr["InsurancePeriodEnd"]);
                this.lblTimeZoneStart.Text        = dr["TimeZone"].ToString();
                this.lblTimeZoneEnd.Text          = dr["TimeZone"].ToString();
                this.lblClass.Text               = dr["Class"].ToString();
                this.lblPolicyNumber.Text        = dr["PolicyNumber"].ToString();
                this.lblIndemnityLimit.Text      = String.Format("{0:C}", dr["IndemnityLimit"]);
                this.lblBusinessDescription.Text = dr["BusinessDescription"].ToString().Replace("\n", "<br />");

                DataSet        ads;
                bizAssociation bizA = new bizAssociation();
                ads = bizA.GetAssociation(Convert.ToInt32(dr["AssociationId"]));
                this.ucMessanger1.ProcessMessages(bizA.MSGS, true);

                if (ads == null)
                {
                    return;
                }

                if (ads.Tables[0].Rows.Count > 0)
                {
                    this.lblAssociation.Text = ads.Tables[0].Rows[0]["AssociationName"].ToString();
                }
            }
            catch (Exception ex)
            {
                bizLog.InsertExceptionLog(ex.Message, ex.StackTrace);
                Response.Redirect("~/ErrorPage.aspx", false);
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!this.IsPostBack)
                {
                    if (Request.QueryString["iid"] == null)
                    {
                        this.ucMessanger1.ProcessMessage("Invalid link.", Utilities.enMsgType.Err, "", null, true);
                        this.btnEdit.Visible = false;
                        return;
                    }

                    DataSet    ds;
                    bizInsured biz = new bizInsured();
                    ds = biz.GetInsured(Convert.ToInt32(Request.QueryString["iid"]));

                    if (ds == null)
                    {
                        return;
                    }

                    DataRow dr = ds.Tables[0].Rows[0];
                    this.txtInsuredName.Text           = dr["InsuredName"].ToString();
                    this.ddlAssociations.SelectedValue = dr["AssociationID"].ToString();
                    this.txtAccountExecutive.Text      = dr["AccountExecutive"].ToString();
                    this.txtInsurer.Text            = dr["Insurer"].ToString();
                    this.txtStart.Text              = String.Format("{0:dd/MM/yyyy}", dr["InsurancePeriodStart"]);
                    this.ddlStartHour.SelectedValue = String.Format("{0:hh}", dr["InsurancePeriodStart"]);
                    this.ddlStartAMPM.SelectedValue = String.Format("{0:tt}", dr["InsurancePeriodStart"]);
                    this.txtEnd.Text = String.Format("{0:dd/MM/yyyy}", dr["InsurancePeriodEnd"]);
                    this.ddlEndHour.SelectedValue    = String.Format("{0:hh}", dr["InsurancePeriodEnd"]);
                    this.ddlEndAMPM.SelectedValue    = String.Format("{0:tt}", dr["InsurancePeriodEnd"]);
                    this.ddlTimeZone.SelectedValue   = dr["TimeZone"].ToString();
                    this.txtClass.Text               = dr["Class"].ToString();
                    this.txtPolicyNumber.Text        = dr["PolicyNumber"].ToString();
                    this.txtIndemnityLimit.Amount    = Convert.ToDecimal(dr["IndemnityLimit"]);
                    this.txtOAMPSEmail.Text          = dr["OAMPSEmail"].ToString();
                    this.txtBusinessDescription.Text = dr["BusinessDescription"].ToString();

                    this.btnBack.PostBackUrl = "~/AssociationInsureds.aspx?aid=" + dr["AssociationID"].ToString();
                }
            }
            catch (Exception ex)
            {
                bizLog.InsertExceptionLog(ex.Message, ex.StackTrace);
                Response.Redirect("~/ErrorPage.aspx", false);
            }
        }
示例#3
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                if (UIValidation() == false)
                {
                    return;
                }

                DataSet   pds;
                bizPreset bizP = new bizPreset();
                //pds = bizP.GetPreset(Convert.ToInt32(this.Request.QueryString["pid"]));
                pds = bizP.GetPreset(Convert.ToInt32(hidActualPreset.Value));

                if (pds == null)
                {
                    return;
                }

                DataRow pdr = pds.Tables[0].Rows[0];

                DataSet    ds;
                bizInsured bizI = new bizInsured();
                ds = bizI.GetInsured(Convert.ToInt32(this.lstInsured.SelectedValue));
                this.ucMessanger1.ProcessMessages(bizI.MSGS, true);

                if (ds == null)
                {
                    return;
                }

                DataRow drSubmitPreset = ds.Tables[0].Rows[0];

                bizDocument biz = new bizDocument();

                if (biz.ValidateRequest(this.rblInterestedParty.SelectedValue == "Certificate of Currency 3rd Party" ? true : false,
                                        this.txtInterestedPartyName.Text,
                                        this.txtRequestedBy.Text,
                                        this.txtEmail.Text,
                                        this.txtPositionAtInsured.Text) == false)
                {
                    this.ucMessanger1.ProcessMessages(biz.MSGS, true);
                    return;
                }

                if (biz.ProcessRequest(this.lblHeaderTitle.Text,
                                       this.rblInterestedParty.SelectedValue == "Certificate of Currency 3rd Party" ? true : false,
                                       this.txtInterestedPartyName.Text,
                                       this.txtRequestedBy.Text,
                                       this.txtEmail.Text,
                                       this.txtPositionAtInsured.Text,
                                       pdr["TemplateName"].ToString(),
                                       (byte[])pdr["Template"],
                                       pdr["DocumentType"].ToString(),
                                       this.lstInsured.SelectedItem.Text,
                                       drSubmitPreset["AccountExecutive"].ToString(),
                                       drSubmitPreset["Insurer"].ToString(),
                                       Convert.ToDateTime(drSubmitPreset["InsurancePeriodStart"]),
                                       Convert.ToDateTime(drSubmitPreset["InsurancePeriodEnd"]),
                                       drSubmitPreset["TimeZone"].ToString(),
                                       drSubmitPreset["Class"].ToString(),
                                       drSubmitPreset["PolicyNumber"].ToString(),
                                       Convert.ToDecimal(drSubmitPreset["IndemnityLimit"]),
                                       drSubmitPreset["OAMPSEmail"].ToString(),
                                       drSubmitPreset["BusinessDescription"].ToString()) == true)
                {
                    ClearData();
                    if (this.rblInterestedParty.SelectedValue == "Certificate of Currency 3rd Party")
                    {
                        this.ucMessanger1.ProcessMessage("Request has been succesfully submitted. Requested document has to be approved by Arthur J. Gallagher & Co. when an interested party is involved.", Utilities.enMsgType.OK, "", null, true);
                    }
                    else
                    {
                        this.ucMessanger1.ProcessMessage("Request has been succesfully submited. You will get the requested document in your e-mail shortly.", Utilities.enMsgType.OK, "", null, true);
                    }
                }
                else
                {
                    this.ucMessanger1.ProcessMessage(string.Format("27 {0}", bizEmail.GetEmailValue("ErrorMessage")), Utilities.enMsgType.Err, "", null, true);
                }
            }
            catch (Exception ex)
            {
                bizLog.InsertExceptionLog(ex.Message, ex.StackTrace);
                Response.Redirect("~/ErrorPage.aspx", false);
            }
        }