private void btnAdd_Click(object sender, EventArgs e) { BSFrmAddNutrient frm = new BSFrmAddNutrient(this); frm.TopLevel = false; frm.AutoScroll = true; this.Controls.Add(frm); frm.FormBorderStyle = FormBorderStyle.None; frm.IsUpdate = false; frm.Show(); }
private void btnEdit_Click(object sender, EventArgs e) { BSFrmAddNutrient frm = new BSFrmAddNutrient(this); frm.mealName = mealName_inFrmNutrient; frm.mealCalories = mealCalories_inFrmNutrient; frm.TopLevel = false; frm.AutoScroll = true; this.Controls.Add(frm); frm.FormBorderStyle = FormBorderStyle.None; frm.detail = detail; frm.dto = dto; frm.IsUpdate = true; frm.Show(); }