예제 #1
0
        private void barButsanpham_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FormSanPham sp = new FormSanPham();

            sp.MdiParent = this;
            sp.Show();
        }
예제 #2
0
        public void LoadData(FormSanPham fsp)
        {
            var sp = data.Database().SANPHAMs.ToList();

            fsp.gridControlSanPham.DataSource = sp;
            //Load Mã Sản Phẩm
            int dem    = 10;
            int kyso   = (int)data.Database().RETURN_KYSO("SP");
            int lenght = kyso.ToString().Length;

            dem = dem - 2 - lenght;
            string kq = "SP";

            for (int i = 1; i <= dem; i++)
            {
                kq += "0";
            }
            fsp.txtmasanpham.Text = kq + kyso.ToString();
        }