Esempio n. 1
0
        public static List <LeapCreditApplication> GetAllLeapCreditApplication_bySSN(string ssn)
        {
            List <LeapCreditApplication> file_to_DMS_List = new List <LeapCreditApplication>();

            using (SqlConnection objConnection = SQLDatabaseHelper.GetSqlConnection("LeapCreditConnectionString"))
            {
                SqlCommand cmd = new SqlCommand();
                cmd.Connection  = objConnection;
                cmd.CommandText = "sp_select_LeapCreditApplication_bySSN";
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add("@ssn ", SqlDbType.NVarChar);
                cmd.Parameters["@ssn "].Value = ssn;


                //cmd.ExecuteNonQuery();
                //cmd.ExecuteReader();

                SqlDataReader reader = cmd.ExecuteReader();
                while (reader.Read())
                {
                    LeapCreditApplication dm = new LeapCreditApplication();
                    dm.First_Name = reader["Firs_tName"].ToString();

                    file_to_DMS_List.Add(dm);
                }
            }

            return(file_to_DMS_List);
        }
Esempio n. 2
0
        public static void InsertStep1Insert_LeapCreditApplication(LeapCreditApplication applyModel)
        {
            using (SqlConnection objConnection = SQLDatabaseHelper.GetSqlConnection("LeapCreditConnectionString"))
            {
                SqlCommand cmd = new SqlCommand();
                cmd.Connection  = objConnection;
                cmd.CommandText = "sp_Step1Insert_LeapCreditApplication";//@FirstName,@LastName,@Email,@Phone,@activation_code,@ApplyFromIPAddress,@ApplyTime
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add("@First_Name", SqlDbType.NVarChar);
                cmd.Parameters["@First_Name"].Value = applyModel.First_Name == null ? "" : applyModel.First_Name;
                cmd.Parameters.Add("@Last_Name", SqlDbType.NVarChar);
                cmd.Parameters["@Last_Name"].Value = applyModel.Last_Name == null ? "" : applyModel.Last_Name;
                cmd.Parameters.Add("@Email", SqlDbType.NVarChar);
                cmd.Parameters["@Email"].Value = applyModel.Email == null ? "" : applyModel.Email;
                cmd.Parameters.Add("@Loan_Amount", SqlDbType.NVarChar);
                cmd.Parameters["@Loan_Amount"].Value = applyModel.Loan_Amount == null ? "" : applyModel.Loan_Amount;
                cmd.Parameters.Add("@Paycheck_Period", SqlDbType.NVarChar);
                cmd.Parameters["@Paycheck_Period"].Value = applyModel.Paycheck_Period == null ? "" : applyModel.Paycheck_Period;
                cmd.Parameters.Add("@Gross_Income_per_Paycheck", SqlDbType.NVarChar);
                cmd.Parameters["@Gross_Income_per_Paycheck"].Value = applyModel.Gross_Income_per_Paycheck == null ? "" : applyModel.Gross_Income_per_Paycheck;

                cmd.Parameters.Add("@SubmitFromBtn", SqlDbType.NVarChar);
                cmd.Parameters["@SubmitFromBtn"].Value = applyModel.SubmitFromBtn == null ? "" : applyModel.SubmitFromBtn;
                cmd.Parameters.Add("@SubmitTime", SqlDbType.NVarChar);
                cmd.Parameters["@SubmitTime"].Value = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                //cmd.ExecuteNonQuery();
                //cmd.ExecuteReader();

                try
                {
                    SqlDataReader reader = cmd.ExecuteReader();
                    while (reader.Read())
                    {
                    }
                }
                catch (Exception ex)
                {
                }
            }
        }
Esempio n. 3
0
        public ActionResult Step2(LeapCreditApplicationForm1 modelForm1, FormCollection collection)
        {
            if (ModelState.IsValid)
            {
                LeapCreditApplication applyModel = new LeapCreditApplication();
                applyModel.First_Name                = modelForm1.First_Name;
                applyModel.Last_Name                 = modelForm1.Last_Name;
                applyModel.SubmitFromBtn             = "Step1NextBtn";
                applyModel.Loan_Amount               = collection["amount"];
                applyModel.Paycheck_Period           = modelForm1.Paycheck_Period;
                applyModel.Gross_Income_per_Paycheck = modelForm1.Gross_Income_per_Paycheck;
                applyModel.Email = modelForm1.Email;


                TempData["Loan_Amount"]               = applyModel.Loan_Amount;
                TempData["Paycheck_Period"]           = modelForm1.Paycheck_Period;
                TempData["Gross_Income_per_Paycheck"] = modelForm1.Gross_Income_per_Paycheck;
                //List<LeapCreditApplication> file_to_DMS_List = new List<LeapCreditApplication>();
                //file_to_DMS_List = SQLDatabase.GetAllLeapCreditApplication_bySSN(model.SSN);

                //if (file_to_DMS_List.Count == 1)
                //{
                //    LeapCreditApplication jc_model = file_to_DMS_List[0];
                //    //applyModel.SubmitFromIPAddress = HttpContext.ApplicationInstance.Context.Request.RequestContext.HttpContext.Request.UserHostAddress;

                //}

                SQLDatabase.InsertStep1Insert_LeapCreditApplication(applyModel);

                //string redirectUrl = "https://clearoneadvantage.com/thank-you.php?Lead_ID=3&button.x=141&formurl=https%3A%2F%2Fwww.clearoneadvantage.com%2Fapply.php&token=16acfaefb1814e93fef8f32e8a6c15f4&lastname=Benjamin&ldsrc=3&xxLeadId=05bmsztg7&button.y=12&firstname=Daniel&emailaddress=dbenjamin%40lendingsciencedm.com&state=FL&debt=30000&homephone=9419625605";
                //string redirectUrl = "https://clearoneadvantage.com/thank-you.php?Lead_ID=3&button.x=141&formurl=https%3A%2F%2Fwww.clearoneadvantage.com%2Fapply.php&token=16acfaefb1814e93fef8f32e8a6c15f4&lastname=" + applyModel.LastName + "&ldsrc=3&xxLeadId=05bmsztg7&button.y=12&firstname=" + applyModel.FirstName + "&emailaddress=" + applyModel.Email + "&state=" + applyModel.State + "&debt=" + applyModel.DebtAmount + "&homephone=" + applyModel.Phone + "";
                //Response.RedirectPermanent(redirectUrl);
                LeapCreditApplicationForm2 modelForm2 = new Models.LeapCreditApplicationForm2();
                return(View("Step2", modelForm2));
            }
            else
            {
                return(View("Index", modelForm1));
            }
        }
Esempio n. 4
0
        public static void InsertStep3_LeapCreditApplication(LeapCreditApplication applyModel)
        {
            using (SqlConnection objConnection = SQLDatabaseHelper.GetSqlConnection("LeapCreditConnectionString"))
            {
                SqlCommand cmd = new SqlCommand();
                cmd.Connection  = objConnection;
                cmd.CommandText = "sp_Step3Insert_LeapCreditApplication";//@FirstName,@LastName,@Email,@Phone,@activation_code,@ApplyFromIPAddress,@ApplyTime
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.Add("@First_Name", SqlDbType.NVarChar);
                cmd.Parameters["@First_Name"].Value = applyModel.First_Name == null ? "" : applyModel.First_Name;
                cmd.Parameters.Add("@Last_Name", SqlDbType.NVarChar);
                cmd.Parameters["@Last_Name"].Value = applyModel.Last_Name == null ? "" : applyModel.Last_Name;
                cmd.Parameters.Add("@Email", SqlDbType.NVarChar);
                cmd.Parameters["@Email"].Value = applyModel.Email == null ? "" : applyModel.Email;
                cmd.Parameters.Add("@Loan_Amount", SqlDbType.NVarChar);
                cmd.Parameters["@Loan_Amount"].Value = applyModel.Loan_Amount == null ? "" : applyModel.Loan_Amount;
                cmd.Parameters.Add("@Paycheck_Period", SqlDbType.NVarChar);
                cmd.Parameters["@Paycheck_Period"].Value = applyModel.Paycheck_Period == null ? "" : applyModel.Paycheck_Period;
                cmd.Parameters.Add("@Gross_Income_per_Paycheck", SqlDbType.NVarChar);
                cmd.Parameters["@Gross_Income_per_Paycheck"].Value = applyModel.Gross_Income_per_Paycheck == null ? "" : applyModel.Gross_Income_per_Paycheck;

                cmd.Parameters.Add("@ck_ACH_Authorization", SqlDbType.NVarChar);
                cmd.Parameters["@ck_ACH_Authorization"].Value = applyModel.ck_ACH_Authorization == null ? "" : applyModel.ck_ACH_Authorization.ToString();
                cmd.Parameters.Add("@Mobile_Number1", SqlDbType.NVarChar);
                cmd.Parameters["@Mobile_Number1"].Value = applyModel.Mobile_Number1 == null ? "" : applyModel.Mobile_Number1;
                cmd.Parameters.Add("@Mobile_Number2", SqlDbType.NVarChar);
                cmd.Parameters["@Mobile_Number2"].Value = applyModel.Mobile_Number2 == null ? "" : applyModel.Mobile_Number2;
                cmd.Parameters.Add("@Mobile_Number3", SqlDbType.NVarChar);
                cmd.Parameters["@Mobile_Number3"].Value = applyModel.Mobile_Number3 == null ? "" : applyModel.Mobile_Number3;
                cmd.Parameters.Add("@Secondary_Phone_Number1", SqlDbType.NVarChar);
                cmd.Parameters["@Secondary_Phone_Number1"].Value = applyModel.Secondary_Phone_Number1 == null ? "" : applyModel.Secondary_Phone_Number1;
                cmd.Parameters.Add("@Secondary_Phone_Number2", SqlDbType.NVarChar);
                cmd.Parameters["@Secondary_Phone_Number2"].Value = applyModel.Secondary_Phone_Number2 == null ? "" : applyModel.Secondary_Phone_Number2;
                cmd.Parameters.Add("@Secondary_Phone_Number3", SqlDbType.NVarChar);
                cmd.Parameters["@Secondary_Phone_Number3"].Value = applyModel.Secondary_Phone_Number3 == null ? "" : applyModel.Secondary_Phone_Number3;
                cmd.Parameters.Add("@Address", SqlDbType.NVarChar);
                cmd.Parameters["@Address"].Value = applyModel.Address == null ? "" : applyModel.Address;
                cmd.Parameters.Add("@Address2", SqlDbType.NVarChar);
                cmd.Parameters["@Address2"].Value = applyModel.Address2 == null ? "" : applyModel.Address2;
                cmd.Parameters.Add("@City", SqlDbType.NVarChar);
                cmd.Parameters["@City"].Value = applyModel.City == null ? "" : applyModel.City;
                cmd.Parameters.Add("@State", SqlDbType.NVarChar);
                cmd.Parameters["@State"].Value = applyModel.State == null ? "" : applyModel.State;
                cmd.Parameters.Add("@Zip_Code", SqlDbType.NVarChar);
                cmd.Parameters["@Zip_Code"].Value = applyModel.Zip_Code == null ? "" : applyModel.Zip_Code;
                cmd.Parameters.Add("@Date_of_Birth", SqlDbType.NVarChar);
                cmd.Parameters["@Date_of_Birth"].Value = applyModel.Date_of_Birth == null ? "" : applyModel.Date_of_Birth;
                cmd.Parameters.Add("@Current_Military", SqlDbType.NVarChar);
                cmd.Parameters["@Current_Military"].Value = applyModel.Current_Military == null ? "" : applyModel.Current_Military.ToString();

                cmd.Parameters.Add("@Drivers_License_NO", SqlDbType.NVarChar);
                cmd.Parameters["@Drivers_License_NO"].Value = applyModel.Drivers_License_NO == null ? "" : applyModel.Drivers_License_NO.ToString();
                cmd.Parameters.Add("@SSN1", SqlDbType.NVarChar);
                cmd.Parameters["@SSN1"].Value = applyModel.SSN1 == null ? "" : applyModel.SSN1.ToString();
                cmd.Parameters.Add("@SSN2", SqlDbType.NVarChar);
                cmd.Parameters["@SSN2"].Value = applyModel.SSN2 == null ? "" : applyModel.SSN2.ToString();
                cmd.Parameters.Add("@SSN3", SqlDbType.NVarChar);
                cmd.Parameters["@SSN3"].Value = applyModel.SSN3 == null ? "" : applyModel.SSN3.ToString();
                cmd.Parameters.Add("@Job_Title", SqlDbType.NVarChar);
                cmd.Parameters["@Job_Title"].Value = applyModel.Job_Title == null ? "" : applyModel.Job_Title.ToString();
                cmd.Parameters.Add("@Employer", SqlDbType.NVarChar);
                cmd.Parameters["@Employer"].Value = applyModel.Employer == null ? "" : applyModel.Employer.ToString();
                cmd.Parameters.Add("@Time_Employed_year", SqlDbType.NVarChar);
                cmd.Parameters["@Time_Employed_year"].Value = applyModel.Time_Employed_year == null ? "" : applyModel.Time_Employed_year.ToString();
                cmd.Parameters.Add("@Time_Employed_month", SqlDbType.NVarChar);
                cmd.Parameters["@Time_Employed_month"].Value = applyModel.Time_Employed_month == null ? "" : applyModel.Time_Employed_month.ToString();
                cmd.Parameters.Add("@Supervisor_Phone_Number1", SqlDbType.NVarChar);
                cmd.Parameters["@Supervisor_Phone_Number1"].Value = applyModel.Supervisor_Phone_Number1 == null ? "" : applyModel.Supervisor_Phone_Number1.ToString();
                cmd.Parameters.Add("@Supervisor_Phone_Number2", SqlDbType.NVarChar);
                cmd.Parameters["@Supervisor_Phone_Number2"].Value = applyModel.Supervisor_Phone_Number2 == null ? "" : applyModel.Supervisor_Phone_Number2.ToString();
                cmd.Parameters.Add("@Supervisor_Phone_Number3", SqlDbType.NVarChar);
                cmd.Parameters["@Supervisor_Phone_Number3"].Value = applyModel.Supervisor_Phone_Number3 == null ? "" : applyModel.Supervisor_Phone_Number3.ToString();
                cmd.Parameters.Add("@Employer_Addresss", SqlDbType.NVarChar);
                cmd.Parameters["@Employer_Addresss"].Value = applyModel.Employer_Addresss == null ? "" : applyModel.Employer_Addresss.ToString();
                cmd.Parameters.Add("@Employer_City", SqlDbType.NVarChar);
                cmd.Parameters["@Employer_City"].Value = applyModel.Employer_City == null ? "" : applyModel.Employer_City.ToString();
                cmd.Parameters.Add("@Employer_State", SqlDbType.NVarChar);
                cmd.Parameters["@Employer_State"].Value = applyModel.Employer_State == null ? "" : applyModel.Employer_State.ToString();
                cmd.Parameters.Add("@Employer_Zip_Code", SqlDbType.NVarChar);
                cmd.Parameters["@Employer_Zip_Code"].Value = applyModel.Employer_Zip_Code == null ? "" : applyModel.Employer_Zip_Code.ToString();
                cmd.Parameters.Add("@Purpose_for_Loan", SqlDbType.NVarChar);
                cmd.Parameters["@Purpose_for_Loan"].Value = applyModel.Purpose_for_Loan == null ? "" : applyModel.Purpose_for_Loan.ToString();
                cmd.Parameters.Add("@How_did_you_hear_about_LeapCredit", SqlDbType.NVarChar);
                cmd.Parameters["@How_did_you_hear_about_LeapCredit"].Value = applyModel.How_did_you_hear_about_LeapCredit == null ? "" : applyModel.How_did_you_hear_about_LeapCredit.ToString();



                cmd.Parameters.Add("@SubmitFromBtn", SqlDbType.NVarChar);
                cmd.Parameters["@SubmitFromBtn"].Value = applyModel.SubmitFromBtn == null ? "" : applyModel.SubmitFromBtn;
                cmd.Parameters.Add("@SubmitTime", SqlDbType.NVarChar);
                cmd.Parameters["@SubmitTime"].Value = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                //cmd.ExecuteNonQuery();
                //cmd.ExecuteReader();

                try
                {
                    SqlDataReader reader = cmd.ExecuteReader();
                    while (reader.Read())
                    {
                    }
                }
                catch (Exception ex)
                {
                }
            }
        }