Exemplo n.º 1
0
 private void btnprint_Click(object sender, EventArgs e)
 {
     if (txtid.Text != "")
     {
         GUI_Review f = new GUI_Review(txtid.Text);
         f.ShowDialog();
     }
     else
     {
         MessageBox.Show("Select a bill to print");
     }
 }
Exemplo n.º 2
0
        private void createbillbutton(object sender, EventArgs e)
        {
            bool create = db.Authorities.Single(x => x.AccountID == getAccount && x.NameOfAuthority == "Manage Invoice").Create;

            if (create == true)
            {
                string sum = sumExtension();
                if (sum == "")
                {
                    string rs = bus.createBilldetail(lstbilldetail, txtamount, txtsl, txtinmoney, txtoutmoney, txtbranch, txtpos, txtuser);
                    if (rs != "false")
                    {
                        MessageBox.Show("Create Bill successfully");
                        GUI_Review f = new GUI_Review(rs);
                        f.ShowDialog();
                        lstbilldetail.Rows.Clear();
                        txtsl.Text       = "0";
                        txtamount.Text   = "0";
                        txtoutmoney.Text = "0";
                        txtinmoney.Text  = "";
                        txtproduct.Text  = "";
                    }
                    else
                    {
                        MessageBox.Show("Create Bill unsuccessfully");
                    }
                }
                else
                {
                    MessageBox.Show(sum);
                }
            }
            else
            {
                MessageBox.Show("Your account do not have the authority to create Invoice!");
            }
        }