Exemplo n.º 1
0
        private void btloadls_Click(object sender, EventArgs e)
        {
            int          r     = dgvLS.CurrentCell.RowIndex;
            string       strLH = dgvLS.Rows[r].Cells[0].Value.ToString();
            NVLSNhapHang nvlh  = new NVLSNhapHang();

            nvlh.ThemLSS(strLH, BienToanCuc.ProID, BienToanCuc.Thung, BienToanCuc.Don, BienToanCuc.GiaTong, ref err);
            Loaddata();
            MessageBox.Show("Đã Sửa Xong");
        }
Exemplo n.º 2
0
        private void btOK_Click(object sender, EventArgs e)
        {
            NVKhoHang kh = new NVKhoHang();

            kh.ThemKho(txbThemMaHH.Text, txbThemTenMH.Text, dateTimePicker1.Text, int.Parse(txbSLThung.Text), int.Parse(txbSp1Thung.Text), int.Parse(txbTongSLSPthung.Text), int.Parse(txbGiaDon.Text), int.Parse(txbGiaTong.Text), ref err);
            NVLSNhapHang ls = new NVLSNhapHang();

            ls.ThemLSS(dateTimePicker1.Text, txbThemMaHH.Text, int.Parse(txbNhapSL.Text), int.Parse(txbSp1Thung.Text), int.Parse(txbGiaTong.Text), ref err);
            this.Hide();
        }
Exemplo n.º 3
0
 private void btOK_Click(object sender, EventArgs e)
 {
     if (txbThemMaHH.Text == "" || txbThemTenMH.Text == "" || cbNCC.Text == "" || txbDVTle.Text == "" || txbSLThung.Text == "" || txbSLHangTrong1Thung.Text == "" || cbLoaiSP.Text == "" || txbSLThung.Text == "" || txbSLHangTrong1Thung.Text == "" || txbGiaCho1SP.Text == "")
     {
         MessageBox.Show("Không được để trống nội dung nào!");
     }
     else
     {
         try
         {
             NVHangHoa nvhh = new NVHangHoa();
             nvhh.ThemHangHoa(txbThemMaHH.Text, txbThemTenMH.Text, cbNCC.Text, txbDVTle.Text, float.Parse(txbGiabansi.Text), float.Parse(txbGiabanle.Text), cbLoaiSP.Text, ref err);
             NVKhoHang kh = new NVKhoHang();
             kh.ThemKho1(txbThemMaHH.Text, txbThemTenMH.Text, dateTimePicker1.Text, int.Parse(txbSLThung.Text), int.Parse(txbSLHangTrong1Thung.Text), int.Parse(txbTongSPDon.Text), int.Parse(txbGiaCho1SP.Text), int.Parse(txbGiaBanHangSi.Text), int.Parse(txbGiabansi.Text), int.Parse(txbGiabanle.Text), txbDVTle.Text, txbDVTsi.Text, int.Parse(txbTongTien.Text), ref err);
             NVLSNhapHang ls = new NVLSNhapHang();
             ls.ThemLSS(dateTimePicker1.Text, txbThemMaHH.Text, int.Parse(txbSLThung.Text), int.Parse(txbTongSPDon.Text), int.Parse(txbTongTien.Text), ref err);
             this.Hide();
         }
         catch (SqlException)
         {
             MessageBox.Show("Lỗi rồi!");
         }
     }
 }