Esempio n. 1
0
        public void uploadAndCreate(string cid)
        {
            ClientC c      = new ClientC();
            Client  client = c.FindClient(cid);

            client.MiddleProcess = "2";
            c.UpdateClient(client);
            SendEmailC send    = new SendEmailC();
            Client     c1      = c.FindClient(cid);
            UserC      u       = new UserC();
            string     message = "Client: " + c1.Mail + " " + c1.MobileNum + " " + c1.Fname + " " + c1.Lname + "Send he reports";

            send.SendEmailF(u.FindNeedEmail("Manager", cid), "Report Of " + c1.Fname + " " + c1.Lname, message);
        }
Esempio n. 2
0
 protected void sendEB_Click(object sender, EventArgs e)
 {
     try
     {
         SendEmailC send = new SendEmailC();
         send.SendEmailF(email.Value, subject.Value, message.Value);
     }
     catch (Exception ex)
     {
         error.Text = ex.Message;
     }
     error.Text    = "The Email Was Sent Successfully";
     email.Value   = "";
     message.Value = "";
     subject.Value = "";
 }
Esempio n. 3
0
 public void Submit(Loans1 l, string status, string uid)
 {
     if (status == "Client")
     {
         ClientC interc = new ClientC();
         if (interc.FindIfClientHasLoan(l.ClientId))
         {
             //ClientGlobal global = new ClientGlobal();
             UpdateLoan1(FindLoan1ByClient(l.ClientId));
             throw new Exception("The First Stage Has Been Successfully Updated");
         }
         else
         {
             Loans1 l1 = new Loans1(FindLoan1ByClient(l.ClientId));
             l.Id = l1.Id;
             CreatLoans1(l);
             UserC      u       = new UserC();
             SendEmailC send    = new SendEmailC();
             ClientC    c       = new ClientC();
             Client     c1      = c.FindClient(uid);
             string     message = "Client: " + c1.Mail + " " + c1.MobileNum + " " + c1.Fname + " " + c1.Lname + "Want a loan";
             send.SendEmailF(u.FindNeedEmail("Manager", uid), "Ask For Loan" + c1.Fname + " " + c1.Lname, message);
         }
     }
     else
     {
         //status will be the employee id
         UpdateLoan1(FindLoan1ByClient(l.ClientId));
         ClientGlobal global = new ClientGlobal();
         Client       c      = global.FindClient(l.ClientId);
         if (c.MiddleProcess == "1")
         {
             c.MiddleProcess = "1app";
             global.UpdateClient(c);
         }
         SendEmailC send    = new SendEmailC();
         ClientC    clientC = new ClientC();
         Client     c1      = clientC.FindClient(uid);
         string     message = "Hello " + c1.Fname + " " + c1.Lname + "We wanted to let you know that the application approved";
         send.SendEmailF(c1.Mail, "Approved Application", message);
     }
 }
Esempio n. 4
0
        public void Finish(Loans2 l)
        {
            try
            {
                if (Convert.ToInt32(l.OpenCC) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Open Credit Cards@1");
            }
            try
            {
                if (Convert.ToInt32(l.OpenRC) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Open Retail Cards@1");
            }
            try
            {
                if (Convert.ToInt32(l.OpenRELoans) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Open Real Estate Loans@1");
            }
            try
            {
                if (Convert.ToInt32(l.OpenILoans) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Open Installment Loans@1");
            }
            try
            {
                if (Convert.ToInt32(l.TotalOpenAcc) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Total Open Account@1");
            }
            try
            {
                if (Convert.ToInt32(l.AcceverLate) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Account Ever Late@1");
            }
            try
            {
                if (Convert.ToInt32(l.CollectionAcc) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Collection Account@1");
            }
            try
            {
                if (Convert.ToInt32(l.AvgAccAge.Split('/')[0]) < 1 || Convert.ToInt32(l.AvgAccAge.Split('/')[0]) > 12)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Month Of Average Account Age @1");
            }
            try
            {
                if (Convert.ToInt32(l.AvgAccAge.Split('/')[1]) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Year Of Average Account Age @1");
            }
            try
            {
                if (Convert.ToInt32(l.OldestAcc.Split('/')[0]) < 1 || Convert.ToInt32(l.AvgAccAge.Split('/')[0]) > 12)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Month Of Oldest Account @1");
            }
            try
            {
                if (Convert.ToInt32(l.OldestAcc.Split('/')[1]) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Year Of Oldest Account @1");
            }
            try
            {
                if (Convert.ToInt32(l.CRDebt) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Credit And Retail Card Debt@1");
            }
            try
            {
                if (Convert.ToInt32(l.REDebt) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Real Estate Debt@1");
            }
            try
            {
                if (Convert.ToInt32(l.ILDebt) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Installment Loans Debt@1");
            }
            try
            {
                if (Convert.ToInt32(l.CollectionDebt) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Collections Debt@1");
            }
            try
            {
                if (Convert.ToInt32(l.TDebt) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Total Debt@1");
            }
            foreach (var v in l.CAccList)
            {
                AddAccount(v);
            }
            foreach (var v in l.InqList)
            {
                AddInquiries(v);
            }
            try
            {
                if (Convert.ToInt32(l.Experian) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Experian @5");
            }
            try
            {
                if (Convert.ToInt32(l.Equifax) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Equifax@5");
            }
            try
            {
                if (Convert.ToInt32(l.TransUnio) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Trans Unio @5");
            }
            try
            {
                if (Convert.ToInt32(l.Fico2) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Fico 2 @5");
            }
            try
            {
                if (Convert.ToInt32(l.Fico8) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Fico 8 @5");
            }
            try
            {
                if (Convert.ToInt32(l.Fico3) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Fico 3 @5");
            }
            Loans2C loans2C = new Loans2C();

            loans2C.UpdateLoan2(l);
            ClientC c      = new ClientC();
            Client  client = c.FindClient(l.ClientId);

            client.MiddleProcess = "2app";
            c.UpdateClient(client);
            string     message = "We want to let you know that the report was approved";
            SendEmailC send    = new SendEmailC();

            send.SendEmailF(client.Mail, "The Report Was Approved", message);
        }
Esempio n. 5
0
        public void Send(Loans2 l)
        {
            //try
            //{
            //    if (Convert.ToInt32(l.OpenCC.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Open Credit Cards@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.OpenRC.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Open Retail Cards@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.OpenRELoans.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Open Real Estate Loans@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.OpenILoans.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Open Installment Loans@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.TotalOpenAcc.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Total Open Account@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.AcceverLate.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Account Ever Late@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.CollectionAcc.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Collection Account@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.AvgAccAge.Split('/')[0]) < 1 || Convert.ToInt32(l.AvgAccAge.Split('/')[0]) > 12)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Month Of Average Account Age @1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.AvgAccAge.Split('/')[1]) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Year Of Average Account Age @1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.OldestAcc.Split('/')[0]) < 1 || Convert.ToInt32(l.AvgAccAge.Split('/')[0]) > 12)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Month Of Oldest Account @1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.OldestAcc.Split('/')[1]) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Year Of Oldest Account @1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.CRDebt.Replace(",","")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Credit And Retail Card Debt@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.REDebt.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Real Estate Debt@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.ILDebt.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Installment Loans Debt@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.CollectionDebt.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Collections Debt@1");
            //}
            //try
            //{
            //    if (Convert.ToInt32(l.TDebt.Replace(",", "")) < 0)
            //        throw new Exception();
            //}
            //catch
            //{
            //    throw new Exception("Unavailable Total Debt@1");
            //}
            foreach (var v in l.CAccList)
            {
                AddAccount(v);
            }
            foreach (var v in l.InqList)
            {
                AddInquiries(v);
            }
            try
            {
                if (Convert.ToInt32(l.Experian.Replace(",", "")) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Experian @5");
            }
            try
            {
                if (Convert.ToInt32(l.Equifax.Replace(",", "")) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Equifax@5");
            }
            try
            {
                if (Convert.ToInt32(l.TransUnio.Replace(",", "")) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Trans Unio @5");
            }
            Loans2C loans2C = new Loans2C();

            loans2C.UpdateLoan2(l);
            ClientC c      = new ClientC();
            Client  client = c.FindClient(l.ClientId);

            client.MiddleProcess = "2napp";
            c.UpdateClient(client);
            UserC      u       = new UserC();
            SendEmailC send    = new SendEmailC();
            string     message = "We want to let you know that there are several  problrm in your report. Please enter to our system(to the report) and change them. (you will have a comments in the system about the changes)";

            send.SendEmailF(client.Mail, "The Report Of" + client.Fname + " " + client.Lname, message);
        }
Esempio n. 6
0
        public void Submit(Loans2 l)//save (update) and change the status and let the  employee knows
        {
            try
            {
                if (Convert.ToInt32(l.OpenCC) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Open Credit Cards@1");
            }
            try
            {
                if (Convert.ToInt32(l.OpenRC) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Open Retail Cards@1");
            }
            try
            {
                if (Convert.ToInt32(l.OpenRELoans) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Open Real Estate Loans@1");
            }
            try
            {
                if (Convert.ToInt32(l.OpenILoans) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Open Installment Loans@1");
            }
            try
            {
                if (Convert.ToInt32(l.TotalOpenAcc) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Total Open Account@1");
            }
            try
            {
                if (Convert.ToInt32(l.AcceverLate) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Account Ever Late@1");
            }
            try
            {
                if (Convert.ToInt32(l.CollectionAcc) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Collection Account@1");
            }
            try
            {
                if (Convert.ToInt32(l.AvgAccAge.Split('/')[0]) < 1 || Convert.ToInt32(l.AvgAccAge.Split('/')[0]) > 12)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Month Of Average Account Age @1");
            }
            try
            {
                if (Convert.ToInt32(l.AvgAccAge.Split('/')[1]) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Year Of Average Account Age @1");
            }
            try
            {
                if (Convert.ToInt32(l.OldestAcc.Split('/')[0]) < 1 || Convert.ToInt32(l.AvgAccAge.Split('/')[0]) > 12)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Month Of Oldest Account @1");
            }
            try
            {
                if (Convert.ToInt32(l.OldestAcc.Split('/')[1]) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Year Of Oldest Account @1");
            }
            try
            {
                if (Convert.ToInt32(l.CRDebt.Replace(",", "")) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Credit And Retail Card Debt@1");
            }
            try
            {
                if (Convert.ToInt32(l.REDebt.Replace(",", "")) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Real Estate Debt@1");
            }
            try
            {
                if (Convert.ToInt32(l.ILDebt.Replace(",", "")) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Installment Loans Debt@1");
            }
            try
            {
                if (Convert.ToInt32(l.CollectionDebt.Replace(",", "")) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Collections Debt@1");
            }
            try
            {
                if (Convert.ToInt32(l.TDebt.Replace(",", "")) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Total Debt@1");
            }
            foreach (var v in l.CAccList)
            {
                AddAccount(v);
            }
            foreach (var v in l.InqList)
            {
                AddInquiries(v);
            }
            try
            {
                if (Convert.ToInt32(l.Experian) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Experian @5");
            }
            try
            {
                if (Convert.ToInt32(l.Equifax) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Equifax@5");
            }
            try
            {
                if (Convert.ToInt32(l.TransUnio) < 0)
                {
                    throw new Exception();
                }
            }
            catch
            {
                throw new Exception("Unavailable Trans Unio @5");
            }
            Loans2C loans2C = new Loans2C();
            string  message = "";
            ClientC c       = new ClientC();
            Client  c1      = c.FindClient(l.ClientId);

            if (loans2C.checkIfExist(l.ClientId))
            {
                loans2C.UpdateLoan2(l);
                message = c1.Fname + " " + c1.Lname + " " + c1.Mail + " " + c1.MobileNum + " " + "Change the report";
            }
            else
            {
                loans2C.CreateLoan2(l);
                message = c1.Fname + " " + c1.Lname + " " + c1.Mail + " " + c1.MobileNum + " " + "Send report";
            }
            c1.MiddleProcess = "2";
            c.UpdateClient(c1);
            SendEmailC send = new SendEmailC();
            UserC      u    = new UserC();

            send.SendEmailF(u.FindNeedEmail("Manager", l.ClientId), "Report Of " + c1.Fname + " " + c1.Lname, message);
        }