private void BSave_Click(object sender, RoutedEventArgs e) { if (dpDate1.SelectedDate.Value > DateTime.Today) { MSGW msgw = new MSGW(); msgw.Owner = this; msgw.SetMessage("!תנועה עם תאריך עתידי"); msgw.ShowDialog(); return; } if (Check()) { t.Date1 = dpDate1.SelectedDate.Value.DateToINT_YYYYMMDD(); if (m.Date1 < t.Date1) { m.Date1 = t.Date1; } if (t.Mode == "New") { t.LoadNum = DB_Provider.GetLoadNum(); t.Batch1 = UTILS.GetBatch1(dpDate1.SelectedDate.Value); Create(); } else { UpDdate(); } this.Close(); this.Owner.Activate(); return; } }
public static List <Transaction> LoadCSV2Transaction(string FilePath) { List <Transaction> LTs = new List <Transaction>(); List <RecCSV> LRC = File.ReadAllLines(FilePath) .Skip(1) .Select(v => RecCSV.FromCsv(v)) .ToList(); if (LRC != null) { LRC.ForEach(x => LTs.Add(x.Convet2Transaction())); } var Batch1 = UTILS.GetBatch1(DateTime.Now); LTs.ForEach(x => x.Batch1 = Batch1); LTs.ForEach(x => x.Status = "פעיל"); return(LTs); }
private void TbTrnQTY_PreviewTextInput(object sender, TextCompositionEventArgs e) { UTILS.Decimal_PreviewTextInput(sender, e); }