Пример #1
0
 private void Initialization()
 {
     DDListUtil.LoadDDLFromDB(ddlSpType, "SPTypeID", "TypeDesc", "SPMS_SPType", true);
     //txtDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT);
     DDListUtil.LoadDDLFromXML(ddlAccountNo, "JournalAccount", "Type", "JournalAccount", false);
     //DDListUtil.LoadDDLFromXML(ddlJournalStatus, "JournalStatus", "Type", "JournalStatus", false);
     lblAccName.Text = "Softcell Solution Ltd ";
     this.RBLChangeColor(rdlType);
     this.ChkChangeColor(chkAscending);
 }
Пример #2
0
        private void InitializeData()
        {
            //hdRegNo.Value = "";
            string sRegNo  = Request.QueryString[OBJ_REG_NO];
            string sPageID = Request.QueryString[OBJ_PAGE_ID];

            //Temporary table creation
            this.InitializeBuffTable();

            //Controls initialize
            DDListUtil.LoadDDLFromDB(ddlSPType, "SPTypeID", "TypeDesc", "SPMS_SPType", true);
            DDListUtil.LoadDDLFromDB(ddlMaker, "UserName", "UserName", "SA_User", false);
            DDListUtil.LoadDDLFromXML(ddlAccountNo, "JournalAccount", "Type", "JournalAccount", false);
            DDListUtil.LoadDDLFromDB(ddlCurrency, "CurrencyID", "CurrencyCode", "SPMS_Currency", true);

            txtTransDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT);

            if (true)
            {
                //sRegNo = oCrypManager.GetDecryptedString(sRegNo, Constants.CRYPT_PASSWORD_STRING);
                //sPageID = oCrypManager.GetDecryptedString(sPageID, Constants.CRYPT_PASSWORD_STRING);

                Config oConfig = (Config)Session[Constants.SES_USER_CONFIG];

                LoadUnapprovedAccRecon(oConfig.UserName, oConfig.DivisionID, oConfig.BankCodeID);

                #region User-Detail.
                UserDetails oUserDetails = new UserDetails();
                oUserDetails.MakerID  = oConfig.UserName;
                oUserDetails.MakeDate = DateTime.Now;
                ucUserDet.UserDetail  = oUserDetails;
                #endregion User-Detail.

                #region Enable-disable controls
                this.EnableDisableControls(false);
                #endregion Enable-disable controls
            }
            else
            {
                //Config oConfig = (Config)Session[Constants.SES_USER_CONFIG];
                //UserDetails oUserDetails = new UserDetails();
                //oUserDetails.MakerID = oConfig.UserName;
                //oUserDetails.MakeDate = DateTime.Now;
                //ucUserDet.UserDetail = oUserDetails;
                //EnableDisableControl
            }
        }
Пример #3
0
 private void InitializeData()
 {
     gvData.DataSource = null;
     gvData.DataBind();
     // Dropdown load SPType
     DDListUtil.LoadDDLFromDB(ddlSpType, "SPTypeID", "TypeDesc", "SPMS_SPType", true);
     DDListUtil.LoadDDLFromXML(ddlDuration, "DateDuration", "Type", "Duration", false);
     ddlDuration.Enabled    = false;
     txtStatementDate.Text  = DateTime.Now.ToString(Constants.DATETIME_FORMAT);
     txtDateFrom.ReadOnly   = true;
     txtTotalFaceValue.Text = "0.00";
     // year
     for (int i = 1995; i < DateTime.Now.Year + 1 + 1; i++)
     {
         DDListUtil.Add(ddlYear, i.ToString(), i.ToString());
     }
     DDListUtil.Assign(ddlYear, DateTime.Now.Year);
 }
Пример #4
0
        private void InitializeData()
        {
            gvData.DataSource = null;
            gvData.DataBind();
            // Dropdown load SPType
            DDListUtil.LoadDDLFromDB(ddlSpType, "SPTypeID", "TypeDesc", "SPMS_SPType", true);
            DDListUtil.LoadDDLFromXML(ddlDuration, "DateDuration", "Type", "Duration", false);
            ddlDuration.Enabled   = false;
            txtStatementDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT);
            // year
            for (int i = 1995; i < DateTime.Now.Year + 1 + 1; i++)
            {
                DDListUtil.Add(ddlYear, i.ToString(), i.ToString());
            }
            txtDateFrom.ReadOnly = true;
            DDListUtil.Assign(ddlYear, DateTime.Now.Year);

            ClaimDAL claimDAL = new ClaimDAL();

            //Store BASE_CURRENCY
            ViewState[_BASE_CUREENCY] = claimDAL.GetBaseCurrencyID();
        }
Пример #5
0
        private void Initialization()
        {
            DDListUtil.LoadDDLFromDB(ddlSpType, "SPTypeID", "TypeDesc", "SPMS_SPType", true);
            txtDate.Text = DateTime.Now.ToString(Constants.DATETIME_FORMAT);
            DDListUtil.LoadDDLFromXML(ddlAccNumbe, "JournalAccount", "Type", "JournalAccount", false);
            DDListUtil.LoadDDLFromXML(ddlJournalStatus, "JournalStatus", "Type", "JournalStatus", false);
            lblAccName.Text = "Softcell Solution Ltd ";


            foreach (ListItem lstItem in rdlType.Items)
            {
                if (lstItem.Selected == true)
                {
                    lstItem.Attributes["style"]   = "color:#EE8927; forecolor:black; font-weight:bold";
                    lstItem.Attributes["onclick"] = string.Format("RbChangeColor( this ), rdlInitSetUp(this) ");
                }
                else
                {
                    lstItem.Attributes["style"]   = "color:#000000; forecolor:black; font-weight:normal ";
                    lstItem.Attributes["onclick"] = string.Format("RbChangeColor( this ), rdlInitSetUp(this) ");
                }
            }
        }
Пример #6
0
        private void Initialization()
        {
            gvData.Attributes.Add("style", "word-break:break-all;word-wrap:break-word");
            Config oConfig = (Config)Session[Constants.SES_USER_CONFIG];

            hdLoginUserName.Value = oConfig.UserName;
            string sType = Request.QueryString["pType"];

            if (sType.Equals(Convert.ToString((int)Constants.PAGEINDEX_JOURNAL_RECON.JOURNAL_MANUAL).PadLeft(5, '0')))
            {
                lblRefNo.Visible        = false;
                ddlReferenceNum.Visible = false;
            }
            if (Session[Constants.SES_CONFIG_UNAPPROVE_DATA] == null)
            {
                Session.Add(Constants.SES_CONFIG_UNAPPROVE_DATA, new DataTable());
            }
            else
            {
                Session[Constants.SES_CONFIG_UNAPPROVE_DATA] = new DataTable();
            }
            DDListUtil.LoadDDLFromXML(ddlAccNumbe, "JournalAccount", "Type", "JournalAccount", false);
        }
Пример #7
0
    private void InitializeData()
    {
        // Dropdown load
        string sMonth = DateTime.Today.Month.ToString();

        DDListUtil.Assign(ddlFromMonth, sMonth);
        DDListUtil.Assign(ddlToMonth, sMonth);
        DDListUtil.LoadDDLFromDB(ddlBranchCode, "BranchID", "BBCode", "SPMS_Branch", true);
        DDListUtil.LoadDDLFromXML(ddlCountryName, "Country", "Type", "Country", true);
        DDListUtil.LoadDDLFromXML(ddlFromMonth, "Month", "Type", "Month", true);
        DDListUtil.LoadDDLFromXML(ddlToMonth, "Month", "Type", "Month", true);
        if (ddlCountryName.Items.Count > 0)
        {
            ddlCountryName.SelectedIndex = 1;
        }

        gvBankList.PageSize = (int)Constants.PAGING_UNAPPROVED;

        string sBankID = Request.QueryString[OBJ_BANK_ID];
        string sPageID = Request.QueryString[OBJ_PAGE_ID];

        if (!string.IsNullOrEmpty(sBankID))
        {
            sBankID = oCrypManager.GetDecryptedString(sBankID, Constants.CRYPT_PASSWORD_STRING);
        }
        if (!string.IsNullOrEmpty(sPageID))
        {
            sPageID = oCrypManager.GetDecryptedString(sPageID, Constants.CRYPT_PASSWORD_STRING);
        }
        Config oConfig = (Config)Session[Constants.SES_USER_CONFIG];

        if (!string.IsNullOrEmpty(sBankID) && !string.IsNullOrEmpty(sPageID))
        {
            string sOperationType = sPageID.Substring(4, 1);
            if (Constants.OPERATION_TYPE_APPROVAL.Equals(sOperationType))
            {
                LoadDataByID(sBankID);

                // general Control
                Util.ControlEnabled(txtBankID, false);
                Util.ControlEnabled(txtAddress, false);
                Util.ControlEnabled(txtDivisionName, false);
                Util.ControlEnabled(txtBdBankCode, false);
                Util.ControlEnabled(txtZipCode, false);
                Util.ControlEnabled(ddlCountryName, false);
                Util.ControlEnabled(txtPhoneNumber, false);
                Util.ControlEnabled(txtEmailID, false);
                Util.ControlEnabled(txtFaxNumber, false);
                Util.ControlEnabled(txtAddress, false);

                Util.ControlEnabled(txtSWIFTBIC, false);
                Util.ControlEnabled(ddlFromMonth, false);
                Util.ControlEnabled(ddlToMonth, false);
                Util.ControlEnabled(ddlBranchCode, false);


                // user Detail
                Util.ControlEnabled(ucUserDet.FindControl("txtCheckerComments"), true);

                // button
                Util.ControlEnabled(btnReject, true);
                Util.ControlEnabled(btnApprove, true);
                Util.ControlEnabled(btnReset, false);
                Util.ControlEnabled(btnSave, false);
                Util.ControlEnabled(btnDelete, false);
                Util.ControlEnabled(btnLoad, false);
                Util.ControlEnabled(btnBack, true);
                Util.ControlEnabled(btnSearch, false);

                #region User-Detail.
                UserDetails oUserDetails = ucUserDet.UserDetail;
                oUserDetails.CheckerID = oConfig.UserName;
                oUserDetails.CheckDate = DateTime.Now;
                ucUserDet.UserDetail   = oUserDetails;
                #endregion User-Detail.

                fsList.Visible = false;
            }
        }
        else
        {
            // button
            Util.ControlEnabled(btnReject, false);
            Util.ControlEnabled(btnApprove, false);
            Util.ControlEnabled(btnReset, true);
            Util.ControlEnabled(btnSave, true);
            Util.ControlEnabled(btnDelete, true);
            Util.ControlEnabled(btnLoad, true);
            Util.ControlEnabled(btnBack, false);
            Util.ControlEnabled(btnSearch, true);
            Util.ControlEnabled(ucUserDet.FindControl("txtCheckerComments"), false);

            #region User-Detail
            UserDetails oUserDetails = new UserDetails();
            oUserDetails.MakerID  = oConfig.UserName;
            oUserDetails.MakeDate = DateTime.Now;
            ucUserDet.UserDetail  = oUserDetails;
            #endregion User-Detail.

            fsList.Visible = true;
            LoadList();
        }
    }
Пример #8
0
        public void SetPolicyDetails(SPPolicy oSPPolicy)
        {
            // Dropdown load SPType
            DDListUtil.LoadDDLFromDB(ddlSPType, "SPTypeID", "TypeDesc", "SPMS_SPType", true);
            DDListUtil.LoadDDLFromXML(ddlApplicableSex, "ApplicableSex", "Type", "Sex", true);

            // gvCustomerType load  6.	Eligibility
            UtilityDAL oUtilityDAL = new UtilityDAL();
            Result     oResult     = new Result();

            oResult = oUtilityDAL.GetDDLDataList("CustomerTypeID", "TypeDesc", "SPMS_CustomerType", true);
            if (oResult.Status)
            {
                DataTable dtGetAll = (DataTable)oResult.Return;
                gvCustomerType.DataSource = dtGetAll;
                gvCustomerType.DataBind();
                gvCustomerType.Enabled = false;

                GridViewRowCollection growArr = (GridViewRowCollection)gvCustomerType.Rows;
                foreach (GridViewRow row in growArr)
                {
                    row.Cells[1].Visible = false;
                }
            }
            else
            {
                gvCustomerType.DataSource = false;
                gvCustomerType.DataBind();
            }


            // common
            DDListUtil.Assign(ddlSPType, oSPPolicy.SPType.SPTypeID);
            ddlSPType.Enabled        = false;
            txtEffectiveDate.Text    = oSPPolicy.PolicyEffectDate.ToString(Constants.DATETIME_FORMAT);
            txtEffectiveDate.Enabled = false;


            // 1.0 General
            Util.SetRadioData(rblIsSPDurationInMonth, oSPPolicy.IsSPDurationInMonth);
            rblIsSPDurationInMonth.Enabled = false;
            Util.RBLChangeSetColor(rblIsSPDurationInMonth);
            rblIsSPDurationInMonth.Enabled = false;
            txtDuration.Text      = oSPPolicy.SPDuration.ToString();
            txtDuration.Enabled   = false;
            txtNoOfCoupon.Text    = oSPPolicy.NoOfCoupons.ToString();
            txtNoOfCoupon.Enabled = false;

            DDListUtil.Assign(ddlIntrType, oSPPolicy.SPInterestType);
            ddlIntrType.Enabled = false;
            Util.SetRadioData(rblInterestTypeAfterIntPayment, oSPPolicy.InterestTypeAfterIntPayment);
            Util.RBLChangeSetColor(rblInterestTypeAfterIntPayment);
            rblInterestTypeAfterIntPayment.Enabled = false;
            DDListUtil.Assign(ddlPreMatIntrType, oSPPolicy.PreMaturityInterestType);
            ddlPreMatIntrType.Enabled = false;
            Util.SetRadioData(rblGSPreMatIntrClaim, oSPPolicy.PreMatIntTypeAfterIntPayment);
            rblGSPreMatIntrClaim.Enabled = false;
            Util.RBLChangeSetColor(rblGSPreMatIntrClaim);

            Util.SetRadioData(rblIsBondHolderRequired, oSPPolicy.IsBondHolderRequired);
            Util.RBLChangeSetColor(rblIsBondHolderRequired);
            rblIsBondHolderRequired.Enabled = false;
            Util.SetRadioData(rblIsNomineePerScripRequired, oSPPolicy.IsNomineePerScripRequired);
            Util.RBLChangeSetColor(rblIsNomineePerScripRequired);
            rblIsNomineePerScripRequired.Enabled = false;

            Util.SetRadioData(rblIsFoeignAddressRequired, oSPPolicy.IsFoeignAddressRequired);
            Util.RBLChangeSetColor(rblIsFoeignAddressRequired);
            rblIsFoeignAddressRequired.Enabled = false;

            Util.SetRadioData(rblReinvestmentSuported, oSPPolicy.ReinvestmentSuported);
            Util.RBLChangeSetColor(rblReinvestmentSuported);
            rblReinvestmentSuported.Enabled = false;
            Util.SetRadioData(rblInterestReinvestable, oSPPolicy.InterestReinvestable);
            Util.RBLChangeSetColor(rblInterestReinvestable);
            rblInterestReinvestable.Enabled = false;
            txtReinNumber.Text    = oSPPolicy.MaxNoOfReinvestment.ToString();
            txtReinNumber.Enabled = false;
            Util.SetRadioData(rblPartiallyEncashable, oSPPolicy.PartiallyEncashable);
            Util.RBLChangeSetColor(rblPartiallyEncashable);
            rblPartiallyEncashable.Enabled = false;
            Util.SetRadioData(rblPartiallyEncashedReinvestable, oSPPolicy.PartiallyEncashedReinvestable);
            Util.RBLChangeSetColor(rblPartiallyEncashedReinvestable);
            rblPartiallyEncashedReinvestable.Enabled = false;

            // 2.0 Currency Setup
            DataTable oDtCurr = new DataTable("dtDataCurrency");

            oDtCurr.Columns.Add(new DataColumn("bfActivityType", typeof(string)));
            oDtCurr.Columns.Add(new DataColumn("bfCurrency", typeof(string)));
            DataRow rowCurr = null;

            for (int i = 0; i < oSPPolicy.CurrencyActivityPolicy.Count; i++)
            {
                rowCurr = oDtCurr.NewRow();
                rowCurr["bfActivityType"] = oSPPolicy.CurrencyActivityPolicy[i].ActivityTypeID + " : " + oSPPolicy.CurrencyActivityPolicy[i].ActivityTypeValue;
                rowCurr["bfCurrency"]     = oSPPolicy.CurrencyActivityPolicy[i].Currency.CurrencyID + " : " + oSPPolicy.CurrencyActivityPolicy[i].Currency.CurrencyCode;

                oDtCurr.Rows.Add(rowCurr);
            }
            gvActiCurrency.DataSource = oDtCurr;
            gvActiCurrency.DataBind();
            gvActiCurrency.Enabled = false;

            // 3.0 Early Encashment Setup
            txtEarlyEncashCouponNo.Text    = oSPPolicy.NoOfCoupons.ToString();
            txtEarlyEncashCouponNo.Enabled = false;
            txtCommonIntRate.Enabled       = false;
            chkMaturedCoupon.Enabled       = false;
            DataTable oDtEE = new DataTable("dtDataEE");

            oDtEE.Columns.Add(new DataColumn("bfCouponInstallmentNo", typeof(string)));
            oDtEE.Columns.Add(new DataColumn("bfMonthFrom", typeof(string)));
            oDtEE.Columns.Add(new DataColumn("bfMonthTo", typeof(string)));
            oDtEE.Columns.Add(new DataColumn("bfInterestRate", typeof(string)));
            oDtEE.Columns.Add(new DataColumn("bfNoOfSlabsIntPayable", typeof(string)));

            DataRow rowEE = null;

            for (int i = 0; i < oSPPolicy.EarlyEncashmentPolicy.Count; i++)
            {
                rowEE = oDtEE.NewRow();
                rowEE["bfCouponInstallmentNo"] = oSPPolicy.EarlyEncashmentPolicy[i].SlabNo.ToString();
                rowEE["bfMonthFrom"]           = oSPPolicy.EarlyEncashmentPolicy[i].MonthFrom.ToString();
                rowEE["bfMonthTo"]             = oSPPolicy.EarlyEncashmentPolicy[i].MonthTo.ToString();
                rowEE["bfInterestRate"]        = oSPPolicy.EarlyEncashmentPolicy[i].InterestRate.ToString();
                rowEE["bfNoOfSlabsIntPayable"] = oSPPolicy.EarlyEncashmentPolicy[i].NoOfSlabsIntPayable.ToString();

                oDtEE.Rows.Add(rowEE);
            }
            gvEncashmentIntRate.DataSource = oDtEE;
            gvEncashmentIntRate.DataBind();
            gvEncashmentIntRate.Enabled = false;

            // 4.0 General Interest Setup
            txtGeneralIntCouponNo.Text    = oSPPolicy.NoOfCoupons.ToString();
            txtGeneralIntCouponNo.Enabled = false;
            txtGIClaimRate.Enabled        = false;
            txtNonclaimIntRate.Enabled    = false;

            DataTable oDtGI = new DataTable("dtDataG");

            oDtGI.Columns.Add(new DataColumn("bfCouponInstallmentNo", typeof(string)));
            oDtGI.Columns.Add(new DataColumn("bfMonthFrom", typeof(string)));
            oDtGI.Columns.Add(new DataColumn("bfMonthTo", typeof(string)));
            oDtGI.Columns.Add(new DataColumn("bfClaimRate", typeof(string)));
            oDtGI.Columns.Add(new DataColumn("bfNonclaimIntRate", typeof(string)));

            DataRow rowGI = null;

            for (int i = 0; i < oSPPolicy.GeneralInterestPolicy.Count; i++)
            {
                rowGI = oDtGI.NewRow();
                rowGI["bfCouponInstallmentNo"] = oSPPolicy.GeneralInterestPolicy[i].SlabNo.ToString();
                rowGI["bfMonthFrom"]           = oSPPolicy.GeneralInterestPolicy[i].MonthFrom.ToString();
                rowGI["bfMonthTo"]             = oSPPolicy.GeneralInterestPolicy[i].MonthTo.ToString();
                rowGI["bfClaimRate"]           = oSPPolicy.GeneralInterestPolicy[i].ClaimRate.ToString();
                rowGI["bfNonclaimIntRate"]     = oSPPolicy.GeneralInterestPolicy[i].NonClaimRate.ToString();

                oDtGI.Rows.Add(rowGI);
            }
            gvGeneralInt.DataSource = oDtGI;
            gvGeneralInt.DataBind();
            gvGeneralInt.Enabled = false;

            // 5.0  Commission Setup
            txtComSetNonOrgComm.Text    = oSPPolicy.NonOrgCommission.ToString();
            txtComSetNonOrgComm.Enabled = false;
            Util.SetRadioData(rblComSetNonOrgChargeOnPer, oSPPolicy.NonOrgCommissionType.Substring(0, oSPPolicy.NonOrgCommissionType.Length > 1 ? 1 : 0));
            Util.RBLChangeSetColor(rblComSetNonOrgChargeOnPer);
            rblComSetNonOrgChargeOnPer.Enabled = false;
            Util.SetRadioData(rblComSetNonOrgCalculateInt, oSPPolicy.NonOrgCommissionType.Substring(oSPPolicy.NonOrgCommissionType.Length > 1 ? 1 : 0, oSPPolicy.NonOrgCommissionType.Length > 1 ? 1 : 0));
            Util.RBLChangeSetColor(rblComSetNonOrgCalculateInt);
            rblComSetNonOrgCalculateInt.Enabled = false;
            txtComSetOrgCommission.Text         = oSPPolicy.OrgCommission.ToString();
            txtComSetOrgCommission.Enabled      = false;
            Util.SetRadioData(rblComSetOrgChargeOnPer, oSPPolicy.OrgCommissionType.Substring(0, oSPPolicy.OrgCommissionType.Length > 1 ? 1 : 0));
            Util.RBLChangeSetColor(rblComSetOrgChargeOnPer);
            rblComSetOrgChargeOnPer.Enabled = false;
            Util.SetRadioData(rblComSetOrgCalculateInt, oSPPolicy.OrgCommissionType.Substring(oSPPolicy.OrgCommissionType.Length > 1 ? 1 : 0, oSPPolicy.OrgCommissionType.Length > 1 ? 1 : 0));
            Util.RBLChangeSetColor(rblComSetOrgCalculateInt);
            rblComSetOrgCalculateInt.Enabled = false;
            txtComSetIntRemuneration.Text    = oSPPolicy.InterestRemuneration.ToString();
            txtComSetIntRemuneration.Enabled = false;
            Util.SetRadioData(rblComSetIntRemuChargeOnPer, oSPPolicy.InterestRemunerationType.Substring(0, oSPPolicy.InterestRemunerationType.Length > 1 ? 1 : 0));
            Util.RBLChangeSetColor(rblComSetIntRemuChargeOnPer);
            rblComSetIntRemuChargeOnPer.Enabled = false;
            Util.SetRadioData(rblComSetIntRemuCalculateInt, oSPPolicy.InterestRemunerationType.Substring(oSPPolicy.InterestRemunerationType.Length > 1 ? 1 : 0, oSPPolicy.InterestRemunerationType.Length > 1 ? 1 : 0));
            Util.RBLChangeSetColor(rblComSetIntRemuCalculateInt);
            rblComSetIntRemuCalculateInt.Enabled = false;
            txtComSetRemuneration.Text           = oSPPolicy.Remuneration.ToString();
            txtComSetRemuneration.Enabled        = false;
            Util.SetRadioData(rblComSetRemuChargeOnPer, oSPPolicy.RemunerationType.Substring(0, oSPPolicy.RemunerationType.Length > 1 ? 1 : 0));
            Util.RBLChangeSetColor(rblComSetRemuChargeOnPer);
            rblComSetRemuChargeOnPer.Enabled = false;
            Util.SetRadioData(rblComSetRemuCalculateInt, oSPPolicy.RemunerationType.Substring(oSPPolicy.RemunerationType.Length > 1 ? 1 : 0, oSPPolicy.RemunerationType.Length > 1 ? 1 : 0));
            Util.RBLChangeSetColor(rblComSetRemuCalculateInt);
            rblComSetRemuCalculateInt.Enabled = false;
            txtComSetLevi.Text    = oSPPolicy.Levi.ToString();
            txtComSetLevi.Enabled = false;
            Util.SetRadioData(rblComSetLevi, oSPPolicy.LeviType);
            Util.RBLChangeSetColor(rblComSetLevi);
            rblComSetLevi.Enabled      = false;
            txtComSetIncomeTax.Text    = oSPPolicy.IncomeTax.ToString();
            txtComSetIncomeTax.Enabled = false;
            Util.SetRadioData(rblComSetIncomeTax, oSPPolicy.IncomeTaxType.ToString());
            Util.RBLChangeSetColor(rblComSetIncomeTax);
            rblComSetIncomeTax.Enabled      = false;
            txtComSetIncomeTaxAbove.Text    = oSPPolicy.IncomeTaxApplyAmount.ToString();
            txtComSetIncomeTaxAbove.Enabled = false;
            Util.SetCheckData(chkYearly, oSPPolicy.IncomeTaxYearlyYN);
            Util.ChkChangeSetColor(chkYearly);
            chkYearly.Enabled               = false;
            txtSocialSecurityAmount.Text    = oSPPolicy.SocialSecurityAmount.ToString();
            txtSocialSecurityAmount.Enabled = false;
            Util.SetRadioData(rblSocialSecurityAmount, oSPPolicy.SocialSecurityAmountType.ToString());
            Util.RBLChangeSetColor(rblSocialSecurityAmount);
            rblSocialSecurityAmount.Enabled = false;

            // 6.0  Eligibility
            ArrayList alCTPID = new ArrayList();

            if (oSPPolicy.CustomerTypePolicy.Count > 0)
            {
                int i = 0;
                foreach (CustomerTypePolicy oCTP in oSPPolicy.CustomerTypePolicy)
                {
                    alCTPID.Insert(i, oCTP.CustomerType.CustomerTypeID);
                    i++;
                }
            }

            GridViewRowCollection gvRows = (GridViewRowCollection)gvCustomerType.Rows;

            foreach (GridViewRow row in gvRows)
            {
                CheckBox oCheckBox = (CheckBox)row.FindControl("chkCusomerType");

                if (alCTPID.Contains(row.Cells[1].Text))
                {
                    oCheckBox.Checked = true;
                }
                else
                {
                    oCheckBox.Checked = false;
                }
            }

            // Eligibility grid..
            DataTable oDtEli = new DataTable("dtDataEli");

            oDtEli.Columns.Add(new DataColumn("bfCustActiType", typeof(string)));
            oDtEli.Columns.Add(new DataColumn("bfPayModeType", typeof(string)));
            DataRow rowEli = null;

            for (int i = 0; i < oSPPolicy.PaymentPolicy.Count; i++)
            {
                rowEli = oDtEli.NewRow();
                rowEli["bfCustActiType"] = oSPPolicy.PaymentPolicy[i].ActivityTypeID + " : " + oSPPolicy.PaymentPolicy[i].ActivityTypeValue;
                rowEli["bfPayModeType"]  = oSPPolicy.PaymentPolicy[i].PaymentModeID + " : " + oSPPolicy.PaymentPolicy[i].PaymentModeValue;

                oDtEli.Rows.Add(rowEli);
            }
            gvEliPaymentPolicy.DataSource = oDtEli;
            gvEliPaymentPolicy.DataBind();
            gvEliPaymentPolicy.Enabled = false;

            // end of Eligibility grid..
            DDListUtil.Assign(ddlApplicableSex, oSPPolicy.SupportedSex);
            ddlApplicableSex.Enabled = false;
            txtMinimumAge.Text       = oSPPolicy.MinimumAge.ToString();
            txtMinimumAge.Enabled    = false;
            txtMaximumAge.Text       = oSPPolicy.MaximumAge.ToString();
            txtMaximumAge.Enabled    = false;
        }
Пример #9
0
    private void InitializeData()
    {
        // Dropdown load SPType
        DDListUtil.LoadDDLFromDB(ddlSPType, "SPTypeID", "TypeDesc", "SPMS_SPType", true);
        DDListUtil.LoadDDLFromXML(ddlScriptFormat, "ScriptFormatMapping", "ReportType", "SP", true);
        gvList.PageSize = (int)Constants.PAGING_UNAPPROVED;

        SPTypeDAL oSPTypeDAL = new SPTypeDAL();

        SetDenominationBySPTypeID(oSPTypeDAL);

        string sPTypeID = Request.QueryString[OBJ_SPTYPE_ID];
        string sDenomID = Request.QueryString[OBJ_DENOM_ID];
        string sPageID  = Request.QueryString[OBJ_PAGE_ID];

        if (!string.IsNullOrEmpty(sPTypeID))
        {
            sPTypeID = oCrypManager.GetDecryptedString(sPTypeID, Constants.CRYPT_PASSWORD_STRING);
        }
        if (!string.IsNullOrEmpty(sDenomID))
        {
            sDenomID = oCrypManager.GetDecryptedString(sDenomID, Constants.CRYPT_PASSWORD_STRING);
        }
        if (!string.IsNullOrEmpty(sPageID))
        {
            sPageID = oCrypManager.GetDecryptedString(sPageID, Constants.CRYPT_PASSWORD_STRING);
        }

        Config oConfig = (Config)Session[Constants.SES_USER_CONFIG];

        if (!string.IsNullOrEmpty(sPTypeID) && !string.IsNullOrEmpty(sDenomID) && !string.IsNullOrEmpty(sPageID))
        {
            string sOperationType = sPageID.Substring(4, 1);
            if (Constants.OPERATION_TYPE_APPROVAL.Equals(sOperationType))
            {
                LoadDataByID(sPTypeID, sDenomID);

                // general Control
                Util.ControlEnabled(ddlSPType, false);
                Util.ControlEnabled(ddlDenomination, false);
                Util.ControlEnabled(ddlScriptFormat, false);

                // user Detail
                Util.ControlEnabled(ucUserDet.FindControl("txtCheckerComments"), true);

                // button
                Util.ControlEnabled(btnReject, true);
                Util.ControlEnabled(btnApprove, true);
                Util.ControlEnabled(btnBack, true);

                Util.ControlEnabled(btnReset, false);
                Util.ControlEnabled(btnSave, false);
                Util.ControlEnabled(btnDelete, false);
                Util.ControlEnabled(btnSearch, false);

                #region User-Detail.
                UserDetails oUserDetails = ucUserDet.UserDetail;
                oUserDetails.CheckerID = oConfig.UserName;
                oUserDetails.CheckDate = DateTime.Now;
                ucUserDet.UserDetail   = oUserDetails;
                #endregion User-Detail.

                fsList.Visible = false;
            }
        }
        else
        {
            // button
            Util.ControlEnabled(btnReject, false);
            Util.ControlEnabled(btnApprove, false);
            Util.ControlEnabled(btnBack, false);

            Util.ControlEnabled(btnReset, true);
            Util.ControlEnabled(btnSave, true);
            Util.ControlEnabled(btnDelete, true);
            Util.ControlEnabled(btnSearch, true);
            Util.ControlEnabled(ucUserDet.FindControl("txtCheckerComments"), false);
            #region User-Detail.
            UserDetails oUserDetails = new UserDetails();
            oUserDetails.MakerID  = oConfig.UserName;
            oUserDetails.MakeDate = DateTime.Now;
            ucUserDet.UserDetail  = oUserDetails;
            #endregion User-Detail.

            fsList.Visible = true;
            LoadList();
        }
    }