Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            oldProjectWithtotal opt = new oldProjectWithtotal();
            DataModal dm = new DataModal();
            if (!(Request.Params["page"] == null || Request.Params["page"] == ""))
            {
                try
                {
                    page = Convert.ToInt32(Request.Params["page"]);
                }
                catch (Exception ex)
                {
                    page = 1;
                }
            }

            int pageSize = 25;

            if (Request.Params["type"] == null || Request.Params["type"] == "")
            {
                type = 0;
            }
            else
            {
                type = Convert.ToInt32(Request.Params["type"]);
            }
            opt = dm.GetProjectsWithTotal(type,page, pageSize,"opType","desc");
            this.OpsRepeater.DataSource = opt.rows;
            this.OpsRepeater.DataBind();
            pages = (opt.total % pageSize) > 0 ? (opt.total / pageSize) + 1 : (opt.total / pageSize);
        }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     DataModal dm = new DataModal();
     this.newsRepeate.DataSource = dm.GetNewsList(1,6).newsList;
     this.newsRepeate.DataBind();
     oldProjectWithtotal opt = new oldProjectWithtotal();
     opt = dm.GetProjectsWithTotal(0,1,6, "opType", "desc");
     this.OpsRepeater.DataSource = opt.rows;
     this.OpsRepeater.DataBind();
 }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     int id = 1;
     if (!(Request.Params["id"] == "" || Request.Params["id"] == null))
     {
         id = Convert.ToInt32(Request.Params["id"]);
     }
     DataModal dm = new DataModal();
     Support sp = dm.GetSupport(id);
     this.supportContent.Text = sp.supportContent;
     this.supportTitle.Text = sp.supportTitle;
 }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.Params["n"] == null || Request.Params["n"] == "")
            {

            }
            else
            {
                DataModal dm = new DataModal();
                News n = dm.GetNewes(Convert.ToInt32(Request.Params["n"]));
                this.newsTitle.Text = n.newsTitle;
                this.newsContent.Text = n.newsContent;
            }
        }
Esempio n. 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //    int page=1;
     //    if (Request.Params["page"] == null || Request.Params["page"] == "")
     //    {
     //        page = 1;
     //    }
     //    else
     //    {
     //        int.TryParse(Request.Params["page"], out page);
     //    }
     //    int pageSize = 50;
     DataModal dm = new DataModal();
     HelpRepeater.DataSource = dm.GetHelpsWithTotal(1, 100, "helpID", "asc").rows;
     HelpRepeater.DataBind();
 }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            listNewsWithPages ln = new listNewsWithPages();
            DataModal dm = new DataModal();
            if (!(Request.Params["page"] == null || Request.Params["page"] == ""))
            {
                try
                {
                    page = Convert.ToInt32(Request.Params["page"]);
                }
                catch (Exception ex)
                {
                    page = 1;
                }
            }

            int pageSize = 25;
            ln = dm.GetNewsList(page,pageSize);
            this.NewsRepeater.DataSource = ln.newsList;
            this.NewsRepeater.DataBind();
            pages = (ln.Total % pageSize) > 0 ? (ln.Total / pageSize)+1 : (ln.Total / pageSize);
        }
Esempio n. 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.Params["pid"] == "" || Request.Params["pid"] == null)
     {
         Response.Redirect("~/slip_/");
     }
     else
     {
         DataModal dm = new DataModal();
         int opid = Convert.ToInt32(Request.Params["pid"]);
         oldProject op = dm.GetOldProject(opid);
         this.opTitle.Text = op.opTitle;
         if (op.opImg != null && op.opImg != "")
         {
             opImage.ImageUrl = op.opImg;
         }
         opDepartment.Text = op.opDepartment;
         opNum.Text = op.opNum;
         opYear.Text = op.opYear;
         this.opContent.Text = op.opContent;
         this.opTypeLink.Text = op.opTypeName;
         this.opTypeLink.NavigateUrl = "pf.aspx?type="+op.opType.ToString();
     }
 }