예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var    ws    = new wsClass();
            string pesan = ws.cekLogin("", "");

            MessageBox.Show(pesan);
        }
예제 #2
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);
        }
예제 #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            var fm = new fileMan();


            var ws = new wsClass();

            string[] pesan = fm.getFile(outbox);
            string   pes   = ws.invokeProd("", "", pesan[0]);

            MessageBox.Show(pes);
        }
예제 #4
0
        private void btLogin_Click(object sender, EventArgs e)
        {
            string user = txtUser.Text;
            string pass = txtPass.Text;

            if (user == "" || pass == "")
            {
                MessageBox.Show("Username dan Password belum di isi");
            }
            else
            {
                pbLoading.Visible = true;
                try
                {
                    var      ws     = new wsClass();
                    string   pesan  = ws.cekLogin(user, pass);
                    string[] respon = pesan.Split('|');
                    string   pes    = "";
                    pbLoading.Visible = false;
                    if (respon[0] == "failed")
                    {
                        MessageBox.Show("Login Gagal");
                    }
                    else
                    {
                        //MessageBox.Show("Login Berhasil");
                        Main frm = new Main();
                        this.Hide();
                        frm.Show();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString());
                    pbLoading.Visible = false;
                }
            }
        }
예제 #5
0
        private void button4_Click(object sender, EventArgs e)
        {
            //string e = "";
            var fm = new fileMan();
            var ws = new wsClass();

            string[] files = fm.getFile(outbox);
            string   pes   = "";

            string[] fName = null;
            if (files != null && files.Length > 0)
            {
                foreach (string i in files)
                {
                    try
                    {
                        pes = ws.invokeProd("", "", i);
                    }
                    catch (Exception ex)
                    {
                        System.Console.WriteLine(ex);
                    }
                    //string[] has = pes.Split('|');
                    //fName = i.Split('\\');
                    string namaFile = "";// fName[fName.Length - 1];
                    System.Console.WriteLine(namaFile + " " + pes);
                    //if (has[0] == "failed")
                    //{
                    //    fm.moveFile(i, "c:\\tes\\error\\");
                    //}
                    //else
                    //{
                    //    fm.moveFile(i, "c:\\tes\\success\\");
                    //}
                }
            }
        }