private void LoadCategory() { categoryLogic = new CategoryModel(); ddlCategory.DataSource = categoryLogic.GetCategoryList(); ddlCategory.DataTextField = "Name"; ddlCategory.DataValueField = "CategoryID"; ddlCategory.DataBind(); }
private void LoadCategory() { categoryLogic = new CategoryModel(); if (!Page.IsPostBack) { ddlFilter.DataSource = categoryLogic.GetCategoryList(); ddlFilter.DataTextField = "Name"; ddlFilter.DataValueField = "CategoryID"; ddlFilter.DataBind(); } }
public void LoadData() { categoryLogic = new CategoryModel(); int CountCategory = CategoryModel.TotalRecord; int StartRowIndex = 0; LoadPagingControl(CountCategory); StartRowIndex = (CurrentPage * pagingControl.PageSize) - (pagingControl.PageSize - 1) - 1; lstCategory.DataSource = categoryLogic.GetCategoryList(StartRowIndex, pagingControl.PageSize); lstCategory.DataBind(); }
private void LoadCategory() { categoryLogic = new CategoryModel(); rpCategory.DataSource = categoryLogic.GetCategoryList(); rpCategory.DataBind(); }
private void LoadData() { if (Type == 1) { userLogic = new UsersModel(); userLogic = userLogic.GetUserById(UserID); usergroupLogic = new GroupModel(); txtUsername.Text = userLogic.Username; txtEmail.Text = userLogic.Email; txtPassword.Text = userLogic.Password; txtPoint.Text = userLogic.Point.ToString(); ddlGroup.DataSource = usergroupLogic.GetGroupList(); ddlGroup.DataTextField = "Name"; ddlGroup.DataValueField = "GroupID"; ddlGroup.DataBind(); ddlGroup.SelectedIndex = userLogic.GroupID - 1; } else if (Type == 2) { usergroupLogic = new GroupModel(); usergroupLogic = usergroupLogic.GetGroupById(GroupID); txtName.Text = usergroupLogic.Name; txtDescription.Text = usergroupLogic.Description; cbIsLimit.Checked = usergroupLogic.IsLimit; txtDownLimit.Text = usergroupLogic.DownloadLimit.ToString(); } else if (Type == 3) { categoryLogic = new CategoryModel(); categoryLogic = categoryLogic.GetCategoryById(CategoryID); txtCategoryName.Text = categoryLogic.Name; } else if (Type == 4) { categoryLogic = new CategoryModel(); docLogic = new DocumentModel(); docLogic = docLogic.GetDocumentById(DocID); txtDocName.Text = docLogic.Name; txtDocLink.Text = docLogic.Link; cbIsError.Checked = docLogic.IsError; ddlDocCategory.DataSource = categoryLogic.GetCategoryList(); ddlDocCategory.DataTextField = "Name"; ddlDocCategory.DataValueField = "CategoryID"; ddlDocCategory.DataBind(); ddlDocCategory.SelectedIndex = docLogic.CategoryID - 1; txtDocDescription.Text = docLogic.Description; } else if (Type == 5) { collectionLogic = new CollectionModel(); collectionLogic = collectionLogic.GetCollectionById(CollectionID); txtCollectionName.Text = collectionLogic.Name; txtCollectionDesc.Text = collectionLogic.Description; cbIsCollectionError.Checked = collectionLogic.IsError; } }