示例#1
0
        private void button7_Click(object sender, EventArgs e)
        {
            if (id == 0)
            {
                MessageBox.Show("No Entry Detected");
            }
            else if (desc == "Electricity - Excess" || desc == "Water - Excess")
            {
                MessageBox.Show("Cannot void this entry");
            }

            else
            {
                authorizearch ch = new authorizearch();
                ch.a3 = this;
                DialogResult result = ch.ShowDialog();
                if (result == DialogResult.Yes)
                {
                    DialogResult dialogResult = MessageBox.Show("Confirm Void?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                    if (dialogResult == DialogResult.Yes)
                    {
                        string quer = "update misc_transaction set mt_trans_stat = 2 , mt_void_date =" +
                                      " '" + DateTime.Now.ToString("yyyy-M-d") + "',mt_void_loggedin = " + FmLogin.id + " where mtrans_ID = " + id + "";
                        c1.insert(quer);



                        tablecall();
                    }
                }
            }
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (id == 0)
            {
                MessageBox.Show("No Entry Detected");
            }

            else
            {
                authorizearch ch = new authorizearch();
                ch.a3 = this;
                DialogResult result = ch.ShowDialog();
                if (result == DialogResult.Yes)
                {
                    DialogResult dialogResult = MessageBox.Show("Confirm Void?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                    if (dialogResult == DialogResult.Yes)
                    {
                        string quer = "update room_item set ritem_void_stat = 1 , ritem_archive_date =" +
                                      " '" + DateTime.Now.ToString("yyy-M-d") + "', ritem_archive_loggedin = " + FmLogin.id + " where ritem_ID = " + id + "";
                        c.insert(quer);

                        tablecall();
                    }
                }
            }
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            authorizearch ch = new authorizearch();

            ch.a3 = this;
            DialogResult result = ch.ShowDialog();

            if (result == DialogResult.Yes)
            {
                DialogResult dialogResult = MessageBox.Show("Confirm Archive?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                if (dialogResult == DialogResult.Yes)
                {
                    string quer = "update nonborrowable_item set nitem_stat = 1 , nt_archive_date =" +
                                  " '" + DateTime.Now.ToString("yyy-M-d") + "', nt_archive_loggedin = " + FmLogin.id + " where nitem_ID = " + id + "";
                    c1.insert(quer);

                    txtuin.Text   = "";
                    textBox7.Text = "";
                    txtuit.Text   = "";

                    tablecall();
                }
            }
        }
示例#4
0
        private void button5_Click(object sender, EventArgs e)
        {
            if (ida == 0)
            {
                MessageBox.Show("No Entry Detected");
            }

            else
            {
                authorizearch ch = new authorizearch();
                ch.a3 = this;
                DialogResult result = ch.ShowDialog();
                if (result == DialogResult.Yes)
                {
                    DialogResult dialogResult = MessageBox.Show("Confirm Void?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                    if (dialogResult == DialogResult.Yes)
                    {
                        string quer = "update nitem_transaction set nt_trans_stat = 2 , nt_archive_date =" +
                                      " '" + DateTime.Now.ToString("yyyy-M-d") + "', nt_archived_loggedin = " + FmLogin.id + " where ntrans_ID = " + ida + "";
                        c1.insert(quer);

                        if (type == "Stock-in")
                        {
                            string    quer2    = "select nt_quantity from nonborrowable_item where nitem_ID = '" + id2 + "'";
                            DataTable d        = c1.select(quer2);
                            string    quantity = d.Rows[0]["nt_quantity"].ToString();
                            int       quan     = int.Parse(quantity);
                            quan = quan - int.Parse(nt_quan);
                            string quer3 = "update nonborrowable_item set nt_quantity = '" + quan.ToString() + "' where nitem_ID = " + id2 + "";
                            c1.insert(quer3);
                        }
                        else
                        {
                            string    quer2    = "select nt_quantity from nonborrowable_item where nitem_ID = '" + id2 + "'";
                            DataTable d        = c1.select(quer2);
                            string    quantity = d.Rows[0]["nt_quantity"].ToString();
                            int       quan     = int.Parse(quantity);
                            quan = quan + int.Parse(nt_quan);
                            string quer3 = "update nonborrowable_item set nt_quantity = '" + quan.ToString() + "' where nitem_ID = " + id2 + "";
                            c1.insert(quer3);
                        }

                        tablecall();
                    }
                }
            }
        }
示例#5
0
        private void button5_Click(object sender, EventArgs e)
        {
            if (ida == 0)
            {
                MessageBox.Show("No Entry Detected");
            }

            else
            {
                authorizearch ch = new authorizearch();
                ch.a3 = this;
                DialogResult result = ch.ShowDialog();
                if (result == DialogResult.Yes)
                {
                    DialogResult dialogResult = MessageBox.Show("Confirm Void?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                    if (dialogResult == DialogResult.Yes)
                    {
                        string quer = "update bitem_transaction set bt_trans_stat = 2 , bt_archive_date =" +
                                      " '" + DateTime.Now.ToString("yyy-M-d") + "', bt_archive_loggedin = " + FmLogin.id + " where btrans_ID = " + id + "";
                        c1.insert(quer);

                        string quer2 = "update borrowable_item set bitem_status = 'Available' where bitem_ID = " + id2 + "";
                        c1.insert(quer2);

                        string    quer3   = "select Profile_balance from profile where user_ID = '" + id3 + "'";
                        DataTable d       = c1.select(quer3);
                        string    balance = d.Rows[0]["Profile_balance"].ToString();
                        double    bal     = double.Parse(balance);
                        double    rt      = double.Parse(rate);
                        bal = bal - rt;
                        string quer4 = "update profile set Profile_balance = '" + bal.ToString() + "' where User_id = " + id3 + "";
                        c1.insert(quer4);

                        tablecall();
                    }
                }
            }
        }
        private void button7_Click(object sender, EventArgs e)
        {
            if (tid2 == 0)
            {
                MessageBox.Show("No Entry Detected");
            }
            else if (res_stat == 1)
            {
                MessageBox.Show("Cannot void resolved charges");
            }
            else
            {
                string    quer = "select * from uespecs_partial where uesp_uelectspecs_id = " + tid2 + "";
                DataTable d    = c1.select(quer);
                if (d.Rows.Count > 0)
                {
                    MessageBox.Show("Cannot void charges with partial payments");
                }

                else
                {
                    authorizearch ch = new authorizearch();
                    ch.a3 = this;
                    DialogResult result = ch.ShowDialog();
                    if (result == DialogResult.Yes)
                    {
                        DialogResult dialogResult = MessageBox.Show("Confirm Void?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                        if (dialogResult == DialogResult.Yes)
                        {
                            quer = "update uelect_trans_specs set uet_trans_stat = 2, uet_void_date = '" + DateTime.Now.ToString("yyyy-M-d") + "', uet_void_loggedin = " + FmLogin.id + " where uet_ID = " + tid2 + "";
                            c1.insert(quer);
                            tablecall2();
                        }
                    }
                }
            }
        }