Exemple #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (lsvShow.Items.Count > 0)
     {
         double TongMoney = 0;
         for (int i = 0; i < lsvShow.Items.Count; i++)
         {
             TongMoney += Upadte.ChangeStringToDigit(lsvShow.Items[i].SubItems[8].Text);
         }
         MessageBox.Show("Tổng Tiền Ngân Hàng Phải Trả : " + TongMoney);
     }
 }
Exemple #2
0
        private void btnRepair_Click(object sender, EventArgs e)
        {
            if (lsvShow.Items.Count != 0 && NameSelecting != null)
            {
                Upadte FrmCapnhat = new Upadte();
                FrmCapnhat.ShowDialog();
                //duyet Listview
                if (NameSelecting != Upadte.NameFormupdate)
                {
                    for (int i = 0; i < lsvShow.Items.Count; i++)
                    {
                        if (lsvShow.Items[i].SubItems[1].Text == NameSelecting && CMNDSelecting == lsvShow.Items[i].SubItems[2].Text)
                        {
                            lsvShow.Items[i].SubItems[1].Text = Upadte.NameFormupdate;
                        }
                    }
                }
                else
                {
                    lsvShow.Items[indexListview].SubItems[1].Text = NameSelecting;
                }

                lsvShow.Items[indexListview].SubItems[3].Text = Depostsiting;
                if (Buttonradio == 1)
                {
                    lsvShow.Items[indexListview].SubItems[4].Text = "Term Book";
                    lsvShow.Items[indexListview].SubItems[6].Text = han;
                    lsvShow.Items[indexListview].SubItems[7].Text = Lai;
                }
                else
                {
                    lsvShow.Items[indexListview].SubItems[4].Text = "Non-Term Book";
                    lsvShow.Items[indexListview].SubItems[6].Text = "không xác định";
                    lsvShow.Items[indexListview].SubItems[7].Text = "1 %";
                }
            }
        }