Ejemplo n.º 1
0
 public override string ToString()
 {
     return(RequestDate.ToString("yyyy-MM-dd HH:mm:ss.ffff") + "|"
            + ClientIP + "|"
            + ClientBrowser + "|"
            + PostData + "|"
            + IsBotRequest);
 }
Ejemplo n.º 2
0
 public override void AfterConstruction()
 {
     base.AfterConstruction();
     RequestDate     = DateTime.Now;
     RequestBy       = Session.GetObjectByKey <Employee>(Session.GetKeyValue(SecuritySystem.CurrentUser));
     Status          = RequisitonStatus.Pending;
     RequisitionCode = string.Format("R{0}", RequestDate.ToString("yyMMddHHmmssfff"));
     CreateDate      = DateTime.Now;
 }
 protected override string GetDownloadUrl()
 {
     return($"http://www.nbrb.by/Services/XmlExRates.aspx?ondate={RequestDate.ToString("MM'/'dd'/'yyyy")}");
 }
Ejemplo n.º 4
0
 protected override string GetDownloadUrl()
 {
     return($"https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?date={RequestDate.ToString("yyyyMMdd")}");
 }
 protected override string GetDownloadUrl()
 {
     return($"https://nationalbank.kz/rss/get_rates.cfm?fdate={RequestDate.ToString("dd'.'MM'.'yyyy")}");
 }
 public override string ToString()
 {
     return(string.Format("Record amounts to EUR {1}, sent to {3}, is labelled [{2}] and was created on {0}", RequestDate.ToString(), Amount, Description, Name));
 }
Ejemplo n.º 7
0
        public void InsertRequest(SqlConnection con, ref User user)
        {
            string        commandText = $"Select UserId from User_Table where User_Table.Login = {user.Login}";
            SqlCommand    command     = new SqlCommand(commandText, con);
            SqlDataReader reader      = command.ExecuteReader();

            while (reader.Read())
            {
                user.UserId = (int)(reader.GetValue("UserId"));
            }
            reader.Close();

            Credit_Status = this.DecisionForRequest();
            RequestDate   = DateTime.Now;

            string insertSqlCommand = string.Format($"insert into Request_Table([UserId],[ClGender],[CreditSum],[CreditAim],[CreditTerm],[MaritalStatus],[ClientAge],[ClientEarning],[PhoneNumber],[ClosedCreditCount],[DelayCreditCount],[Credit_Status],[Nationality],[RequestDate]) Values('{user.UserId}','{user.Gender}','{CreditSum}','{CreditAim}','{CreditTerm}','{MaritalStatus}','{ClientAge}','{ClientEarning}','{PhoneNumber}','{user.ClosedCreditCount}','{user.DelayCreditCount}','{Credit_Status}','{Nationality}','{RequestDate.ToString("MM/dd/yyyy")}')");

            command = new SqlCommand(insertSqlCommand, con);
            var result = command.ExecuteNonQuery();

            if (result > 0)
            {
                Console.WriteLine("Запрос отправлен!");
            }
            Console.WriteLine($"Ваш кредит  {Credit_Status.ToUpper()}");
            if (Credit_Status == "принят")
            {
                this.RepayMentSchedule();
            }
        }
 protected override string GetDownloadUrl()
 {
     return($"http://www.cbr.ru/scripts/XML_daily.asp?date_req={RequestDate.ToString("dd'/'MM'/'yyyy")}&d=0");
 }