コード例 #1
0
 private void toolStripStatus_ThemMoi_Click(object sender, EventArgs e)
 {
     for (int j = 0; j < 1000; j++)
     {
         if (BaoDong == "")
         {
             frmXuLy_HoaDonNhap fr = new frmXuLy_HoaDonNhap("Insert");
             fr.ShowDialog();
             SelectData();
         }
         else
         {
             BaoDong = "";
             break;
         }
     }
 }
コード例 #2
0
 private void dgvHienThi_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     BaoDong = "";
     for (int j = 0; j < 1000; j++)
     {
         if (BaoDong == "")
         {
             frmXuLy_HoaDonNhap fr = new frmXuLy_HoaDonNhap("Update", getDatagridview());
             fr.ShowDialog();
             SelectData();
         }
         else
         {
             BaoDong = "";
             break;
         }
     }
 }
コード例 #3
0
 private void dgvHienThi_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     BaoDong = "";
     for (int j = 0; j < 1000; j++)
     {
         if (BaoDong == "")
         {
             frmXuLy_HoaDonNhap fr = new frmXuLy_HoaDonNhap("Update", getDatagridview());
             fr.ShowDialog();
             SelectData();
         }
         else
         {
             BaoDong = "";
             break;
         }
     }
 }
コード例 #4
0
 private void toolStripStatus_Sua_Click(object sender, EventArgs e)
 {
     BaoDong = "";
     for (int j = 0; j < 1000; j++)
     {
         if (BaoDong == "")
         {
             frmXuLy_HoaDonNhap fr = new frmXuLy_HoaDonNhap("Update", getDatagridview());
             fr.ShowDialog();
             SelectData();
         }
         else
         {
             BaoDong = "";
             break;
         }
     }
 }
コード例 #5
0
        private void frmXuLy_NhapMua_Load(object sender, EventArgs e)
        {
            chekChonLoai.Checked = false;
            toolStrip_txtTracuu.Focus();
            toolStrip_txtTracuu.Text = "";
            //doc du lieu dong
            makNgaydonhang.Text  = new Common.Utilities().XuLy(2, DateTime.Today.ToString());
            makHanthanhtoan.Text = new Common.Utilities().XuLy(2, DateTime.Today.ToString());
            frmXuLy_HoaDonNhap fr = new frmXuLy_HoaDonNhap();

            this.cbxDieuKienThanhToan.Items.AddRange(new object[] { "Thanh toán ngay", "Thanh toán từng phần", "Mua nợ" });
            this.cbxDieuKienThanhToan.Text = "Chọn loại thanh toán";
            this.cbxHinhthucthanhtoan.Items.AddRange(new object[] { "Tiền mặt", "Séc", "VISA", "MASTER CARD", "AMEX", "CONNECT", "JCB" });
            this.cbxHinhthucthanhtoan.Text = "Chọn hình thức thanh toán";

            LayKhoHang();
            LayTenTT();

            if (hanhdong == "Insert")
            {
                getID("HoaDonNhap");
                txtManhacungcap.ReadOnly            = false;
                btnTimnhacungcap.Enabled            = true;
                toolStripStatus_Ghilai.Enabled      = false;
                toolStripStatus_Themmoi.Enabled     = true;
                Application.OpenForms[fr.Name].Text = "Quản lý hóa đơn nhập - Thêm hóa đơn nhập";
            }
            if (hanhdong == "Update")
            {
                txtMadondathang.ReadOnly            = true;
                btnTimMadatmuahang.Enabled          = false;
                txtManhacungcap.ReadOnly            = true;
                btnTimnhacungcap.Enabled            = false;
                toolStripStatus_Ghilai.Enabled      = true;
                toolStripStatus_Themmoi.Enabled     = false;
                Application.OpenForms[fr.Name].Text = "Quản lý hóa đơn nhập - Sửa hóa đơn nhập";
                DoDuLieu(this.hoadon);
                if (txtSodonhang.Text.Length > 0)
                {
                    HienThi_ChiTiet_HoaDonNhap(txtMadondathang.Text.ToUpper());
                }
            }
        }
コード例 #6
0
 private void toolStripStatus_ThemMoi_Click(object sender, EventArgs e)
 {
     for (int j = 0; j < 1000; j++)
     {
         if (BaoDong == "")
         {
             frmXuLy_HoaDonNhap fr = new frmXuLy_HoaDonNhap("Insert");
             fr.ShowDialog();
             SelectData();
         }
         else
         {
             BaoDong = "";
             break;
         }
     }
 }
コード例 #7
0
 private void toolStripStatus_Sua_Click(object sender, EventArgs e)
 {
     BaoDong = "";
     for (int j = 0; j < 1000; j++)
     {
         if (BaoDong == "")
         {
             frmXuLy_HoaDonNhap fr = new frmXuLy_HoaDonNhap("Update", getDatagridview());
             fr.ShowDialog();
             SelectData();
         }
         else
         {
             BaoDong = "";
             break;
         }
     }
 }
コード例 #8
0
        private void frmXuLy_NhapMua_Load(object sender, EventArgs e)
        {
            chekChonLoai.Checked = false;
            toolStrip_txtTracuu.Focus();
            toolStrip_txtTracuu.Text = "";
            //doc du lieu dong
            makNgaydonhang.Text = new Common.Utilities().XuLy(2, DateTime.Today.ToString());
            makHanthanhtoan.Text = new Common.Utilities().XuLy(2, DateTime.Today.ToString());
            frmXuLy_HoaDonNhap fr = new frmXuLy_HoaDonNhap();
            this.cbxDieuKienThanhToan.Items.AddRange(new object[] { "Thanh toán ngay", "Thanh toán từng phần", "Mua nợ" });
            this.cbxDieuKienThanhToan.Text = "Chọn loại thanh toán";
            this.cbxHinhthucthanhtoan.Items.AddRange(new object[] { "Tiền mặt", "Séc", "VISA", "MASTER CARD", "AMEX", "CONNECT", "JCB" });
            this.cbxHinhthucthanhtoan.Text = "Chọn hình thức thanh toán";

            LayKhoHang();
            LayTenTT();

            if (hanhdong == "Insert")
            {
                getID("HoaDonNhap");
                txtManhacungcap.ReadOnly = false;
                btnTimnhacungcap.Enabled = true;
                toolStripStatus_Ghilai.Enabled = false;
                toolStripStatus_Themmoi.Enabled = true;
                Application.OpenForms[fr.Name].Text = "Quản lý hóa đơn nhập - Thêm hóa đơn nhập";
            }
            if (hanhdong == "Update")
            {
                txtMadondathang.ReadOnly = true;
                btnTimMadatmuahang.Enabled = false;
                txtManhacungcap.ReadOnly = true;
                btnTimnhacungcap.Enabled = false;
                toolStripStatus_Ghilai.Enabled = true;
                toolStripStatus_Themmoi.Enabled = false;
                Application.OpenForms[fr.Name].Text = "Quản lý hóa đơn nhập - Sửa hóa đơn nhập";
                DoDuLieu(this.hoadon);
                if (txtSodonhang.Text.Length > 0)
                {
                    HienThi_ChiTiet_HoaDonNhap(txtMadondathang.Text.ToUpper());
                }
            }
        }