Beispiel #1
0
        private void simpleButton3_Click(object sender, EventArgs e)
        {
            panelmain2.Controls.Clear();
            HoaDonTC f = new HoaDonTC();

            f.TopLevel = false;
            panelmain2.Controls.Add(f);
            f.Show();
        }
Beispiel #2
0
        public ThongtinKH(ThongTinHDDK ff, DangKySIM gg, HoaDonTC hh)
        {
            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.KhachHangs.Load();
            //// This line of code is generated by Data Source Configuration Wizard

            var result = dal.Load();

            //khachHangsBindingSource.DataSource = result;
            if (ff == null && hh == null)
            {
                g = gg;
            }
            else if (gg == null && hh == null)
            {
                f = ff;
            }
            else if (gg == null && ff == null)
            {
                h = hh;
            }

            // 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.KhachHangs.Load();
            //// This line of code is generated by Data Source Configuration Wizard
            //khachHangsBindingSource1.DataSource = dbContext.KhachHangs.Local.ToBindingList();
            //// 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.KhachHangs.Load();
            //// This line of code is generated by Data Source Configuration Wizard
            //khachHangsBindingSource.DataSource = dbContext.KhachHangs.Local.ToBindingList();

            // 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.KhachHangs.Load();
            //// This line of code is generated by Data Source Configuration Wizard
            //khachHangsBindingSource1.DataSource = dbContext.KhachHangs.Local.ToBindingList();
            // 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.KhachHangs.Load();
            // This line of code is generated by Data Source Configuration Wizard
            khachHangsBindingSource1.DataSource = result;
        }
        public ThongtinSIM(HoaDonTC ff)
        {
            InitializeComponent();
            // This line of code is generated by Data Source Configuration Wizard
            // Instantiate a new DBContext
            SIMDAL dal = new SIMDAL();

            var res = dal.Load();

            // This line of code is generated by Data Source Configuration Wizard
            sIMsBindingSource2.DataSource = res;

            f = ff;
        }