Ejemplo n.º 1
0
        void AddItem(Weighing it)
        {
            if (it.DateGross == DateTime.MinValue && it.DateTare == DateTime.MinValue)
            {
                return;
            }
            string Autor = string.Empty;

            if (it.WeighmanGross != string.Empty)
            {
                Autor += ArhlistWeighman.First(x => x.Code == it.WeighmanGross).Name;
            }
            if (it.WeighmanTare != string.Empty)
            {
                Autor += "/";
                Autor += ArhlistWeighman.First(x => x.Code == it.WeighmanTare).Name;
            }
            string Tovar = "";

            if (it.MaterialFact != string.Empty)
            {
                Tovar = ArhlistMaterial.First(x => x.Code == it.MaterialFact).Name;
            }
            string CarName   = string.Empty;
            string CarNumber = string.Empty;

            CarName   = ArhlistCars.First(x => x.Code == it.Autotruck).Carbrand;
            CarNumber = ArhlistCars.First(x => x.Code == it.Autotruck).CarNumber;



            var arrstr = new[] { it.Code.ToString("D9"),
                                 it.DateGross > it.DateTare? it.DateGross.ToString("dd MM yyyy HH:mm:ss"): it.DateTare.ToString("dd MM yyyy HH:mm:ss"),
                                 Autor,
                                 it.WeighingMode == EWeighingMode.Cross_Tare? "Брутто_Тара":"Тара_Брутто",
                                 Tovar,
                                 it.WeightGross.ToString(),
                                 it.NetWeight.ToString(),
                                 it.WeightTara.ToString(),
                                 CarName,
                                 CarNumber,
                                 it.DateGross != DateTime.MinValue && it.DateTare != DateTime.MinValue? "ДА":"НЕТ" };
            ListViewItem item = new ListViewItem(arrstr);

            item.Tag = it;
            listViewOperation.Items.Add(item);
        }
Ejemplo n.º 2
0
 public Form1(Weighing _rec)
 {
     InitializeComponent();
     rec = _rec;
     Init();
 }
Ejemplo n.º 3
0
 public Form1()
 {
     InitializeComponent();
     rec = new Weighing();
 }