void LoadInfor()
        {
            DataTable phieuno = SQL_CongNo.Display_PhieuNo();

            txtSoPhieuNo.Text = phieuno.Rows.Count.ToString();
            int tongtien = 0;

            for (int i = 0; i < phieuno.Rows.Count; i++)
            {
                tongtien = tongtien + int.Parse(phieuno.Rows[i][3].ToString());
            }
            txtTongTien.Text = tongtien.ToString();
        }
Example #2
0
        private void gridView1_CustomRowCellEditForEditing(object sender, DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventArgs e)
        {
            /// load chi tiết phiếu nợ

            /// mã  stt nợ
            Temp.Temp_PhieuNoID = gridView1.GetRowCellValue(e.RowHandle, "STT_No").ToString();
            // lấy mã phiếu nhập
            DataTable bangno = SQL_CongNo.Display_PhieuNo();

            for (int i = 0; i < bangno.Rows.Count; i++)
            {
                if (Temp.Temp_PhieuNoID == bangno.Rows[i][0].ToString())
                {
                    Temp.Temp_PhieuNhapHangID = bangno.Rows[i][1].ToString();
                }
            }
            Form_ChiTietPhieuNo dlg2 = new Form_ChiTietPhieuNo();

            dlg2.ShowDialog();
        }
Example #3
0
        void check_TinhTrangNo()
        {
            DataTable check = SQL_CongNo.Display_PhieuNo();

            for (int i = 0; i < check.Rows.Count; i++)
            {
                if (Temp.Temp_PhieuNoID == check.Rows[i][0].ToString())
                {
                    // MessageBox.Show(check.Rows[i][4].ToString());
                    if (check.Rows[i][4].ToString() == "True")
                    {
                        btnThanhToan.Enabled = false;
                        txtDaThanhToan.Text  = check.Rows[i][3].ToString();
                    }
                    else
                    {
                        btnThanhToan.Enabled = true;
                    }
                }
            }
        }
 void display()
 {
     gridControl1.DataSource = SQL_CongNo.Display_PhieuNo();
     fixHeaderName();
 }