コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                SessionBo.CheckSession();
                path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString());

                LOBId                 = int.Parse(Session["LOBId"].ToString());
                advisorLOBVo          = advisorLOBBo.GetLOB(LOBId);
                lblBtype.Text         = XMLBo.GetLOBType(path, advisorLOBVo.LOBClassificationCode.ToString());
                lblIdentifier.Text    = advisorLOBVo.Identifier.ToString();
                lblLicenseNumber.Text = advisorLOBVo.LicenseNumber.ToString();
                lblOrgname.Text       = advisorLOBVo.OrganizationName.ToString();
                lblValiditydate.Text  = advisorLOBVo.ValidityDate.ToShortDateString().ToString();

                if (advisorLOBVo.LOBClassificationCode == "LMIT" || advisorLOBVo.LOBClassificationCode == "LESC" || advisorLOBVo.LOBClassificationCode == "LERC" || advisorLOBVo.LOBClassificationCode == "LEBC")
                {
                    lblLicenseNo.Visible     = false;
                    lblLicenseNumber.Visible = false;
                }
                if (advisorLOBVo.LOBClassificationCode == "LMIT")
                {
                    lblValidity.Visible = true;
                    lblValidity.Visible = true;
                }
                else
                {
                    lblValidity.Visible     = false;
                    lblValiditydate.Visible = false;
                    DateTime mydate = new DateTime(DateTime.Today.Year, 1, 1);
                }
            }

            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "ViewLOBDetails.ascx:Page_Load()");


                object[] objects = new object[3];

                objects[1] = advisorLOBVo;
                objects[2] = LOBId;
                objects[3] = path;


                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
コード例 #2
0
        /// <summary>
        /// Used to send mail for registered users
        /// </summary>
        /// <param name="userVo"></param>
        /// <returns></returns>
        ///
        public void showLOBList(int advisorId)
        {
            string path = "";
            string classificationCode = "";

            try
            {
                //advisorVo = (AdvisorVo)Session["LOBAdvisorVo"];
                if (!IsPostBack)
                {
                    path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString());

                    advisorLOBList = advisorLOBBo.GetAdvisorLOBs(advisorId, null, null);

                    if (advisorLOBList.Tables[0].Rows.Count > 0)
                    {
                        lblMsg.Visible = false;

                        DataTable dtAdvisorLOB = new DataTable();
                        dtAdvisorLOB.Columns.Add("SI.No");
                        dtAdvisorLOB.Columns.Add("LOBId");
                        dtAdvisorLOB.Columns.Add("Broker Name");
                        dtAdvisorLOB.Columns.Add("Business Type");
                        dtAdvisorLOB.Columns.Add("Identifier");
                        dtAdvisorLOB.Columns.Add("Identifier Type");

                        DataRow drAdvisorLOB;

                        for (int i = 0; i < advisorLOBList.Tables[0].Rows.Count; i++)
                        {
                            classificationCode = advisorLOBList.Tables[0].Rows[i]["XALC_LOBClassificationCode"].ToString();
                            drAdvisorLOB       = dtAdvisorLOB.NewRow();

                            drAdvisorLOB[0] = (i + 1).ToString();
                            drAdvisorLOB[1] = advisorLOBList.Tables[0].Rows[i]["AL_LOBId"].ToString();
                            drAdvisorLOB[2] = advisorLOBList.Tables[0].Rows[i]["AL_OrgName"].ToString();
                            drAdvisorLOB[3] = XMLBo.GetLOBType(path, advisorLOBList.Tables[0].Rows[i]["XALC_LOBClassificationCode"].ToString());
                            if (classificationCode == "LDSA" || classificationCode == "LFIA" || classificationCode == "LIAG" || classificationCode == "LPAG" || classificationCode == "LREA")
                            {
                                drAdvisorLOB[4] = advisorLOBList.Tables[0].Rows[i]["AL_AgentNo"].ToString();
                                drAdvisorLOB[5] = "Agent No./Agency Code";
                            }
                            else
                            {
                                drAdvisorLOB[4] = advisorLOBList.Tables[0].Rows[i]["AL_Identifier"].ToString();
                                drAdvisorLOB[5] = advisorLOBList.Tables[0].Rows[i]["XALIT_IdentifierTypeCode"].ToString();
                            }
                            dtAdvisorLOB.Rows.Add(drAdvisorLOB);
                        }
                        advisorLOBListCheck = advisorLOBList;
                        if (dtAdvisorLOB.Rows.Count > 10)
                        {
                            gvLOBList.ShowFooter = true;
                        }
                        else
                        {
                            gvLOBList.FooterStyle.HorizontalAlign = HorizontalAlign.Center;
                        }
                        gvLOBList.ShowFooter = true;
                        gvLOBList.DataSource = dtAdvisorLOB;
                        gvLOBList.DataBind();
                    }
                    else
                    {
                        lblMsg.Visible = true;
                        //lblMsg.Text = "LOB List is Empty..";
                    }
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "ViewLOB.ascx:showLOBList()");


                object[] objects = new object[4];
                objects[0] = advisorId;
                objects[1] = path;
                objects[2] = advisorLOBVo;
                objects[3] = advisorLOBList;


                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }
コード例 #3
0
        private void sortGridViewLOB(string sortExpression, string direction)
        {
            string path = "";

            try
            {
                path      = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString());
                advisorVo = (AdvisorVo)Session["advisorVo"];

                advisorLOBList = advisorLOBBo.GetAdvisorLOBs(advisorVo.advisorId, null, null);
                if (advisorLOBList.Tables[0].Rows.Count > 0)
                {
                    DataTable dtAdvisorLOB = new DataTable();
                    dtAdvisorLOB.Columns.Add("SI.No");
                    dtAdvisorLOB.Columns.Add("LOBId");
                    dtAdvisorLOB.Columns.Add("Broker Name");
                    dtAdvisorLOB.Columns.Add("Business Type");
                    dtAdvisorLOB.Columns.Add("Identifier");
                    dtAdvisorLOB.Columns.Add("Identifier Type");

                    DataRow drAdvisorLOB;

                    for (int i = 0; i < advisorLOBList.Tables[0].Rows.Count; i++)
                    {
                        drAdvisorLOB = dtAdvisorLOB.NewRow();

                        drAdvisorLOB[0] = (i + 1).ToString();
                        drAdvisorLOB[1] = advisorLOBList.Tables[0].Rows[i]["AL_LOBId"].ToString();
                        drAdvisorLOB[2] = advisorLOBList.Tables[0].Rows[i]["AL_OrgName"].ToString();
                        drAdvisorLOB[3] = XMLBo.GetLOBType(path, advisorLOBList.Tables[0].Rows[i]["XALC_LOBClassificationCode"].ToString());
                        drAdvisorLOB[4] = advisorLOBList.Tables[0].Rows[i]["AL_Identifier"].ToString();
                        drAdvisorLOB[5] = advisorLOBList.Tables[0].Rows[i]["XALIT_IdentifierTypeCode"].ToString();
                        dtAdvisorLOB.Rows.Add(drAdvisorLOB);
                    }

                    DataView dv = new DataView(dtAdvisorLOB);
                    dv.Sort = sortExpression + direction;
                    gvLOBList.DataSource = dtAdvisorLOB;
                    gvLOBList.DataBind();
                }
                else
                {
                    gvLOBList.DataSource = null;
                    gvLOBList.Visible    = false;
                }
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();
                FunctionInfo.Add("Method", "ViewLOB.ascx.cs:sortGridViewLOB()");
                object[] objects = new object[3];
                objects[0] = advisorVo;
                objects[1] = path;
                objects[2] = advisorLOBList;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
        }