示例#1
0
    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
        setNotifications();
        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();
    }
示例#2
0
        private string GenerateShortURLID()
        {
            String  result     = "";
            Boolean isResultOK = false;

            while (isResultOK == false)
            {
                Random rnd = new Random();
                int    id  = rnd.Next();

                result = MyEncryption.Encrypt(id.ToString(), 5);


                var shortUrlId = db.ShortURLs
                                 .Where(b => b.Short_URLID == result)
                                 .FirstOrDefault();

                if (shortUrlId == null)
                {
                    isResultOK = true;
                }
            }

            return(result);
        }
示例#3
0
 public ActionResult changepassword(UserProfile userprofile)
 {
     try
     {
         MsInUsEntities connection = new MsInUsEntities();
         int            id         = Convert.ToInt32(Session["UserId"]);
         UserProfile    usobj      = connection.UserProfiles.SingleOrDefault(m => m.Id == id);
         usobj.Password         = MyEncryption.EncodePasswordToBase64(userprofile.Password);
         usobj.ConfirmPassword  = MyEncryption.EncodePasswordToBase64(userprofile.ConfirmPassword);
         usobj.Email_IdRegister = usobj.Email_Id;
         connection.SaveChanges();
         TempData["ConfirmationMessage"] = "Password Changed Successfully!";
     }
     catch (System.Data.Entity.Validation.DbEntityValidationException e)
     {
         StreamWriter sw = new StreamWriter(@"D:\MasterStudy\MsInUsa\MsInUsa\Log\logs.txt", true);
         foreach (var c in e.EntityValidationErrors)
         {
             foreach (var ex in c.ValidationErrors)
             {
                 sw.WriteLine(ex.ErrorMessage);
             }
         }
         sw.Close();
         return(RedirectToAction("NotFound", "Error"));
     }
     return(RedirectToAction("changepassword", "Account"));
 }
示例#4
0
        private void bt_send_Click(object sender, EventArgs e)
        {
            List <KeyValuePair <string, string> > myHeads = new List <KeyValuePair <string, string> >();

            if (ck_isSgin.Checked)
            {
                tb_sendTime.Text = ((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000).ToString();
                string sginOrginStr = string.Format("appSecret={0}&sendTime={1}", app_secret, tb_sendTime.Text);
                tb_sign.Text = MyEncryption.CreateMD5Key(sginOrginStr).ToLower();

                myHeads.Add(new KeyValuePair <string, string>("Content-type", "application/json;charset=UTF-8"));
                myHeads.Add(new KeyValuePair <string, string>("Authorization", "bearer " + tb_access_token.Text));
                myHeads.Add(new KeyValuePair <string, string>("sign", tb_sign.Text));
                myHeads.Add(new KeyValuePair <string, string>("sendTime", tb_sendTime.Text));
                myHeads.Add(new KeyValuePair <string, string>("User-Agent", "Tester"));
            }

            //<Api name="api">rtb_sendBody.Text.Replace("    "," ")</Api>
            Stopwatch sw = new Stopwatch();

            sw.Start();
            string response = myHttp.SendData(string.Format("{0}{1}", tb_host.Text, tb_url.Text), rtb_sendBody.Text, cb_httpMethod.Text, myHeads);

            if (nowNode != null)
            {
                nowNode.InnerText = rtb_sendBody.Text;
            }
            sw.Stop();
            rtb_response.AddDate(string.Format("耗时:{0} ms", sw.ElapsedMilliseconds), Color.BlueViolet, true);
            rtb_response.AddDate(response, (response.StartsWith("Error:")) ? Color.Red : Color.Black, true);
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     ///Querystring Block
     ///
     if (Request.QueryString.Count > 0)
     {
         InvestmentAccountDSTableAdapters.GetInvAccountTableAdapter invAcc = new InvestmentAccountDSTableAdapters.GetInvAccountTableAdapter();
         string EncID = Request.QueryString["id"];
         int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
         MySessionManager.InvAccID = DecID;
         MySessionManager.ClientID = Convert.ToInt32(invAcc.GetClientID(MySessionManager.InvAppID));
         if (Request.QueryString["action"] == "int")
         {
             Page.Title = "Interest Maturity";
         }
         if (Request.QueryString["action"] == "inv")
         {
             Page.Title = "Investment Maturity";
         }
         if (Request.QueryString["action"] == "rol")
         {
             Page.Title = "Roll Over";
         }
     }
     setNotifications();
 }
示例#6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoanAccountDSTableAdapters.GetLoanAccountTableAdapter loanAcc = new LoanAccountDSTableAdapters.GetLoanAccountTableAdapter();

        if (Request.QueryString["id"] == null)
        {
        }
        else
        {
            string EncID = Request.QueryString["id"];
            int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
            MySessionManager.AccountID = DecID;
            MySessionManager.ClientID  = Convert.ToInt32(loanAcc.GetClientIDFromAcc(Convert.ToInt32(MySessionManager.AccountID)));
        }

        if (Request.QueryString["action"] != null)
        {
            //  MySessionManager.CurrentTab=null;
            string action = Request.QueryString["action"];
            MySessionManager.CurrentTab = action;
            setPanel(action);
            Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "action"));
        }
        else
        {
            setPanel("");
        }

        showAccountInfomartion();
        setUrls();
    }
    protected void btnSaveAlert_Click(object sender, EventArgs e)
    {
        string EncID = appID.Value.Trim();
        int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));

        InvestmentDSTableAdapters.GetAlertTableAdapter InvApp = new InvestmentDSTableAdapters.GetAlertTableAdapter();
        InvApp.SaveInvAlert(alertmsg.Value,
                            DecID);
    }
示例#8
0
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         HyperLink logstatus = (HyperLink)e.Row.FindControl("showStatusLog");
         string    enpValue  = MyEncryption.Encrypt(this.GridView1.DataKeys[e.Row.RowIndex].Value.ToString(), "12345678910");
         logstatus.NavigateUrl = "~/pages/clients/clienthome.aspx?loanAppid=" + enpValue;
     }
 }
示例#9
0
    protected void btnSaveAlert_Click(object sender, EventArgs e)
    {
        string EncID = appID.Value.Trim();
        int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));

        LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();
        loanApp.saveAlert(alertmsg.Value,
                          DecID);
    }
示例#10
0
    protected void gvAccounts_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            string enpValue = MyEncryption.Encrypt(this.gvAccounts.DataKeys[e.Row.RowIndex].Value.ToString(), "12345678910");

            HyperLink link = (HyperLink)e.Row.FindControl("hyperAppProcess");
            if (type == "initialassesment")
            {
                link.NavigateUrl = "~/pages/loanapplication/initialassesment.aspx?id=" + enpValue;
            }
            if (type == "preapproved")
            {
                link.NavigateUrl = "~/pages/loanapplication/preapproved.aspx?id=" + enpValue;
            }
            else if (type == "appraisals")
            {
                link.NavigateUrl = "~/pages/loanapplication/appraisals.aspx?id=" + enpValue;
            }
            else if (type == "approval")
            {
                link.NavigateUrl = "~/pages/loanapplication/approvals.aspx?id=" + enpValue;
            }
            else if (type == "approvedloans")
            {
                link.NavigateUrl = "~/pages/loanapplication/approvedloans.aspx?id=" + enpValue;
            }
            else if (type == "review")
            {
                link.NavigateUrl = "~/pages/loanapplication/review.aspx?id=" + enpValue;
            }
            else if (type == "disbursement")
            {
                link.NavigateUrl = "~/pages/finance/disbursement.aspx?id=" + enpValue;
            }
            else if (type == "risk")
            {
                link.NavigateUrl = "~/pages/loanapplication/risk.aspx?id=" + enpValue;
            }
            else if (type == "legal")
            {
                link.NavigateUrl = "~/pages/loanapplication/legal.aspx?id=" + enpValue;
            }
            HyperLink AlertLink = (HyperLink)e.Row.FindControl("hyperAlert");
            AlertLink.NavigateUrl = "javascript:loadAlertPop('" + enpValue + "')";

            if (setReview(Convert.ToInt32(this.gvAccounts.DataKeys[e.Row.RowIndex].Value.ToString())))
            {
                e.Row.Cells[4].Text = "<i class='glyphicon glyphicon-ok'></i>";
            }
            else
            {
            }
        }
    }
示例#11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        this.lblUserName.InnerText = "";

        if (Request.QueryString["id"] != null)
        {
            int id = Convert.ToInt32(MyEncryption.Decrypt(Request.QueryString["id"], "123456789"));

            SqlDataSource2.SelectParameters["userID"].DefaultValue = id.ToString();
        }
    }
    protected void gvApplication_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            string enpValue = MyEncryption.Encrypt(this.gvApplication.DataKeys[e.Row.RowIndex].Value.ToString(), "12345678910");

            HyperLink link = (HyperLink)e.Row.FindControl("HyperTrail");

            link.NavigateUrl = "~/pages/applicationtracker.aspx?id=" + enpValue;
        }
    }
示例#13
0
    protected void gvTransactionClientList_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            string enpValue = MyEncryption.Encrypt(this.gvTransactionClientList.DataKeys[e.Row.RowIndex].Value.ToString(), "12345678910");


            HyperLink link = (HyperLink)e.Row.FindControl("HyperEntry");
            link.NavigateUrl = HttpContext.Current.Request.Url.AbsoluteUri + "?id=" + enpValue + "&action=entry";
        }
    }
示例#14
0
        /// <summary>
        /// 生成Vanelife协议数据
        /// </summary>
        /// <param name="testData">用例数据</param>
        /// <returns>协议数据</returns>
        ///
        private string CreatVanelifeSendData(string testData)
        {
            Hashtable     myDataTable = new Hashtable();
            StringBuilder myStrBld    = new StringBuilder();
            string        tempSign    = "";

            #region 填装数据
            string[] sArray = testData.Split('&');
            if (testData == "")
            {
                //do nothing
            }
            else
            {
                foreach (string tempStr in sArray)
                {
                    int myBreak = tempStr.IndexOf('=');
                    if (myBreak == -1)
                    {
                        return("can't find =");
                    }
                    myDataTable.Add(tempStr.Substring(0, myBreak), tempStr.Substring(myBreak + 1));
                }
            }
            myDataTable.Add("key", myExecutionDeviceInfo.dev_key);
            myDataTable.Add("timestamp", DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss"));
            #endregion

            #region 生成Sign
            ArrayList akeys = new ArrayList(myDataTable.Keys);
            akeys.Sort();
            foreach (string tempKey in akeys)
            {
                myStrBld.Append(tempKey + myDataTable[tempKey]);
            }
            myStrBld.Append(myExecutionDeviceInfo.dev_secret);
            tempSign = MyEncryption.CreateMD5Key(myStrBld.ToString());
            #endregion

            #region 组合数据
            myStrBld.Remove(0, myStrBld.Length);
            //change here
            myStrBld.Append("signature=" + tempSign);
            foreach (DictionaryEntry de in myDataTable)
            {
                //对每次参数进行url编码
                myStrBld.Append("&" + de.Key + "=" + System.Web.HttpUtility.UrlEncode((de.Value).ToString()));
            }
            return(myStrBld.ToString());

            #endregion
        }
        public ResponseModel <string> Singup([FromBody] User user)
        {
            if (String.IsNullOrEmpty(user.LoginName) || String.IsNullOrEmpty(user.LoginPassword))
            {
                return(new ResponseModel <string>()
                {
                    Message = "請輸入完整資料", StatsuCode = StatusCodes.Status204NoContent, Data = null
                });
            }
            user.LoginPassword = MyEncryption.Encryption_sha256(user.LoginPassword);

            return(this.Singup(user));
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        ///Querystring Block
        InvestmentAccountDSTableAdapters.GetInvAccountTableAdapter invAcc = new InvestmentAccountDSTableAdapters.GetInvAccountTableAdapter();
        string EncID = Request.QueryString["id"];
        int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));

        MySessionManager.InvAccID = DecID;
        MySessionManager.ClientID = Convert.ToInt32(invAcc.GetClientID(MySessionManager.InvAppID));


        setNotifications();
    }
    protected void gvAccounts_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            HyperLink clientProfile = (HyperLink)e.Row.FindControl("hyperClientProfile");
            HyperLink Inv           = (HyperLink)e.Row.FindControl("hyperInv");

            string enpValue = MyEncryption.Encrypt(this.gvAccounts.DataKeys[e.Row.RowIndex].Value.ToString(), "12345678910");

            clientProfile.NavigateUrl = "~/pages/clients/clienthome.aspx?id=" + enpValue;
            Inv.NavigateUrl           = "javascript:apply('" + enpValue + "')";
        }
    }
示例#18
0
    protected void gvAccounts_RowDataBound1(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            //HyperLink Loan = (HyperLink)e.Row.FindControl("hyperLoan");
            HyperLink Inv = (HyperLink)e.Row.FindControl("hyperInv");

            string enpValue = MyEncryption.Encrypt(this.gvAccounts.DataKeys[e.Row.RowIndex].Value.ToString(), "12345678910");

            //Loan.NavigateUrl = "~/pages/clients.aspx?product=loan&id=" + enpValue;
            Inv.NavigateUrl = "~/pages/loanaccountdetails.aspx?id=" + enpValue + "";
        }
    }
    protected void gvInvClients_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        try
        {
            HyperLink link = (HyperLink)e.Row.FindControl("HyperAppProcess");
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                string enpValue = MyEncryption.Encrypt(gvInvClients.DataKeys[e.Row.RowIndex].Value.ToString(), "12345678910");
                if (type == "initInterview")
                {
                    link.NavigateUrl = "~/pages/invapplication/initInterview.aspx?id=" + enpValue;
                }
                if (type == "receipt")
                {
                    link.NavigateUrl = "~/pages/invapplication/receipt.aspx?id=" + enpValue;
                }
                else if (type == "certification")
                {
                    link.NavigateUrl = "~/pages/invapplication/certification.aspx?id=" + enpValue;
                }
                else if (type == "approved")
                {
                    link.NavigateUrl = "~/pages/invapplication/approved.aspx?id=" + enpValue;
                }
                else if (type == "intMaturity")
                {
                    link.NavigateUrl = "~/pages/invapplication/interestmaturity.aspx?id=" + enpValue;
                }
                else if (type == "invMaturity")
                {
                    link.NavigateUrl = "~/pages/invapplication/review.aspx?id=" + enpValue;
                }
                else if (type == "matured")
                {
                    link.NavigateUrl = "~/pages/invapplication/matured.aspx?id=" + enpValue;
                }

                HyperLink AlertLink = (HyperLink)e.Row.FindControl("hyperAlert");
                AlertLink.NavigateUrl = "javascript:loadAlertPop('" + enpValue + "')";

                if (setReview(Convert.ToInt32(this.gvInvClients.DataKeys[e.Row.RowIndex].Value.ToString())))
                {
                    e.Row.Cells[4].Text = "<i class='glyphicon glyphicon-ok'></i>";
                }
                else
                {
                }
            }
        }
        catch (Exception ex) { }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        #region QueryString
        if (Request.QueryString["id"] == null)
        {
        }
        else
        {
            string EncID = Request.QueryString["id"];
            int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
            this.userID.Value = DecID.ToString();
        }

        #endregion

        Panel seperator = new Panel();

        adminTableAdapters.GetAccessCodesTableAdapter AccessCodes = new adminTableAdapters.GetAccessCodesTableAdapter();
        admin.GetAccessCodesDataTable tblAccessCodes = AccessCodes.GetAccessMenuTypes();
        foreach (admin.GetAccessCodesRow tbl in tblAccessCodes)
        {
            Panel menuDiv = new Panel();
            HtmlGenericControl menuHdrDiv  = new HtmlGenericControl("div");
            HtmlGenericControl menuContDiv = new HtmlGenericControl("div");
            menuDiv.ID           = "menu_" + tbl.datType.ToString();
            menuHdrDiv.InnerHtml = "<p><h5><small> " + tbl.datType.ToString() + " </small></h5><hr style='margin:5px'/></p>";

            admin.GetAccessCodesDataTable tblAccessData = AccessCodes.GetAccessCodes(tbl.datType.ToString());
            foreach (admin.GetAccessCodesRow tbl1  in tblAccessData)
            {
                CheckBox chk1 = new CheckBox();
                chk1.ID       = "chk_" + tbl1.datID.ToString();
                chk1.CssClass = "checkbox";
                chk1.Text     = tbl1.datDescription.ToString();
                HtmlGenericControl formgroupDiv = new HtmlGenericControl("div");

                formgroupDiv.Attributes["class"] = "form-group";

                formgroupDiv.Controls.Add(chk1);
                menuContDiv.Controls.Add(formgroupDiv);
            }
            menuDiv.Controls.Add(menuHdrDiv);
            menuDiv.Controls.Add(menuContDiv);

            this.mainContainer.Controls.Add(menuDiv);
        }
        if (this.userID.Value != "")
        {
            LoadCheckItems(Convert.ToInt32(this.userID.Value));
        }
    }
    protected void gvUsers_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Cells[0].Text = gvUsers.DataKeys[e.Row.RowIndex]["title"].ToString() + " " + gvUsers.DataKeys[e.Row.RowIndex]["datFirstnames"].ToString() + " " + gvUsers.DataKeys[e.Row.RowIndex]["datSurname"].ToString();
            string enpValue = MyEncryption.Encrypt(this.gvUsers.DataKeys[e.Row.RowIndex].Value.ToString(), "12345678910");

            HyperLink accessright = (HyperLink)e.Row.FindControl("hyperAccess");
            accessright.NavigateUrl = "~/backend/pages/users.aspx?id=" + enpValue + "&page=accessright";

            HyperLink roles = (HyperLink)e.Row.FindControl("hyperRoles");
            roles.NavigateUrl = "~/backend/pages/users.aspx?id=" + enpValue + "&page=roles";

            HyperLink updates = (HyperLink)e.Row.FindControl("hyperUpdates");
            updates.NavigateUrl = "~/backend/pages/users.aspx?id=" + enpValue + "&page=updates";
        }
    }
    protected void btnApply_Click(object sender, EventArgs e)
    {
        mainDSTableAdapters.ClientTableAdapter client = new mainDSTableAdapters.ClientTableAdapter();

        string EncID = this.ckey.Value;
        //Request.QueryString["id"];
        int DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
        int cType = Convert.ToInt32(client.GetClientType(DecID));

        if (ddlProducts.SelectedValue == "1")
        {
            int lType = 0;
            if (cType == 1)
            {
                lType = 1;
            }
            else if (cType == 2)
            {
                lType = 2;
            }
            else if (cType == 3)
            {
                lType = 4;
            }
            LoanDSTableAdapters.LoanApplicationsTableAdapter loanApp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();
            string clientname = client.GetClientsName(DecID).ToString();

            loanApp.InsertNewApplication(DecID,
                                         clientname,
                                         lType,
                                         MySessionManager.CurrentUser.BranchID,
                                         MySessionManager.CurrentUser.UserID);
            ShowMessageBox("Loan Application for " + clientname + " submited successfully");
        }
        else if (ddlProducts.SelectedValue == "2")
        {
            string clientname = client.GetClientsName(DecID).ToString();

            InvestmentDSTableAdapters.GetInvestmentAppTableAdapter invapp = new InvestmentDSTableAdapters.GetInvestmentAppTableAdapter();
            invapp.InsertInvestmentApplication(DecID,
                                               clientname,
                                               1,
                                               MySessionManager.CurrentUser.BranchID);
            ShowMessageBox("Investment Application for " + clientname + " submited successfully");
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     #region QueryStringBlock
     if (Request.QueryString["id"] == null)
     {
     }
     else
     {
         string EncID = Request.QueryString["id"];
         int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
         //MySessionManager.AppID = DecID;
         //int DecID = Convert.ToInt32(EncID);
         MySessionManager.ClientID = DecID;
         getProfileType(MySessionManager.ClientID);
     }
     #endregion
 }
    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();
    }
示例#25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] == null)
     {
         this.applicationtrails1.Visible = true;
         this.applicationtrail1.Visible  = false;
     }
     else
     {
         if (Request.QueryString["id"].Length > 0)
         {
             this.applicationtrail1.Visible  = true;
             this.applicationtrails1.Visible = false;
             string EncID = Request.QueryString["id"];
             int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
             MySessionManager.AppID = DecID;
         }
     }
 }
    public string setUrls(int AppID)
    {
        Utility util = new Utility();
        string  url  = "";

        LoanDSTableAdapters.LoanApplicationsTableAdapter loanapp = new LoanDSTableAdapters.LoanApplicationsTableAdapter();
        int status = Convert.ToInt32(loanapp.getApplicationStatus(AppID).ToString());

        if (status == 2)
        {
            url = "~/pages/loanapplication/initialassesment.aspx?id=" + MyEncryption.Encrypt(AppID.ToString(), "12345678910");
        }
        else if (status == 3)
        {
            url = "~/pages/loanapplication/preapproved.aspx?id=" + MyEncryption.Encrypt(AppID.ToString(), "12345678910");
        }
        else if (status == 4)
        {
            url = "~/pages/loanapplication/appraisals.aspx?id=" + MyEncryption.Encrypt(AppID.ToString(), "12345678910");
        }
        else if (status == 5)
        {
            url = "~/pages/loanapplication/risk.aspx?id=" + MyEncryption.Encrypt(AppID.ToString(), "12345678910");
        }
        else if (status == 6)
        {
            url = "~/pages/loanapplication/legal.aspx?id=" + MyEncryption.Encrypt(AppID.ToString(), "12345678910");
        }
        else if (status > 6 || status < 12)
        {
            url = "~/pages/loanapplication/approvals.aspx?id=" + MyEncryption.Encrypt(AppID.ToString(), "12345678910");
        }
        else if (status == 12)
        {
            url = "~/pages/loanapplication/approvedloans.aspx?id=" + MyEncryption.Encrypt(AppID.ToString(), "12345678910");
        }
        else if (status > 12 || status < 16)
        {
            url = "~/pages/loanapplication/disbursement.aspx?id=" + MyEncryption.Encrypt(AppID.ToString(), "12345678910");
        }

        return(url);
    }
示例#27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        #region QueryStringBlock
        if (Request.QueryString["id"] == null)
        {
        }
        else
        {
            string EncID = Request.QueryString["id"];
            int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
            //MySessionManager.AppID = DecID;
            //int DecID = Convert.ToInt32(EncID);
            MySessionManager.ClientID = DecID;
            loadClientInformation(MySessionManager.ClientID);
        }

        #endregion

        coporateclientprofile.Visible   = false;
        individualclientprofile.Visible = false;
        enterpriseclientprofile.Visible = false;
        loanaccounts.Visible            = false;
        invaccounts.Visible             = false;
        pendingloans.Visible            = false;
        pendinginvestments.Visible      = false;
        statuslog.Visible = false;

        if (Request.QueryString["loanAppid"] == null)
        {
        }
        else
        {
            string EncID = Request.QueryString["loanAppid"];
            int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
            //MySessionManager.AppID = DecID;
            //int DecID = Convert.ToInt32(EncID);
            MySessionManager.AppID = DecID;
            loadClientInformation(MySessionManager.ClientID);
            statuslog.Visible = true;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        mTempTableAdapters.GetTransactionDetailsTableAdapter tempHolder = new mTempTableAdapters.GetTransactionDetailsTableAdapter();
        #region QueryStringBlock
        if (Request.QueryString["id"] != null)
        {
            string EncID = Request.QueryString["id"];
            int    DecID = Convert.ToInt32(MyEncryption.Decrypt(EncID, "12345678910"));
            MySessionManager.AccountID = DecID;
            //  ShowMessageBox(" " + DecID + " ");
            LoanAccountDSTableAdapters.GetLoanAccountTableAdapter loanAcc = new LoanAccountDSTableAdapters.GetLoanAccountTableAdapter();
            LoanAccountDS.GetLoanAccountDataTable tblLoanAcc = loanAcc.GetLoanAccount(Convert.ToInt32(MySessionManager.AccountID));
            if (tblLoanAcc.Rows.Count > 0)
            {
                lblClient.InnerText   = tblLoanAcc[0].datClientFullName.ToString();
                lblbranch.InnerText   = util.displayValue("tbl_teams", tblLoanAcc[0].datTeamID.ToString());
                lbldate.InnerText     = tblLoanAcc[0].datStartDate.ToLongDateString();
                lbltotalamt.InnerText = tblLoanAcc[0].datOutstandingAmount.ToString("C").Replace("$", "");
            }
        }
        if (!(Request.QueryString["trdelete"] == null))
        {
            try
            {
                string id = Request.QueryString["trdelete"];
                tempHolder.DeleteTransactionDetails1(Convert.ToInt32(MySessionManager.AccountID), Convert.ToInt32(id));

                Page.Response.Redirect(util.RemoveQueryStringByKey(HttpContext.Current.Request.Url.AbsoluteUri, "trdelete"));
            }
            catch
            { }
        }
        #endregion
        try
        { lblTotal.Text = tempHolder.GetTransTotalAmount(MySessionManager.AppID).ToString(); }
        catch (Exception ex)
        {
            lblTotal.Text = "0.00";
        }
    }
示例#29
0
 public ActionResult Register(UserProfile userprofile)
 {
     if (userprofile != null)
     {
         using (MsInUsEntities msInUsConnection = new MsInUsEntities())
         {
             int rowcount = msInUsConnection.UserProfiles.Count();
             userprofile.Password        = MyEncryption.EncodePasswordToBase64(userprofile.Password);
             userprofile.ConfirmPassword = MyEncryption.EncodePasswordToBase64(userprofile.ConfirmPassword);
             userprofile.Email_Id        = userprofile.Email_IdRegister;
             msInUsConnection.UserProfiles.Add(userprofile);
             msInUsConnection.SaveChanges();
             TempData["ConfirmationMessage"] = "Registered Successfully";
             //Session.Add("Registration Message", "Registered Successfully");
             if (rowcount < msInUsConnection.UserProfiles.Count())
             {
                 return(RedirectToAction("LogIn", "Account"));
             }
         }
     }
     return(RedirectToAction("NotFound", "Error"));
 }
示例#30
0
 public ActionResult LogIn(UserProfile userprofile)
 {
     //connects and checks with the user credentials
     using (MsInUsEntities msInUsConnection = new MsInUsEntities())
     {
         if (!msInUsConnection.UserProfiles.Any(m => m.Email_Id == userprofile.Email_Id))
         {
             TempData["ErrorLogin"] = "******";
             return(RedirectToAction("LogIn", "Account"));
         }
         string userpassword = msInUsConnection.UserProfiles.First(m => m.Email_Id == userprofile.Email_Id).Password;
         if (userpassword != null && userprofile.Password == MyEncryption.DecodeFrom64(userpassword))
         {
             removeUserSession();
             Session.Add("UserName", msInUsConnection.UserProfiles.First(m => m.Email_Id == userprofile.Email_Id).FirstName);
             Session.Add("UserId", msInUsConnection.UserProfiles.First(m => m.Email_Id == userprofile.Email_Id).Id);
             return(RedirectToAction("Index", "Home"));
         }
     }
     TempData["ErrorLogin"] = "******";
     return(RedirectToAction("LogIn", "Account"));
 }