コード例 #1
0
        public void SetValuesToControls(LifeInsuranceOrderVo lifeInsuranceOrdervo)
        {
            hdnCustomerId.Value = lifeInsuranceOrdervo.CustomerId.ToString();
            LoadCustomerDetails(int.Parse(hdnCustomerId.Value));
            txtApplicationNo.Text           = lifeInsuranceOrdervo.ApplicationNumber;
            txtApplicationDate.SelectedDate = lifeInsuranceOrdervo.ApplicationReceivedDate;

            if (lifeInsuranceOrdervo.AssetCategory != null && lifeInsuranceOrdervo.AssetCategory != string.Empty)
            {
                ddlInstrumentCategory.SelectedValue = lifeInsuranceOrdervo.AssetCategory;
            }

            txtPaymentInstrNo.Text    = lifeInsuranceOrdervo.ChequeNumber;
            ddlBankName.SelectedValue = lifeInsuranceOrdervo.CustBankAccId.ToString();
            lblBranchName.Text        = lifeInsuranceOrdervo.BankBranchName;
            ddlEPPremiumFrequencyCode.SelectedValue = lifeInsuranceOrdervo.FrequencyCode;

            bindNomineeGridInViewMode();

            ddlPolicyIssuer.SelectedValue = lifeInsuranceOrdervo.InsuranceIssuerCode;
            if (lifeInsuranceOrdervo.InsuranceSchemeId != null)
            {
                ddlAssetPerticular.SelectedValue = lifeInsuranceOrdervo.InsuranceSchemeId.ToString();
            }
            lifeInsuranceOrdervo.SourceCode    = "AL";
            lifeInsuranceOrdervo.OrderStepCode = "AL";

            txtMaturityDate.SelectedDate      = lifeInsuranceOrdervo.MaturityDate;
            txtOrderDate.SelectedDate         = lifeInsuranceOrdervo.OrderDate;
            txtPaymentInstruDate.SelectedDate = lifeInsuranceOrdervo.PaymentDate;
            ddlPaymentMode.SelectedValue      = lifeInsuranceOrdervo.PaymentMode;
            lifeInsuranceOrdervo.SourceCode   = "ME";
            txtSumAssured.Text = lifeInsuranceOrdervo.SumAssured.ToString();
        }
コード例 #2
0
        public LifeInsuranceOrderVo GetLifeInsuranceOrderDetails(int orderId)
        {
            LifeInsuranceOrderVo lifeInsuranceOrderVo = new LifeInsuranceOrderVo();
            OrderDao             orderDao             = new OrderDao();

            try
            {
                lifeInsuranceOrderVo = orderDao.GetLifeInsuranceOrderDetails(orderId);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "OrderBo.cs:GetLifeInsuranceOrderDetails()");

                object[] objects = new object[1];
                objects[0] = orderId;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(lifeInsuranceOrderVo);
        }
コード例 #3
0
        public bool UpdateLifeInsuranceOrder(LifeInsuranceOrderVo lifeInsuranceOrdervo, string nomineeAssociationIds)
        {
            bool     bResult  = false;
            OrderDao orderDao = new OrderDao();

            try
            {
                bResult = orderDao.UpdateLifeInsuranceOrder(lifeInsuranceOrdervo, nomineeAssociationIds);
            }
            catch (BaseApplicationException Ex)
            {
                throw Ex;
            }
            catch (Exception Ex)
            {
                BaseApplicationException exBase       = new BaseApplicationException(Ex.Message, Ex);
                NameValueCollection      FunctionInfo = new NameValueCollection();

                FunctionInfo.Add("Method", "orderBo.cs:AddLifeInsuranceOrder()");

                object[] objects = new object[1];
                objects[0] = lifeInsuranceOrdervo;

                FunctionInfo = exBase.AddObject(FunctionInfo, objects);
                exBase.AdditionalInformation = FunctionInfo;
                ExceptionManager.Publish(exBase);
                throw exBase;
            }
            return(bResult);
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            SessionBo.CheckSession();
            path = Server.MapPath(ConfigurationManager.AppSettings["xmllookuppath"].ToString());

            userVo = (UserVo)Session["userVo"];

            if (!string.IsNullOrEmpty(Session["advisorVo"].ToString()))
            {
                advisorVo = (AdvisorVo)Session["advisorVo"];
            }

            rmVo = (RMVo)Session[SessionContents.RmVo];
            int bmID = rmVo.RMId;

            if (!string.IsNullOrEmpty(Session[SessionContents.RmVo].ToString()))
            {
                rmVo = (RMVo)Session[SessionContents.RmVo];
            }

            if (!IsPostBack)
            {
                pnlOrderSteps.Visible = false;
                btnUpdate.Visible     = false;
                lnkBtnEdit.Visible    = false;
                lnkBack.Visible       = false;
                lnkbtnDelete.Visible  = false;
                SetControls(true);

                if (Session[SessionContents.CurrentUserRole].ToString() == "Admin" || Session[SessionContents.CurrentUserRole].ToString().ToLower() == "ops")
                {
                    txtCustomerName_autoCompleteExtender.ContextKey    = advisorVo.advisorId.ToString();
                    txtCustomerName_autoCompleteExtender.ServiceMethod = "GetAdviserCustomerName";
                    AutoCompleteExtender2.ContextKey    = advisorVo.advisorId.ToString();
                    AutoCompleteExtender2.ServiceMethod = "GetAgentCodeAssociateDetails";
                }
                else if (Session[SessionContents.CurrentUserRole].ToString() == "BM")
                {
                    txtCustomerName_autoCompleteExtender.ContextKey    = rmVo.RMId.ToString();
                    txtCustomerName_autoCompleteExtender.ServiceMethod = "GetBMIndividualCustomerNames";
                }
                else if (Session[SessionContents.CurrentUserRole].ToString() == "RM")
                {
                    txtCustomerName_autoCompleteExtender.ContextKey    = rmVo.RMId.ToString();
                    txtCustomerName_autoCompleteExtender.ServiceMethod = "GetMemberCustomerName";
                }
                else if (Session[SessionContents.CurrentUserRole].ToString() == "Associates")
                {
                    associateuserheirarchyVo = (AssociatesUserHeirarchyVo)Session[SessionContents.AssociatesLogin_AssociatesHierarchy];
                    txtCustomerName_autoCompleteExtender.ContextKey    = advisorVo.advisorId.ToString();
                    txtCustomerName_autoCompleteExtender.ServiceMethod = "GetAdviserCustomerName";
                    txtAssociateSearch.Text = associateuserheirarchyVo.AgentCode;
                    GetAgentName(associateuserheirarchyVo.AdviserAgentId);
                    txtAgentId.Value = associateuserheirarchyVo.AdviserAgentId.ToString();
                    AutoCompleteExtender2.ContextKey    = associateuserheirarchyVo.AgentCode + "/" + advisorVo.advisorId.ToString() + "/" + associateuserheirarchyVo.IsBranchOps;
                    AutoCompleteExtender2.ServiceMethod = "GetAgentCodeAssociateDetailsForAssociates";
                }
                if (!string.IsNullOrEmpty(Request.QueryString["strOrderId"]))
                {
                    customerId = Convert.ToInt32(Request.QueryString["strCustomerId"]);
                    orderId    = Convert.ToInt32(Request.QueryString["strOrderId"]);
                    string action = Request.QueryString["strAction"].Trim();

                    lifeInsuranceOrdervo = orderbo.GetLifeInsuranceOrderDetails(orderId);

                    customerVo           = customerBo.GetCustomer(customerId);
                    hdnCustomerId.Value  = customerVo.CustomerId.ToString();
                    txtCustomerName.Text = customerVo.FirstName + customerVo.MiddleName + customerVo.LastName;
                    lblGetBranch.Text    = customerVo.BranchName;
                    lblGetRM.Text        = customerVo.RMName;
                    lblgetPan.Text       = customerVo.PANNum;

                    if (action == "Edit")
                    {
                        SetControls(true);
                        btnUpdate.Enabled    = true;
                        btnUpdate.Visible    = true;
                        btnSubmit.Visible    = false;
                        lnkBtnEdit.Visible   = false;
                        lnkbtnDelete.Visible = true;
                    }
                    else if (action == "View")
                    {
                        SetControls(false);
                        lnkBtnEdit.Visible   = true;
                        lnkBack.Visible      = true;
                        lnkbtnDelete.Visible = true;
                        btnUpdate.Enabled    = false;
                        btnSubmit.Visible    = false;
                    }
                    pnlOrderSteps.Visible = true;
                    SetValuesToControls(lifeInsuranceOrdervo);
                }
                BindAssetParticular();
                BindFrequencyDropdown();
                BindPaymentMode();
                BindOrderStepsGrid();
            }
        }
コード例 #5
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            bool   bresult = false;
            string nomineeAssociationIds = "";

            lifeInsuranceOrdervo = new LifeInsuranceOrderVo();
            //if (!string.IsNullOrEmpty(hdnCustomerId.Value))
            if (!string.IsNullOrEmpty(Request.QueryString["strOrderId"]))
            {
                lifeInsuranceOrdervo.OrderId = Convert.ToInt32(Request.QueryString["strOrderId"]);
            }
            lifeInsuranceOrdervo.CustomerId        = int.Parse(hdnCustomerId.Value);
            lifeInsuranceOrdervo.ApplicationNumber = txtApplicationNo.Text;
            if (txtApplicationDate.SelectedDate != null)
            {
                lifeInsuranceOrdervo.ApplicationReceivedDate = txtApplicationDate.SelectedDate.Value;
            }

            lifeInsuranceOrdervo.AssetGroup = "IN";
            if (ddlInstrumentCategory.SelectedValue != null && ddlInstrumentCategory.SelectedValue != string.Empty)
            {
                lifeInsuranceOrdervo.AssetCategory = ddlInstrumentCategory.SelectedValue;
            }

            lifeInsuranceOrdervo.ChequeNumber  = txtPaymentInstrNo.Text;
            lifeInsuranceOrdervo.CustBankAccId = int.Parse(ddlBankName.SelectedValue);
            lifeInsuranceOrdervo.FrequencyCode = ddlEPPremiumFrequencyCode.SelectedValue;
            lifeInsuranceOrdervo.GIIssuerCode  = "0";

            lifeInsuranceOrdervo.InsuranceIssuerCode = ddlPolicyIssuer.SelectedValue;
            if (ddlAssetPerticular.SelectedValue != null && ddlAssetPerticular.SelectedValue != string.Empty)
            {
                lifeInsuranceOrdervo.InsuranceSchemeId = Convert.ToInt32(ddlAssetPerticular.SelectedValue);
            }
            lifeInsuranceOrdervo.SourceCode    = "AL";
            lifeInsuranceOrdervo.OrderStepCode = "AL";

            lifeInsuranceOrdervo.ApprovedBy = int.Parse(hdnCustomerId.Value);
            if (txtMaturityDate.SelectedDate != null)
            {
                lifeInsuranceOrdervo.MaturityDate = txtMaturityDate.SelectedDate.Value;
            }
            if (txtOrderDate.SelectedDate != null)
            {
                lifeInsuranceOrdervo.OrderDate = txtOrderDate.SelectedDate.Value;
            }
            if (txtPaymentInstruDate.SelectedDate != null)
            {
                lifeInsuranceOrdervo.PaymentDate = txtPaymentInstruDate.SelectedDate.Value;
            }
            lifeInsuranceOrdervo.PaymentMode = ddlPaymentMode.SelectedValue;
            lifeInsuranceOrdervo.SourceCode  = "ME";
            lifeInsuranceOrdervo.SumAssured  = double.Parse(txtSumAssured.Text);

            if (this.gvPickNominee.Rows.Count > 0)
            {
                foreach (GridViewRow gvr in this.gvPickNominee.Rows)
                {
                    if (((CheckBox)gvr.FindControl("PNCheckBox")).Checked == true)
                    {
                        nomineeAssociationIds += gvPickNominee.DataKeys[gvr.RowIndex].Value + "~";
                    }
                }
            }

            bresult = orderbo.UpdateLifeInsuranceOrder(lifeInsuranceOrdervo, nomineeAssociationIds);
            if (bresult == true)
            {
                pnlOrderSteps.Visible = true;
                BindOrderStepsGrid();
            }
            else
            {
                pnlOrderSteps.Visible = false;
            }
        }
コード例 #6
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtAgentId.Value.ToString().Trim()))
            {
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "Message", "alert('Please select Agent Name.');", true);
                btnSubmit.Enabled = true;

                return;
            }
            bool   bresult = false;
            string nomineeAssociationIds = "";

            lifeInsuranceOrdervo = new LifeInsuranceOrderVo();

            if (hdnCustomerId.Value != null && hdnCustomerId.Value != "")
            {
                lifeInsuranceOrdervo.CustomerId = int.Parse(hdnCustomerId.Value);
            }
            lifeInsuranceOrdervo.ApplicationNumber = txtApplicationNo.Text;
            if (txtApplicationDate.SelectedDate != null)
            {
                lifeInsuranceOrdervo.ApplicationReceivedDate = txtApplicationDate.SelectedDate.Value;
            }

            lifeInsuranceOrdervo.AssetGroup = ddlProductType.SelectedValue;
            if (ddlInstrumentCategory.SelectedValue != null && ddlInstrumentCategory.SelectedValue != string.Empty)
            {
                lifeInsuranceOrdervo.AssetCategory = ddlInstrumentCategory.SelectedValue;
            }

            lifeInsuranceOrdervo.ChequeNumber  = txtPaymentInstrNo.Text;
            lifeInsuranceOrdervo.CustBankAccId = int.Parse(ddlBankName.SelectedValue);
            lifeInsuranceOrdervo.FrequencyCode = ddlEPPremiumFrequencyCode.SelectedValue;
            lifeInsuranceOrdervo.GIIssuerCode  = "0";

            lifeInsuranceOrdervo.IsJointlyHeld       = 0;
            lifeInsuranceOrdervo.InsuranceIssuerCode = ddlPolicyIssuer.SelectedValue;
            if (ddlAssetPerticular.SelectedValue != null && ddlAssetPerticular.SelectedValue != "Select")
            {
                lifeInsuranceOrdervo.InsuranceSchemeId = Convert.ToInt32(ddlAssetPerticular.SelectedValue);
            }
            lifeInsuranceOrdervo.SourceCode    = "AL";
            lifeInsuranceOrdervo.OrderStepCode = "AL";

            if (hdnCustomerId.Value != null && hdnCustomerId.Value != "")
            {
                lifeInsuranceOrdervo.ApprovedBy = int.Parse(hdnCustomerId.Value);
            }

            if (txtMaturityDate.SelectedDate != null)
            {
                lifeInsuranceOrdervo.MaturityDate = txtMaturityDate.SelectedDate.Value;
            }
            if (txtOrderDate.SelectedDate != null)
            {
                lifeInsuranceOrdervo.OrderDate = txtOrderDate.SelectedDate.Value;
            }

            if (txtPaymentInstruDate.SelectedDate != null)
            {
                lifeInsuranceOrdervo.PaymentDate = txtPaymentInstruDate.SelectedDate.Value;
            }
            lifeInsuranceOrdervo.PaymentMode = ddlPaymentMode.SelectedValue;
            lifeInsuranceOrdervo.SourceCode  = "ME";
            lifeInsuranceOrdervo.SumAssured  = double.Parse(txtSumAssured.Text);
            lifeInsuranceOrdervo.AgentCode   = txtAssociateSearch.Text;
            lifeInsuranceOrdervo.AgentId     = int.Parse(txtAgentId.Value);

            if (this.gvPickNominee.Rows.Count > 0)
            {
                foreach (GridViewRow gvr in this.gvPickNominee.Rows)
                {
                    if (((CheckBox)gvr.FindControl("PNCheckBox")).Checked == true)
                    {
                        nomineeAssociationIds += gvPickNominee.DataKeys[gvr.RowIndex].Value + "~";
                        //gvPickNominee.DataKeys[gvr.RowIndex].Values[1].ToString() + "~";
                    }
                }
            }

            bresult = orderbo.AddLifeInsuranceOrder(lifeInsuranceOrdervo, nomineeAssociationIds, out orderId, userVo.UserId);
            if (bresult == true)
            {
                //ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "GoalFundPage", "loadcontrol('OrderMIS','?result=" + result + "');", true);
                pnlOrderSteps.Visible = true;
                rgvOrderSteps.Visible = true;
                SetEnableDisableControls("Edit");
                btnSubmit.Visible = false;
                ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "Message", "alert('Your order added successfully.');", true);
                BindOrderStepsGrid();
            }
            else
            {
                pnlOrderSteps.Visible = false;
            }
        }