コード例 #1
0
        public List <FormirList> FormirListExcel(string[,] mas, int strok)
        {
            FormirList        str;
            List <FormirList> listExcel = new List <FormirList>();

            for (int i = 0; i < strok; i++)
            {
                str          = new FormirList();
                str.name     = mas[i, 0].ToString();
                str.strihKod = mas[i, 1].ToString();
                str.shkaf    = mas[i, 2].ToString();
                str.polka    = mas[i, 3].ToString();
                str.kol_vo   = Convert.ToInt32(mas[i, 3]);
                listExcel.Add(str);
            }
            return(listExcel);
        }
コード例 #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            groupBox3.Visible = true;
            path = Directory.GetCurrentDirectory() + "\\" + DateTime.Now.ToFileTime();
            DirectoryInfo dirInfo = new DirectoryInfo(path);

            dirInfo.Create();
            FormirList        List  = new FormirList();
            List <FormirList> list1 = List.FormirListExcel(label1.Text);
            List <FormirList> list2 = List.FormirListExcel(label2.Text);
            Lists             op1   = new Lists();

            op1.list1 = list1.Where(x => x.id1 != 0).ToList();
            op1.list2 = list2.Where(x => x.id1 != 0).ToList();
            Lists op = NaFullSovpadenie(list1, list2);

            op = NaOdinnakovoeStrihkodPolka(op.list1, op.list2);

            op1.doc1 = op.doc1;
            op1.doc2 = op.doc2;
            IzmKolvoVFiles(op1);
            MessageBox.Show("Готово");
        }