コード例 #1
0
        private void bindList()
        {
            SearchSuccessStories con = new SearchSuccessStories();

            if (ddlSuccessStoriesType.SelectedValue != "")
            {
                con.SSType = Convert.ToInt32(ddlSuccessStoriesType.SelectedValue);
            }
            if (rbtnIsChinese.Checked == true)
            {
                con.IsEnglish = 1;
            }
            else if (rbtnIsEnglish.Checked == true)
            {
                con.IsEnglish = 2;
            }
            Pagination pagina = new Pagination(pager.PageIndex, pager.PageSize, 0);

            using (BLLSuccessStories bll = new BLLSuccessStories())
            {
                List <SuccessStories> lists = bll.GetPageList(con, pagina, SuccessStoriesType.ID_FieldName, ScriptQuery.SortEnum.DESC);

                pager.RecordCount = pagina.RecordCount;
                pager.PageCount   = pagina.PageCount;

                grid_friendlink.DataSource = lists;
                grid_friendlink.DataBind();
            }
        }
コード例 #2
0
        private void bindInfo()
        {
            SearchSuccessStories spt = new  SearchSuccessStories();

            spt.IsEnglish = 1;
            using (BLLSuccessStories bll = new BLLSuccessStories())
            {
                List <SuccessStories> lists = bll.GetList(spt);

                if (lists != null)
                {
                    int x = 0;

                    for (int i = 0; i < (lists.Count) / 2; i++)
                    {
                        //    prlsdaafgad.InnerHtml += "<span class=\"workItem\">";
                        //    if (lists[x] != null)
                        //    {
                        //        prlsdaafgad.InnerHtml += "<a href=\"caseDetail.aspx?id=" + lists[x].ID + "\" ><img src=\"" + lists[x].SSPic + "\" alt=\"\" />" + "</a>";
                        //    }
                        //    x++;
                        //    if (lists[x] != null)
                        //    {
                        //        prlsdaafgad.InnerHtml += "<a href=\"caseDetail.aspx?id=" + lists[x].ID + "\" ><img src=\"" + lists[x].SSPic + "\" alt=\"\" />" + "</a>";
                        //    }
                        //    x++;
                        //    prlsdaafgad.InnerHtml += "</span>";
                    }
                }
                else
                {
                    //prlsdaafgad.InnerHtml += "暂无数据";
                }
            }
        }
コード例 #3
0
        public static string OperateRecords(string ids, int op)
        {
            string[] array = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            using (BLLSuccessStoriesType bll = new BLLSuccessStoriesType())
            {
                foreach (string id in array)
                {
                    switch (op)
                    {
                    case 7:

                        using (BLLSuccessStories blls1 = new BLLSuccessStories())
                        {
                            SearchSuccessStories con3 = new SearchSuccessStories();
                            con3.SSType = Convert.ToInt32(id);

                            if (blls1.GetList(con3).Count > 0)
                            {
                                return("此成功案例类型下有相应的信息,不能删除!");
                            }
                        }

                        bll.Delete(id);
                        break;
                    }
                }

                if (bll.IsFail)
                {
                    return(ExceptionManager.GetErrorMsg(bll.DevNetException));
                }
            }
            return(string.Empty);
        }
コード例 #4
0
        private void Bindqiye()
        {
            SearchSuccessStories sss = new SearchSuccessStories();

            sss.IsEnglish = 1;
            sss.SSType    = 16;
            Pagination pagination = new DevNet.Common.Pagination(0, 6, 0);

            using (BLLSuccessStories bll = new BLLSuccessStories())
            {
                List <SuccessStories> lists = bll.GetPageList(sss, pagination);
                //rptProducttype.DataSource = lists;
                //rptProducttype.DataBind();
                //pager.RecordCount = pagination.RecordCount;
            }
        }
コード例 #5
0
        private void Bindanli()
        {
            SearchSuccessStories sss = new SearchSuccessStories();

            sss.IsEnglish = 1;


            sss.SSType = 14;
            Pagination pagination = new DevNet.Common.Pagination(0, 20, 0);

            using (BLLSuccessStories bll = new BLLSuccessStories())
            {
                List <SuccessStories> lists = bll.GetPageList(sss, pagination);
                chenggong.DataSource = lists;
                chenggong.DataBind();
            }
        }
コード例 #6
0
        private void Bind()
        {
            SearchSuccessStories sss = new SearchSuccessStories();

            sss.IsEnglish = 1;

            if (type == 15)
            {
                qianzhui.Text = "生产";
                houzhui.Text  = "设备";
                yingwen.Text  = "PRODUCT RUN  EQUIPMENT";
            }
            else if (type == 14)
            {
                qianzhui.Text = "成功";
                houzhui.Text  = "案例";
                yingwen.Text  = "SUCCESSFUL CASE";
            }
            else
            {
                type          = 15;
                qianzhui.Text = "生产";
                houzhui.Text  = "设备";
                yingwen.Text  = "PRODUCT RUN  EQUIPMENT";
            }
            sss.SSType = type;
            Pagination pagination = new DevNet.Common.Pagination(pager.PageIndex, pager.PageSize, 0);

            using (BLLSuccessStories bll = new BLLSuccessStories())
            {
                List <SuccessStories> lists = bll.GetPageList(sss, pagination);
                rptProducttype.DataSource = lists;
                rptProducttype.DataBind();
                pager.RecordCount = pagination.RecordCount;
            }
        }
コード例 #7
0
        private void Bind()
        {
            SearchSuccessStories sss = new SearchSuccessStories();

            sss.IsEnglish = 1;
            if (type == 14)
            {
                Title      = "成功案例";
                sss.SSType = type;
            }
            else
            {
                Title      = "生产设备";
                sss.SSType = type;
            }
            Pagination pagination = new DevNet.Common.Pagination(pager.PageIndex, pager.PageSize, 0);

            using (BLLSuccessStories bll = new BLLSuccessStories())
            {
                List <SuccessStories> lists = bll.GetPageList(sss, pagination);
                rptProducttype.DataSource = lists;
                rptProducttype.DataBind();
                pager.RecordCount = pagination.RecordCount;
            }

            //using (BLLCompanyInformationType bll = new BLLCompanyInformationType())
            //{

            //    CompanyInformationType contype = bll.GetSingle(14);
            //    if (contype != null)
            //    {
            //        Title = contype.CompanyInformationName;
            //    }

            //}
        }