Ejemplo n.º 1
0
        private void SuaMon_Load(object sender, EventArgs e)
        {
            ThucDon.ModuleThucDon thucDon = new ThucDon.ModuleThucDon();
            DataTable dt = thucDon.LoadThucDonTheoMaMonAn(MaMonAn);
            ThucDon.ModuleThucDon thucdon = new ThucDon.ModuleThucDon();
            pictureBox1.Image = global::VietRestaurant2._0.Properties.Resources._5564116;
            //load danh muc da chon
            DataTable dtDanhMuc = thucdon.LoadDanhMucNhomDanhMucThucDon();
            comboTreeDanhMuc.DataSource = dtDanhMuc;
            comboTreeDanhMuc.ValueMember = "MaDanhMuc";
            int MaDanhMuc = Convert.ToInt32(dt.Rows[0][5].ToString());
            comboTreeDanhMuc.SelectedValue = MaDanhMuc;
            txtThucDon.Text = dt.Rows[0][1].ToString();
            txtGiaBan.Text = dt.Rows[0][3].ToString();
            try
            {
                pictureBox1.Image = byeArrayToImage((byte[])dt.Rows[0][4]);
            }
            catch (Exception)
            {

            }
            LoadDonVi();
            comboTreeDonVi.SelectedValue = dt.Rows[0][2].ToString();
        }
Ejemplo n.º 2
0
        private void ThemMon_Load(object sender, EventArgs e)
        {
            try
            {
                ThucDon.ModuleThucDon thucdon = new ThucDon.ModuleThucDon();
                //load danh muc da chon
                DataTable dtDanhMuc = thucdon.LoadDanhMucNhomDanhMucThucDon();
                comboTreeDanhMuc.DataSource = dtDanhMuc;
                comboTreeDanhMuc.ValueMember = "MaDanhMuc";
                comboTreeDanhMuc.SelectedValue = MaDanhMuc;
                pictureBox1.Image = global::VietRestaurant2._0.Properties.Resources._5564116;
                LoadDonVi();
                panelEx1.Visible = false;
            }
            catch (Exception)
            {

            }
        }