public frmThemKhuyenMai(frmKhuyenMai _frm) { InitializeComponent(); InitLookUp_LoaiBang(); ReadXml_User(); gridView1.Invalidate(); gridView1.IndicatorWidth = 40; dateBatDau.DateTime = DateTime.Now; dateHetHan.DateTime = DateTime.Now; dtCreateDate.DateTime = DateTime.Now; dtable.Columns.Add("PRODUCT_ID", typeof(string)); dtable.Columns.Add("ProductName", typeof(string)); dtable.Columns.Add("ProductGroup_ID", typeof(string)); dtable.Columns.Add("DiscountPercent", typeof(double)); txtMaKM.Text = "KL" + String.Format("{0:ddMMyyyy}", dtCreateDate.DateTime); txtTenKM.Text = "Khuyến Mãi " + String.Format("{0:dd/MM/yyyy}", dtCreateDate.DateTime); frmkhuyenmai = _frm; }
public frmChinhSuaKhuyenMai(frmKhuyenMai _frm, PROMOTION makhuyenmai) { InitializeComponent(); InitLookUp_LoaiBang(); ReadXml_User(); gridView1.Invalidate(); gridView1.IndicatorWidth = 40; dateBatDau.DateTime = DateTime.Now; dateHetHan.DateTime = DateTime.Now; dtCreateDate.DateTime = DateTime.Now; objkhuyenmai = makhuyenmai; txtMaKM.Text = makhuyenmai.ID; txtTenKM.Text = makhuyenmai.Name_Promotion; objkhuyenmai = makhuyenmai; frmkhuyenmai = _frm; dtable.Columns.Add("ProductGroup_ID"); dtable.Columns.Add("Discount"); dtable.Columns.Add("DateFrom"); dtable.Columns.Add("DateTo"); gridControl1.DataSource = new PROMOTION_DETAILController().PROMOTION_DETAIL_Get(makhuyenmai.ID); }