public void Change5()
        {
            HoaDonTCDAL dal = new HoaDonTCDAL();

            TenKH = dal.GetPrintMaKH(Convert.ToInt32(SIM));
            Sosim = dal.GetPrintSim(Convert.ToInt32(SIM));
        }
        private void simpleButton3_Click(object sender, EventArgs e)
        {
            HoaDonTCDAL dal    = new HoaDonTCDAL();
            var         result = dal.Load();

            hoaDonTinhCuocThangsBindingSource.DataSource = result;
            txtidsim.Clear();
            txtthanhtien.Clear();
            txttongtien.Clear();
            cbngay.Checked = false;
        }
        public HoaDonTC()
        {
            InitializeComponent();
            // This line of code is generated by Data Source Configuration Wizard
            // Instantiate a new DBContext
            //Model.EFModel.QLCuocDTContext dbContext = new Model.EFModel.QLCuocDTContext();
            //// Call the Load method to get the data for the given DbSet from the database.
            //dbContext.HoaDonTinhCuocs.Load();
            //// This line of code is generated by Data Source Configuration Wizard
            txtcuoctb.Text = "50000";
            dtngay.Value   = System.DateTime.Now;
            HoaDonTCDAL dal    = new HoaDonTCDAL();
            var         result = dal.Load();

            hoaDonTinhCuocThangsBindingSource.DataSource = result;
            // This line of code is generated by Data Source Configuration Wizard
            // Instantiate a new DBContext
        }
Beispiel #4
0
        public ChiTietHDTC(string idsim, string idhd)
        {
            InitializeComponent();
            HoaDonTCDAL    dal = new HoaDonTCDAL();
            ChiTietHDTCDAL dao = new ChiTietHDTCDAL();

            txtidsim.Text = dal.GetPrintSim(Convert.ToInt32(idsim));
            txtmakh.Text  = dal.GetPrintMaKH(Convert.ToInt32(idsim));
            idsim1        = idsim;
            // This line of code is generated by Data Source Configuration Wizard
            // Instantiate a new DBContext
            //Model.EFModel.QLCuocDTContext dbContext = new Model.EFModel.QLCuocDTContext();
            //// Call the Load method to get the data for the given DbSet from the database.
            //dbContext.ChitietHDTCs.Load();
            // This line of code is generated by Data Source Configuration Wizard

            // This line of code is generated by Data Source Configuration Wizard
            // Instantiate a new DBContext

            // This line of code is generated by Data Source Configuration Wizard
            var a = Convert.ToInt32(idhd);

            chiTietHDTCsBindingSource.DataSource = dao.Load(a);
        }
 private void simpleButton4_Click(object sender, EventArgs e)
 {
     if (txtidsim.Text == "" && cbngay.Checked == false)
     {
         MessageBox.Show("Vui lòng chọn thông tin cần tìm", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         string a = "";
         if (cbngay.Checked == true)
         {
             a = "true";
         }
         else
         {
             a = "false";
         }
         HoaDonTCDAL dal    = new HoaDonTCDAL();
         var         result = dal.TimHD(SIM, dtngay.Value.ToString("yyyy/MM/dd"), a);
         hoaDonTinhCuocThangsBindingSource.DataSource = result;
         MessageBox.Show("Tìm thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         Clear();
     }
 }