private void button33_Click(object sender, EventArgs e) { string ChecksPath = @"C:\aloha\check\discount\tmp\check"; PDiscountCard.AllChecks myAllChecks = new PDiscountCard.AllChecks(); myAllChecks = PDiscountCard.CloseCheck.ReadAllChecks(ChecksPath + @"\hamster.xml"); MessageBox.Show("Нал " + myAllChecks.GetShtrihBalanse(true).Nal + " Возвр Нал " + myAllChecks.GetShtrihBalanse(true).VozvrNal); MessageBox.Show("Card " + myAllChecks.GetShtrihBalanse(true).Card + " Возвр card " + myAllChecks.GetShtrihBalanse(true).VozvrCard); //MessageBox.Show(myAllChecks.Checks.Where(a=>!a.IsNal).Sum(a=>a.Summ).ToString()); //MessageBox.Show(myAllChecks.Checks.Where(a => !a.IsNal && a.Waiter==9267).Sum(a => a.Summ).ToString()); }
private void button41_Click(object sender, EventArgs e) { PDiscountCard.ArcusSlips As = PDiscountCard.Arcus2DataFromXML.ReadArcusSlips(); string ChecksPath = @"C:\aloha\check\discount\tmp\check"; PDiscountCard.AllChecks myAllChecks = new PDiscountCard.AllChecks(); myAllChecks = PDiscountCard.CloseCheck.ReadAllChecks(ChecksPath + @"\hamster.xml"); foreach (PDiscountCard.ArcusSlip item in As.Slips) { if (myAllChecks.Checks.Where(a => a.Summ == item.Sum / 100).Count() == 0) { MessageBox.Show(item.RRN + Environment.NewLine + item.Sum); } } //MessageBox.Show(As.Slips.Sum(s => s.Sum).ToString()); //MessageBox.Show(myAllChecks.Checks.Where(a=>!a.IsNal).Sum(a=>a.Summ).ToString()); //MessageBox.Show(myAllChecks.Checks.Where(a => !a.IsNal && a.Waiter == 9267).Sum(a => a.Summ).ToString()); }
private void button45_Click(object sender, EventArgs e) { string ChecksPath = @"C:\aloha\check\discount\tmp\check"; PDiscountCard.AllChecks myAllChecks = new PDiscountCard.AllChecks(); myAllChecks = PDiscountCard.CloseCheck.ReadAllChecks(ChecksPath + @"\hamster.xml"); //PDiscountCard.AllChecks myAllChecks2 = PDiscountCard.CloseCheck.ReadAllChecks(ChecksPath + @"\hamster2.xml"); //myAllChecks.AddRange(myAllChecks2.Checks); MessageBox.Show(myAllChecks.GetShtrihBalanse(true).Nal.ToString()); /* * using(StreamWriter sw = new StreamWriter (ChecksPath +@"\1.txt")) * { * foreach (PDiscountCard.Check chk in myAllChecks.Checks.OrderBy(a=>a.Summ)) * { * if (chk.Summ!=0) * { * sw.WriteLine(chk.Summ); * } * } * } * */ }