Esempio n. 1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            konversi kon = new konversi();
            wsClass  ws  = new wsClass();
            //string str = ws.cekLogin("adminkomdn", "ediimdn");
            string str = ws.cekLoginUoi("adminuoi", "adminuoi1");

            //string str = kon.strToTxt("5659|9033|2019|9533156626|4|01.01.2019||01.01.2019||996001665|21105542|SODIUM ISETHIONATE AQUEOUS SOLUTION 57%|-14.076.900|261|KG|01.01.2019|AMRULLA_Y500|T73A||03:11:33|||||");
            MessageBox.Show(str);
        }
Esempio n. 2
0
        public int xlsToTxt(string filePath, string ext)
        {
            ISheet   Sheet = null;
            int      i     = 2;
            konversi kon   = new konversi();
            string   pes   = "";

            try
            {
                Sheet = fileMan.get_sheet_file_object(filePath, ext);
            }
            catch (Exception e)
            {
                Console.WriteLine("1 " + e);
            }
            int    x = 4, k = 0, rowcount = 1;
            string kal = "";

            while (i <= Sheet.LastRowNum)
            {
                try
                {
                    IRow row = Sheet.GetRow(i);
                    if (row == null)
                    {
                        kal = "";
                    }
                    else
                    {
                        int   mul = 26 - row.LastCellNum;
                        ICell c   = row.GetCell(15);
                        if (c != null)
                        {
                            if (c.ToString() == "261")
                            {
                                for (k = 2; k < row.LastCellNum; k++)
                                {
                                    c = row.GetCell(k);
                                    if (c == null)
                                    {
                                        kal = kal + "|";
                                    }
                                    else
                                    {
                                        kal = kal + c.ToString().Trim() + "|";
                                    }
                                }
                                kal = kal + Tabs(mul);
                                rowcount++;
                            }
                        }
                    }
                }catch (Exception e)
                {
                    Console.WriteLine("2 " + e);
                    kal = "";
                }
                if (kal != "")
                {
                    Console.WriteLine(rowcount + " " + kal);
                    pes = kon.strToTxt(kal);
                }
                kal = "";
                i++;
            }
            return(rowcount);
        }