コード例 #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (sec == 2)
            {
                if (Properties.Settings.Default.first == true)
                {
                    ProductKey ProductKey = new ProductKey();
                    ProductKey.Show();
                }
                else
                {
                    Sqlite.LoadCompany();
                    Sqlite.LoadHeaderDataSet();
                    StartPage startpage = new StartPage();
                    startpage.username.Items.Insert(0, "--Select Username--");
                    startpage.username.SelectedIndex = 0;
                    try
                    {
                        SQLiteConnection scn = new SQLiteConnection(@"data source = main.db");
                        scn.Open();
                        SQLiteCommand sq;

                        sq = new SQLiteCommand("select * from user", scn);
                        SQLiteDataReader dr = sq.ExecuteReader();
                        //int id = 1;
                        while (dr.Read())
                        {
                            startpage.username.Items.Add(dr["username"]);
                        }
                        scn.Close();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString());
                    }

                    startpage.Show();
                }
                timer1.Enabled = false;
                this.Hide();
            }
            else
            {
                sec++;
            }
        }
コード例 #2
0
        private void Pay_Load(object sender, EventArgs e)
        {
            tempFileNo = fileno.Text;
            tempPayer  = payer.Text;

            payer.Items.AddRange(Sqlite.LoadClients());
            fileno.Items.AddRange(Sqlite.LoadFiles(payer.Text));

            //SQLiteConnection scn = new SQLiteConnection(@"data source = main.db");
            //scn.Open();

            //SQLiteCommand sq = new SQLiteCommand("select received, remarks from pay where fileno = '" + fileno.Text + "' and receivecheck = '1'", scn);
            //SQLiteDataReader dr = sq.ExecuteReader();

            //while (dr.Read())
            //{
            //    receive.Text = dr["received"].ToString();
            //    remarks.Text = dr["remarks"].ToString();
            //}

            //scn.Close();
        }
コード例 #3
0
 private void ReceivingServices_Load(object sender, EventArgs e)
 {
     fileno.Items.AddRange(Sqlite.LoadFiles());
     payer.Items.AddRange(Sqlite.LoadClients());
 }
コード例 #4
0
 private void DebitNote_Load(object sender, EventArgs e)
 {
     nameBox.Items.AddRange(Sqlite.LoadClients());
 }
コード例 #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     Sqlite.ExportToExcel("DebitNote.csv", listView1);
 }
コード例 #6
0
 private void ReceivedFiles_Load(object sender, EventArgs e)
 {
     nameBox.Items.AddRange(Sqlite.LoadClients());
 }
コード例 #7
0
 private void button1_Click(object sender, EventArgs e)
 {
     Sqlite.ExportToExcel("AccountRegester.csv", listView1);
 }
コード例 #8
0
 private void button4_Click(object sender, EventArgs e)
 {
     namebox.Items.Clear();
     namebox.Items.AddRange(Sqlite.LoadClients());
 }
コード例 #9
0
 private void NewFile_Load(object sender, EventArgs e)
 {
     refreshlist();
     namebox.Items.AddRange(Sqlite.LoadClients());
 }
コード例 #10
0
 private void payer_SelectedIndexChanged(object sender, EventArgs e)
 {
     fileno.Items.AddRange(Sqlite.LoadFiles(payer.Text));
 }
コード例 #11
0
 private void OfficePay_Load(object sender, EventArgs e)
 {
     payer.Items.AddRange(Sqlite.LoadClients());
     fileno.Items.AddRange(Sqlite.LoadFiles());
 }