protected void Page_Load(object sender, EventArgs e)
    {
        InvestmentDSTableAdapters.GetInvestmentAppTableAdapter invApp = new InvestmentDSTableAdapters.GetInvestmentAppTableAdapter();

        //int DecID = Convert.ToInt32(EncID);

        
        #region "QueryString Block"
            string EncID = Request.QueryString["id"];
            int DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
            MySessionManager.InvAppID = DecID;
            MySessionManager.ClientID = Convert.ToInt32(invApp.GetClientID(MySessionManager.InvAppID));
        #endregion
            try
            {
                mainDSTableAdapters.NotificationCountTableAdapter tblCounter = new mainDSTableAdapters.NotificationCountTableAdapter();
                mainDS.NotificationCountRow itemcount = tblCounter.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID, MySessionManager.CurrentUser.TeamID)[0];

                this.pendingRecInfo.InnerText = (Convert.ToInt32(itemcount.receipts.ToString())).ToString();
                this.pendingDisInfo.InnerText = (Convert.ToInt32(itemcount.disbursementI.ToString()) + Convert.ToInt32(itemcount.disbursementII.ToString()) + Convert.ToInt32(itemcount.disbursementIII.ToString())).ToString();
            }
            catch (Exception ex)
            {

            }
        if ((!(util.alert1() == "")) && (MySessionManager.skipAlert == 0))
        {
            this.pAlertmsg.InnerText = util.alert1();
            // Define the name and type of the client scripts on the page.
            String csname1 = "PopupScript";
            String csname2 = "ButtonClickScript";
            Type cstype = this.GetType();

            // Get a ClientScriptManager reference from the Page class.
            ClientScriptManager cs = Page.ClientScript;

            // Check to see if the startup script is already registered.
            if (!cs.IsStartupScriptRegistered(cstype, csname1))
            {
                String cstext1 = "alertMessage();";
                cs.RegisterStartupScript(cstype, csname1, cstext1, true);
            }
            MySessionManager.skipAlert = 1;
        }
        showLoanAppInfo();
    }
    public void setNotifications()
    {
        try
        {
            mainDSTableAdapters.NotificationCountTableAdapter tblCounter = new mainDSTableAdapters.NotificationCountTableAdapter();
            mainDS.NotificationCountRow itemcount = tblCounter.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID, MySessionManager.CurrentUser.TeamID)[0];

            this.initassinfo.InnerText = itemcount.intialassessment.ToString();
            this.preapprovedinfo.InnerText = itemcount.preapproval.ToString();
            this.Approvedinfo.InnerText = itemcount.approvedloans.ToString();
            this.Apprinfo.InnerText = (Convert.ToInt32(itemcount.approvalI.ToString()) + Convert.ToInt32(itemcount.approvalII.ToString()) + Convert.ToInt32(itemcount.approvalIII.ToString()) + Convert.ToInt32(itemcount.approvalIV.ToString()) + Convert.ToInt32(itemcount.approvalV.ToString())).ToString();
            this.Appraisalinfo.InnerText = itemcount.appraisal.ToString();
            this.legalinfo.InnerText = itemcount.legal.ToString();
            this.riskinfo.InnerText = itemcount.risk.ToString();
            this.reviewinfo.InnerText = itemcount.cmreview.ToString();
            this.disbinfo.InnerText = (Convert.ToInt32(itemcount.disbursementI.ToString()) + Convert.ToInt32(itemcount.disbursementII.ToString())).ToString();
        }
        catch { }
    }
    /// <summary>
    /// This function sets the notifications
    /// </summary>
    public void setNotifications()
    {
        try
        {

            mainDSTableAdapters.NotificationCountTableAdapter tblCounter = new mainDSTableAdapters.NotificationCountTableAdapter();
            mainDS.NotificationCountRow itemcount = tblCounter.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID, MySessionManager.CurrentUser.TeamID)[0];
            this.intmaturityinfo.InnerText = itemcount.IntMaturity.ToString();
            this.invmaturityinfo.InnerText = itemcount.InvMaturity.ToString();
            //this.certinfo.InnerText = itemcount.certification.ToString();
            //this.InvApproved.InnerText = itemcount.InvApproved.ToString();
            //this.Appraisalinfo.InnerText = itemcount.appraisal.ToString();
            //this.legalinfo.InnerText = itemcount.legal.ToString();
            //this.riskinfo.InnerText = itemcount.risk.ToString();
            //// this.reviewinfo.InnerText = itemcount.cmreview.ToString();
            //this.disbinfo.InnerText = (Convert.ToInt32(itemcount.disbursementI.ToString()) + Convert.ToInt32(itemcount.disbursementII.ToString()) + (Convert.ToInt32(itemcount.disbursementIII.ToString()))).ToString();
        }
        catch
        { }
    }
Ejemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        setUrls();
        if (MySessionManager.CurrentUser == null)
        {
            Response.Redirect("~/logout.aspx");
        }
        LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();

        try
        {
            mainDSTableAdapters.NotificationCountTableAdapter tblCounter = new mainDSTableAdapters.NotificationCountTableAdapter();
            mainDS.NotificationCountRow itemcount = tblCounter.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID, MySessionManager.CurrentUser.TeamID)[0];

            this.pendingRecInfo.InnerText = (Convert.ToInt32(itemcount.receipts.ToString())).ToString();
            this.pendingDisInfo.InnerText = (Convert.ToInt32(itemcount.disbursementI.ToString()) + Convert.ToInt32(itemcount.disbursementII.ToString()) + Convert.ToInt32(itemcount.disbursementIII.ToString())).ToString();
        }
        catch (Exception ex)
        {
        }

        setPanelsOff();
        showLoanAppInfo();


        #region QueryStringSection
        if (Request.QueryString["id"] == null)
        {
        }
        else
        {
            string EncID = Request.QueryString["id"];
            int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
            MySessionManager.AppID    = DecID;
            MySessionManager.ClientID = Convert.ToInt32(loanApp.getClientID(MySessionManager.AppID));
        }

        if (!(Request.QueryString["ops"] == null))
        {
            if (!(Request.QueryString["tab"] == null))
            {
                if (!(Request.QueryString["tab"] == ""))
                {
                    currentTab = int.Parse(Request.QueryString["tab"]);
                }
                else
                {
                    currentTab = Convert.ToInt32(MySessionManager.CurrentTab);
                }
                ops = Request.QueryString["ops"].ToString();
                setPanels(currentTab);
                MySessionManager.CurrentTab = currentTab.ToString();
                MySessionManager.OpsTab     = "load";

                string urlpath = util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tab");
                urlpath = util.RemoveQueryStringByKey(urlpath, "ops");
                Response.Redirect(urlpath);
            }
            else
            {
                if (!(Request.QueryString["tab"] == ""))
                {
                    currentTab = int.Parse(Request.QueryString["tab"]);
                }
                else
                {
                    currentTab = 0;
                }

                ops = "load";
                setPanels(currentTab);

                MySessionManager.CurrentTab = currentTab.ToString();
                MySessionManager.OpsTab     = "load";
                util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tab");
                util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "ops");
            }
        }
        else
        {
            ops = MySessionManager.OpsTab.ToString();

            //For handling the tabs
            if (!(MySessionManager.CurrentTab == ""))
            {
                currentTab = int.Parse(MySessionManager.CurrentTab);
            }
            else
            {
                currentTab = 0;
            }

            setPanels(currentTab);
        }
        #endregion

        if ((!(util.alert() == "")) && (MySessionManager.skipAlert == 0))
        {
            this.pAlertmsg.InnerText = util.alert();
            // Define the name and type of the client scripts on the page.
            String csname1 = "PopupScript";
            String csname2 = "ButtonClickScript";
            Type   cstype  = this.GetType();

            // Get a ClientScriptManager reference from the Page class.
            ClientScriptManager cs = Page.ClientScript;

            // Check to see if the startup script is already registered.
            if (!cs.IsStartupScriptRegistered(cstype, csname1))
            {
                String cstext1 = "alertMessage();";
                cs.RegisterStartupScript(cstype, csname1, cstext1, true);
            }
            MySessionManager.skipAlert = 1;
        }
    }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ReceiptPanel.Visible            = false;
        PaymentPanel.Visible            = false;
        JournalPanel.Visible            = false;
        receiptpendinglist.Visible      = false;
        disbursementpendinglist.Visible = false;
        try
        {
            mainDSTableAdapters.NotificationCountTableAdapter tblCounter = new mainDSTableAdapters.NotificationCountTableAdapter();
            mainDS.NotificationCountRow itemcount = tblCounter.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID, MySessionManager.CurrentUser.TeamID)[0];

            this.pendingRecInfo.InnerText = (Convert.ToInt32(itemcount.receipts.ToString())).ToString();
            this.pendingDisInfo.InnerText = (Convert.ToInt32(itemcount.disbursementI.ToString()) + Convert.ToInt32(itemcount.disbursementII.ToString()) + Convert.ToInt32(itemcount.disbursementIII.ToString())).ToString();
        }
        catch (Exception ex) {
        }


        if (Request.QueryString["panel"] != null)
        {
            if (Request.QueryString["panel"] == "Receipt")
            {
                ReceiptPanel.Visible = true;
            }
            if (Request.QueryString["panel"] == "Payment")
            {
                PaymentPanel.Visible = true;
            }
            if (Request.QueryString["panel"] == "Journal")
            {
                JournalPanel.Visible = true;
            }
            if (Request.QueryString["panel"] == "PendingReceipt")
            {
                this.receiptpendinglist.type = "receipt";
                string sql1 = "SELECT tbl_investment_application.datID, tbl_investment_application.datClientName, tbl_investment_application.datApplicationNumber, opt_investment_types.datDescription AS type, tbl_investment_application.datApplicationStatus "
                              + "FROM opt_investment_types INNER JOIN tbl_investment_application ON opt_investment_types.datID = tbl_investment_application.datInvestmentType "
                              + "WHERE (tbl_investment_application.datTeamID = " + MySessionManager.CurrentUser.BranchID + ") AND (tbl_investment_application.datApplicationStatus = 2) ";
                this.receiptpendinglist.refreshData(sql1);
                this.receiptpendinglist.Visible = true;
            }

            if (Request.QueryString["panel"] == "PendingDisbursement")
            {
                int    init_     = 0;
                string condition = " AND (";
                if (RoleExist(5) == true)
                {
                    if (init_ > 0)
                    {
                        condition += "OR";
                    }
                    condition += " tbl_loan_application.datApplicationStatus=13"; init_++;
                }
                if (RoleExist(7) == true)
                {
                    if (init_ > 0)
                    {
                        condition += "OR";
                    }
                    condition += " tbl_loan_application.datApplicationStatus=14"; init_++;
                }
                if (RoleExist(8) == true)
                {
                    if (init_ > 0)
                    {
                        condition += "OR";
                    }
                    condition += " tbl_loan_application.datApplicationStatus=15"; init_++;
                }
                if (condition == " AND (")
                {
                    condition = "0=1";
                }
                else
                {
                    condition += ")";
                }

                this.disbursementpendinglist.type = "disbursement";

                string sql = "SELECT tbl_loan_application.datID,tbl_loan_application.datApplicationNumber, tbl_loan_application.datClientName, opt_loan_types.datDescription, tbl_loan_application.datLoanAmount "
                             + "FROM tbl_loan_application INNER JOIN opt_loan_types ON tbl_loan_application.datLoanType = opt_loan_types.datID "
                             + "WHERE datTeamID =" + MySessionManager.CurrentUser.BranchID + condition;



                this.disbursementpendinglist.refreshData(sql);
                this.disbursementpendinglist.Visible = true;
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        ReceiptPanel.Visible = false;
        PaymentPanel.Visible = false;
        JournalPanel.Visible = false;
        receiptpendinglist.Visible = false;
        disbursementpendinglist.Visible = false;
        try
        {
            mainDSTableAdapters.NotificationCountTableAdapter tblCounter = new mainDSTableAdapters.NotificationCountTableAdapter();
            mainDS.NotificationCountRow itemcount = tblCounter.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID, MySessionManager.CurrentUser.TeamID)[0];
            
            this.pendingRecInfo.InnerText = (Convert.ToInt32(itemcount.receipts.ToString ())).ToString();
            this.pendingDisInfo.InnerText = (Convert.ToInt32(itemcount.disbursementI.ToString()) + Convert.ToInt32(itemcount.disbursementII.ToString()) + Convert.ToInt32(itemcount.disbursementIII.ToString())).ToString();
        }
        catch (Exception ex) { 
        
        }
        

        if (Request.QueryString["panel"] != null) 
        {
            if (Request.QueryString["panel"] == "Receipt")
            {
                ReceiptPanel.Visible = true;
                
            }
            if (Request.QueryString["panel"] == "Payment")
            {
                PaymentPanel.Visible = true;
            }
            if (Request.QueryString["panel"] == "Journal")
            {
                JournalPanel.Visible = true;
            }
            if (Request.QueryString["panel"] == "PendingReceipt")
            {
                this.receiptpendinglist.type = "receipt";
                string sql1 = "SELECT tbl_investment_application.datID, tbl_investment_application.datClientName, tbl_investment_application.datApplicationNumber, opt_investment_types.datDescription AS type, tbl_investment_application.datApplicationStatus "
                             + "FROM opt_investment_types INNER JOIN tbl_investment_application ON opt_investment_types.datID = tbl_investment_application.datInvestmentType "
                             + "WHERE (tbl_investment_application.datTeamID = " + MySessionManager.CurrentUser.BranchID + ") AND (tbl_investment_application.datApplicationStatus = 2) ";
                this.receiptpendinglist .refreshData(sql1);             
                this.receiptpendinglist.Visible = true;
                


            }

            if (Request.QueryString["panel"] == "PendingDisbursement")
            {
                int init_ = 0;
                string condition = " AND (";
                if (RoleExist(5) == true)
                { if (init_ > 0) { condition += "OR"; } condition += " tbl_loan_application.datApplicationStatus=13"; init_++; }
                if (RoleExist(7) == true)
                { if (init_ > 0) { condition += "OR"; } condition += " tbl_loan_application.datApplicationStatus=14"; init_++; }
                if (RoleExist(8) == true)
                { if (init_ > 0) { condition += "OR"; } condition += " tbl_loan_application.datApplicationStatus=15"; init_++; }
                if (condition == " AND (") { condition = "0=1"; } else { condition += ")"; }

                this.disbursementpendinglist.type = "disbursement";

                string sql = "SELECT tbl_loan_application.datID,tbl_loan_application.datApplicationNumber, tbl_loan_application.datClientName, opt_loan_types.datDescription, tbl_loan_application.datLoanAmount "
                             + "FROM tbl_loan_application INNER JOIN opt_loan_types ON tbl_loan_application.datLoanType = opt_loan_types.datID "
                             + "WHERE datTeamID =" + MySessionManager.CurrentUser.BranchID + condition;



                
                this.disbursementpendinglist.refreshData(sql);
                this.disbursementpendinglist.Visible = true;


            }
            
        }
        
    }
 /// <summary>
 /// This function sets the notification for each Investment Application tab
 /// </summary>
 public void setNotifications()
 {
     try
     {
         mainDSTableAdapters.NotificationCountTableAdapter tblCounter = new mainDSTableAdapters.NotificationCountTableAdapter();
         mainDS.NotificationCountRow itemcount = tblCounter.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID, MySessionManager.CurrentUser.TeamID)[0];
         this.initInvinfo.InnerText = itemcount.initInterview.ToString();
         this.receiptinfo.InnerText = itemcount.receipts.ToString();
         this.certinfo.InnerText = itemcount.certification.ToString();
         this.InvApproved.InnerText = itemcount.InvApproved.ToString();
     }
     catch(Exception ex)
     { }
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        setUrls();
        if (MySessionManager.CurrentUser == null)
        {
            Response.Redirect("~/logout.aspx");
        }
        LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();

        try
        {
            mainDSTableAdapters.NotificationCountTableAdapter tblCounter = new mainDSTableAdapters.NotificationCountTableAdapter();
            mainDS.NotificationCountRow itemcount = tblCounter.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID, MySessionManager.CurrentUser.TeamID)[0];

            this.pendingRecInfo.InnerText = (Convert.ToInt32(itemcount.receipts.ToString())).ToString();
            this.pendingDisInfo.InnerText = (Convert.ToInt32(itemcount.disbursementI.ToString()) + Convert.ToInt32(itemcount.disbursementII.ToString()) + Convert.ToInt32(itemcount.disbursementIII.ToString())).ToString();
        }
        catch (Exception ex)
        {

        }

        setPanelsOff();
        showLoanAppInfo();


        #region QueryStringSection
        if (Request.QueryString["id"] == null)
        {
        }
        else
        {
            string EncID = Request.QueryString["id"];
            int DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
            MySessionManager.AppID = DecID;
            MySessionManager.ClientID = Convert.ToInt32(loanApp.getClientID(MySessionManager.AppID));
        }

        if (!(Request.QueryString["ops"] == null))
        {
            if (!(Request.QueryString["tab"] == null))
            {
                if (!(Request.QueryString["tab"] == ""))
                    currentTab = int.Parse(Request.QueryString["tab"]);
                else
                    currentTab = Convert.ToInt32(MySessionManager.CurrentTab);
                ops = Request.QueryString["ops"].ToString();
                setPanels(currentTab);
                MySessionManager.CurrentTab = currentTab.ToString();
                MySessionManager.OpsTab = "load";

                string urlpath = util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tab");
                urlpath = util.RemoveQueryStringByKey(urlpath, "ops");
                Response.Redirect(urlpath);
            }
            else
            {
                if (!(Request.QueryString["tab"] == ""))
                    currentTab = int.Parse(Request.QueryString["tab"]);
                else
                    currentTab = 0;

                ops = "load";
                setPanels(currentTab);

                MySessionManager.CurrentTab = currentTab.ToString();
                MySessionManager.OpsTab = "load";
                util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "tab");
                util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "ops");
            }
        }
        else
        {
            ops = MySessionManager.OpsTab.ToString();

            //For handling the tabs
            if (!(MySessionManager.CurrentTab == ""))

                currentTab = int.Parse(MySessionManager.CurrentTab);
            else
                currentTab = 0;

            setPanels(currentTab);
        } 
        #endregion

        if ((!(util.alert() == "")) && (MySessionManager.skipAlert == 0))
        {
            this.pAlertmsg.InnerText = util.alert();
            // Define the name and type of the client scripts on the page.
            String csname1 = "PopupScript";
            String csname2 = "ButtonClickScript";
            Type cstype = this.GetType();

            // Get a ClientScriptManager reference from the Page class.
            ClientScriptManager cs = Page.ClientScript;

            // Check to see if the startup script is already registered.
            if (!cs.IsStartupScriptRegistered(cstype, csname1))
            {
                String cstext1 = "alertMessage();";
                cs.RegisterStartupScript(cstype, csname1, cstext1, true);
            }
            MySessionManager.skipAlert = 1;
        }
    }
    public void setCountApps()
    {

        mainDSTableAdapters.NotificationCountTableAdapter notifs = new mainDSTableAdapters.NotificationCountTableAdapter();
        mainDS.NotificationCountRow notifcounts = notifs.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID,MySessionManager.CurrentUser.TeamID)[0];

        this.clientinfo.InnerHtml = notifcounts.client.ToString();
         this.invaccinfo.InnerHtml = notifcounts.InvAccounts.ToString();
        this.invappinfo.InnerHtml = notifcounts.invapplications.ToString();
        this.laonappinfo.InnerHtml = notifcounts.loanApplication.ToString();
        this.loanaccinfo.InnerHtml = notifcounts.loanaccount.ToString();
        this.schpayinfo.InnerText = notifcounts.scheduledPayment.ToString();
            }
    public void setNotifications()
    {

        mainDSTableAdapters.NotificationCountTableAdapter tblCounter = new mainDSTableAdapters.NotificationCountTableAdapter();
        mainDS.NotificationCountRow itemcount = tblCounter.NotificationCount(MySessionManager.CurrentUser.BranchID, MySessionManager.CurrentUser.UserID,MySessionManager.CurrentUser.TeamID)[0];

        this.initassinfo.InnerText = itemcount.intialassessment.ToString();
        this.preapprovedinfo.InnerText = itemcount.preapproval.ToString();
        this.Approvedinfo.InnerText = itemcount.approvedloans.ToString();
        this.Apprinfo.InnerText = (Convert.ToInt32(itemcount.approvalI.ToString()) + Convert.ToInt32(itemcount.approvalII.ToString()) + Convert.ToInt32(itemcount.approvalIII.ToString()) + Convert.ToInt32(itemcount.approvalIV.ToString()) + Convert.ToInt32(itemcount.approvalV.ToString())).ToString();
        this.Appraisalinfo.InnerText = itemcount.appraisal.ToString();
        this.legalinfo.InnerText = itemcount.legal.ToString();
        this.riskinfo.InnerText = itemcount.risk.ToString();
        //this.reviewinfo.InnerText = itemcount.cmreview.ToString();
        this.disbinfo.InnerText = (Convert.ToInt32(itemcount.disbursementI.ToString()) + Convert.ToInt32(itemcount.disbursementII.ToString())).ToString();

         LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();
        int status = Convert.ToInt32(loanApp.getApplicationStatus(MySessionManager.AppID));
        if (status == 13)
        { 
             this.disbinfo.InnerText = itemcount.disbursementI.ToString();
        }
        else if (status == 14)
        { 
            this.disbinfo.InnerText = itemcount.disbursementII.ToString();
        }
        else if (status == 15)
        {
            this.disbinfo.InnerText = itemcount.disbursementIII.ToString();
        }
    }