Ejemplo n.º 1
0
        public frm_ChonBanh(frm_DonHang parent)
        {
            InitializeComponent();
            DataColumn column;

            column = new DataColumn();

            column.DataType   = typeof(int);
            column.ColumnName = "MSB";
            tableBanh.Columns.Add(column);
            var key = new DataColumn[1];

            key[0] = column;

            column            = new DataColumn();
            column.DataType   = typeof(string);
            column.ColumnName = "TENBANH";
            tableBanh.Columns.Add(column);

            column            = new DataColumn();
            column.DataType   = typeof(int);
            column.ColumnName = "GIA";
            tableBanh.Columns.Add(column);

            column            = new DataColumn();
            column.DataType   = typeof(int);
            column.ColumnName = "SOLUONG";
            tableBanh.Columns.Add(column);

            tableBanh.PrimaryKey = key;

            this.parent = parent;
        }
Ejemplo n.º 2
0
 private void donHangToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["frm_DonHang"] == null)
     {
         frm_DonHang nv = new frm_DonHang();
         nv.MdiParent = this;
         nv.Show();
     }
     else
     {
         Application.OpenForms["frm_DonHang"].Activate();
     }
 }