public void QueryExecuteChanged() { QueryIsEnabled = false; currtime = DayDate.ToString("yyyy-MM-dd") + " " + TrrigerTime + ".000"; EachDealHistoryList = httpHelper.GetEachDealHistory(_tick.FuturesViewModel.ContractCode, _tick.FuturesViewModel.ProductCode, pageSize, currtime, 2).ConvertAll(b => new EachDealHistoryDetailViewModel(b, _tick)).OrderBy(o => o.OrderByTime).ToList(); QueryIsEnabled = true; }
public async Task <IActionResult> AddDayDate(NewDayDateModel model) { var dayDate = new DayDate { DayOfWeek = model.DayOfWeek, ClassDate = model.ClassDate, }; await _dayDateService.AddDayDate(dayDate); return(RedirectToAction("Index", "DayDate")); }
public async Task AddDayDate(DayDate dayDate) { _context.Add(dayDate); await _context.SaveChangesAsync(); }
} //FOLD00 // Вставка строк входного файла в БД public bool InsertAll(CCommand Command, string BankCode) //fold00 { string CmdText = CAbc.EMPTY , DebitIBAN = CAbc.EMPTY , CreditIBAN = CAbc.EMPTY , DebitMoniker = CAbc.EMPTY , CreditMoniker = CAbc.EMPTY; int LineNum = 0; bool Result = true; FieldValues[FLD_DEBITMFO] = BankCode; FieldValues[FLD_CREDITMFO] = BankCode; if (!Reader.Open(FileName, CharSet)) { Reader.Close(); return(false); } while (Reader.Read()) { LineNum++; PrepareFields(); DebitMoniker = FieldValues[FLD_DEBITACC].Replace("'", "`").Trim(); CreditMoniker = FieldValues[FLD_CREDITACC].Replace("'", "`").Trim(); if (DebitMoniker[0] > '9') { DebitIBAN = DebitMoniker; DebitMoniker = CAbc.EMPTY; } if (CreditMoniker[0] > '9') { CreditIBAN = CreditMoniker; CreditMoniker = CAbc.EMPTY; } CConsole.ShowBox(CAbc.EMPTY, " Загружается строка" + __.StrI(LineNum, 5) + " ", CAbc.EMPTY); CmdText = "exec dbo.pMega_OpenGate_AddPalvis " + " @TaskCode = '" + TASK_CODE + "'" + ",@DayDate = "+ DayDate.ToString() + ",@BranchCode = ''" + ",@FileName = '" + CleanFileName + "'" + ",@LineNum = " + LineNum.ToString() + ",@SourceCode = '" + FieldValues[FLD_DEBITMFO].Replace("'", "`").Trim() + "'" + ",@DebitMoniker = '" + DebitMoniker + "'" + ",@DebitState = '" + FieldValues[FLD_DEBITSTATE].Replace("'", "`").Trim() + "'" + ",@DebitIBAN = '" + DebitIBAN + "'" + ",@DebitName = '" + FieldValues[FLD_DEBITNAME].Replace("'", "`").Trim() + "'" + ",@TargetCode = '" + FieldValues[FLD_CREDITMFO].Replace("'", "`").Trim() + "'" + ",@CreditMoniker= '" + CreditMoniker + "'" + ",@CreditState = '" + FieldValues[FLD_CREDITSTATE].Replace("'", "`").Trim() + "'" + ",@CreditIBAN = '" + CreditIBAN + "'" + ",@CreditName = '" + FieldValues[FLD_CREDITNAME].Replace("'", "`").Trim() + "'" + ",@CrncyAmount = " + FieldValues[FLD_SUMA].Replace(" ", CAbc.EMPTY).Trim() + ",@CurrencyId = " + FieldValues[FLD_CURRENCY].Replace("'", "`").Trim() + ",@Purpose = '" + FieldValues[FLD_PURPOSE].Replace("'", "`").Replace("?", "i").Trim() + "'" + ",@Code = '" + FieldValues[FLD_CODE].Replace("'", "`").Trim() + "'" + ",@Ctrls = ''" + ",@UserName = '******'" ; if (!Command.Execute(CmdText)) { Result = false; } } CConsole.Clear(); CConsole.ShowBox(CAbc.EMPTY, " Подождите...", CAbc.EMPTY); Command.Execute(" exec pMega_OpenGate_PayRoll;2 " + " @FileName='" + CleanFileName + "'" + ", @DayDate=" + DayDate.ToString() ); CConsole.Clear(); Reader.Close(); return(Result); } //FOLD00