protected override void UpdateObject() { item = (DepartmentGroup)ViewState["CurrentObject"]; item.DepartmentGroupName = TenNhomDonVi.Text.Trim(); item.DisplayOrder = ThuTuHienThi.Text.ToInteger(); item.IsShowStatistic = HienThiThongKe.Checked; DepartmentGroupServices.Update(item); }
protected override void CreateNewObject() { item = new DepartmentGroup(); item.DepartmentGroupName = TenNhomDonVi.Text.Trim(); item.DisplayOrder = ThuTuHienThi.Text.ToInteger(); item.IsShowStatistic = HienThiThongKe.Checked; DepartmentGroupServices.Create(item); }
protected override void ShowObjectInformation() { item = DepartmentGroupServices.GetById(IntId); ViewState["CurrentObject"] = item; TenNhomDonVi.Text = item.DepartmentGroupName; ThuTuHienThi.Text = item.DisplayOrder.ToString(); HienThiThongKe.Checked = item.IsShowStatistic ?? false; }
protected override void DeleteAction(string id) { foreach (var department in DepartmentServices.GetList(id.ToInteger())) { DepartmentServices.Delete(department); } DepartmentGroupServices.Delete(id.ToInteger()); }
protected override void BindValueToPageControls() { NhomDonVi.BindData(DepartmentGroupServices.GetList(), "DepartmentGroupID", "DepartmentGroupName"); }
protected override void GetDataList() { BaseCollection = DepartmentGroupServices.GetList(); }
protected void Page_Load(object sender, EventArgs e) { DanhSachNhomDonVi.BindData(DepartmentGroupServices.GetList(isShowStatistic: true)); DanhSachLoaiVanBan.BindData(DocumentCategoryServices.GetList()); }
protected override void BindOtherValue() { TuNgay.Text = new DateTime(DateTime.Now.Year, 1, 1).ToDateString(); DenNgay.Text = DateTime.Now.ToDateString(); NhomDonVi.BindData(DepartmentGroupServices.GetList(), "DepartmentGroupID", "DepartmentGroupName"); }
protected override void SetValueForBaseControls() { BaseListView = lvData; BasePager = Pager; SmallHeader.Text = $"Nhóm đơn vị: {DepartmentGroupServices.GetById(Parameters.Id).DepartmentGroupName}"; }