protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); int id = ConvertUtility.ToInt32(Request.QueryString["id"]); if (id > 0) { XepLoaiNhomInfo info = XepLoaiNhomController.GetInfo(id); if (info != null) { dropNhom.SelectedValue = info.IDNhomNhanVien.ToString(); dropXepLoai.SelectedValue = info.IDXepLoai.ToString(); txtMin.Text = info.Min.ToString(); txtMax.Text = info.Max.ToString(); } } else { btnUpdate.Visible = false; } dgrXepLoaiNhom.DataSource = XepLoaiNhomController.GetAll(); dgrXepLoaiNhom.DataBind(); }
protected void btnThemMoi_Click(object sender, EventArgs e) { XepLoaiNhomInfo info = new XepLoaiNhomInfo(); info.IDNhomNhanVien = ConvertUtility.ToInt32(dropNhom.SelectedValue); info.IDXepLoai = ConvertUtility.ToInt32(dropXepLoai.SelectedValue); info.Min = ConvertUtility.ToInt32(txtMin.Text); info.Max = ConvertUtility.ToInt32(txtMax.Text); XepLoaiNhomController.Insert(info); }
protected void btnUpdate_Click(object sender, EventArgs e) { int id = ConvertUtility.ToInt32(Request.QueryString["id"]); XepLoaiNhomInfo info = new XepLoaiNhomInfo(); info.ID = id; info.IDNhomNhanVien = ConvertUtility.ToInt32(dropNhom.SelectedValue); info.IDXepLoai = ConvertUtility.ToInt32(dropXepLoai.SelectedValue); info.Min = ConvertUtility.ToInt32(txtMin.Text); info.Max = ConvertUtility.ToInt32(txtMax.Text); XepLoaiNhomController.Update(info); }
public abstract void UpdateXepLoaiNhom(XepLoaiNhomInfo _XepLoaiNhomInfo);
public abstract int InsertXepLoaiNhom(XepLoaiNhomInfo _XepLoaiNhomInfo);