private void Show() { int totaleItems = dl.GetInputDataListCount("True", "", "", ""); Pagination1.totalitems = totaleItems; Pagination1.limit = PageSize; Pagination1.targetpage = "record.aspx"; //技巧:利用這種方式才可以呼叫usercontrol裡的public method UserControl_Pagination uc = Pagination1; uc.showPageControls(); DataTable dt = dl.GetInputDataList("True", "", "", "", strOrderBy, PageSize, Request["page"] == null ? 1 : int.Parse(Request["page"])); GridView1.DataSource = dt; GridView1.DataBind(); DataRow row = dl.GetInOutcoco(); if (row == null) { return; } lblInput.Text = Convert.ToDouble(row["inputTotal"]).ToString("C0"); lblOutput.Text = Convert.ToDouble(row["outputTotal"]).ToString("C0"); lblTotal.Text = Convert.ToDouble(row["subTotal"]).ToString("C0"); }
private void Show() { int totaleItems = dl.GetOutputDateListCount(txtSearch.Text); Pagination1.totalitems = totaleItems; Pagination1.limit = PageSize; Pagination1.targetpage = "Output_list.aspx?ModuleID=" + Request["ModuleID"]; //技巧:利用這種方式才可以呼叫usercontrol裡的public method UserControl_Pagination uc = Pagination1; uc.showPageControls(); DataTable dt = dl.GetOutputDateList("", PageSize, Request["page"] == null ? 1 : int.Parse(Request["page"])); gvList.DataSource = dt; gvList.DataBind(); lnkAddAdmin.NavigateUrl = "Output_Insert.aspx?ModuleID=" + Request["ModuleID"]; DataRow row = dl.GetInOutcoco(); if (row == null) { return; } lblInput.Text = Convert.ToDouble(row["inputTotal"]).ToString("C0"); lblOutput.Text = Convert.ToDouble(row["outputTotal"]).ToString("C0"); lblTotal.Text = Convert.ToDouble(row["subTotal"]).ToString("C0"); }
private void Show() { int totaleItems = dl.GetInputDataListCount("True", User.Identity.Name, "", ""); Pagination1.totalitems = totaleItems; Pagination1.limit = PageSize; Pagination1.targetpage = "donation_person.aspx"; //技巧:利用這種方式才可以呼叫usercontrol裡的public method UserControl_Pagination uc = Pagination1; uc.showPageControls(); DataTable dt = dl.GetInputDataList("True", User.Identity.Name, "", "", "", PageSize, Request["page"] == null ? 1 : int.Parse(Request["page"])); Repeater1.DataSource = dt; Repeater1.DataBind(); }
private void Show() { int totaleItems = dl.GetInputDataListCount(ddlEnable.SelectedValue, ddlCustomer.SelectedValue, startDate.Text, endDate.Text); Pagination1.totalitems = totaleItems; Pagination1.limit = PageSize; Pagination1.targetpage = "Input_list.aspx?ModuleID=" + Request["ModuleID"]; //技巧:利用這種方式才可以呼叫usercontrol裡的public method UserControl_Pagination uc = Pagination1; uc.showPageControls(); DataTable dt = dl.GetInputDataList(ddlEnable.SelectedValue, ddlCustomer.SelectedValue, startDate.Text, endDate.Text, strOrderBy, PageSize, Request["page"] == null ? 1 : int.Parse(Request["page"])); gvList.DataSource = dt; gvList.DataBind(); }
private void Show() { DataLayer dl = new DataLayer(); int totaleItems = dl.GetCustomerListCount(txtSearch.Text, "0"); Pagination1.totalitems = totaleItems; Pagination1.limit = PageSize; Pagination1.targetpage = "Customer_List.aspx?ModuleID=" + Request["ModuleID"]; //技巧:利用這種方式才可以呼叫usercontrol裡的public method UserControl_Pagination uc = Pagination1; uc.showPageControls(); DataTable dt = dl.GetCustomerList(txtSearch.Text, "0", PageSize, Request["page"] == null ? 1 : int.Parse(Request["page"])); gvList.DataSource = dt; gvList.DataBind(); }
private void Show() { DataLayer dl = new DataLayer(); int totaleItems = dl.GetPublishListCount("N01", "", "", txtSearch.Text, "", DataLayer.SortMethed.OrderByInitDate, true); Pagination1.totalitems = totaleItems; Pagination1.limit = PageSize; Pagination1.targetpage = "News_List.aspx"; //技巧:利用這種方式才可以呼叫usercontrol裡的public method UserControl_Pagination uc = Pagination1; uc.showPageControls(); DataTable dt = dl.GetPublishList("N01", "", "", txtSearch.Text, "", DataLayer.SortMethed.OrderByInitDate, true, PageSize, Request["page"] == null ? 1 : int.Parse(Request["page"])); Repeater1.DataSource = dt; Repeater1.DataBind(); }
private void Show() { ListNumber dl = new ListNumber(); //int totaleItems = dl.GetPublishListCount("N01", "", "", txtSearch.Text, "", DataLayer.SortMethed.OrderByInitDate, true); int totaleItems = dl.GetListCount(tbDateFrom.Text, tbDateTo.Text); //計算總共有幾筆 Pagination1.totalitems = totaleItems; Pagination1.limit = PageSize; Pagination1.targetpage = "SysNews.aspx"; //技巧:利用這種方式才可以呼叫usercontrol裡的public method UserControl_Pagination uc = Pagination1; uc.showPageControls(); DataTable dt = dl.GetMyDataList("", "", tbDateFrom.Text, tbDateTo.Text, "", PageSize, Request["page"] == null ? 1 : int.Parse(Request["page"])); GridView1.DataSource = dt; GridView1.DataBind(); }
private void Show() { string strUserData = ((FormsIdentity)(HttpContext.Current.User.Identity)).Ticket.UserData; int totaleItems = dl.GetPublishListCount("N02", "", "", txtSearch.Text, strUserData, DataLayer.SortMethed.OrderByInitDate, false); Pagination1.totalitems = totaleItems; Pagination1.limit = PageSize; Pagination1.targetpage = "i-post.aspx"; //技巧:利用這種方式才可以呼叫usercontrol裡的public method UserControl_Pagination uc = Pagination1; uc.showPageControls(); DataTable dt = dl.GetPublishList("N02", "", "", txtSearch.Text, strUserData, DataLayer.SortMethed.OrderByInitDate, false, PageSize, Request["page"] == null ? 1 : int.Parse(Request["page"])); gvList.DataSource = dt; gvList.DataBind(); lnkAddAdmin.NavigateUrl = "i-post_Insert.aspx"; }
private void Show() { int totaleItems = dl.GetPublishListCount(Request["ModuleID"], ddlOrg.SelectedValue, ddlClass1.SelectedValue, txtSearch.Text, "", DataLayer.SortMethed.OrderByInitDate, false); Pagination1.totalitems = totaleItems; Pagination1.limit = PageSize; Pagination1.targetpage = "News_List.aspx?ModuleID=" + Request["ModuleID"] + "&ClassID=" + ddlClass1.SelectedValue; //技巧:利用這種方式才可以呼叫usercontrol裡的public method UserControl_Pagination uc = Pagination1; uc.showPageControls(); DataTable dt = dl.GetPublishList(Request["ModuleID"], ddlOrg.SelectedValue, ddlClass1.SelectedValue, txtSearch.Text, "", DataLayer.SortMethed.OrderByInitDate, false, PageSize, Request["page"] == null ? 1 : int.Parse(Request["page"])); gvList.DataSource = dt; gvList.DataBind(); lnkAddAdmin.NavigateUrl = "News_Insert.aspx?ModuleID=" + Request["ModuleID"]; lnkAddAdmin2.NavigateUrl = "News_Class.aspx?ModuleID=" + Request["ModuleID"]; }