Inheritance: Control, INamingContainer
Exemplo n.º 1
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            int sucCount = 0; //成功数量
            int errorCount = 0; //失败数量
            Repeater rptList = new Repeater();
            rptList = this.rptList1;

            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.Delete(id))
                    {
                        sucCount++;
                    }
                    else
                    {
                        errorCount++;
                    }
                }
            }
            AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "删除lbs数据管理内容成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("lbslist.aspx", "keywords={0}", this.keywords), "Success");
        }
Exemplo n.º 2
0
        public static PagedDataSource BindRepeaterWithPaging(ref Repeater objRepeater, int currentPage, string strSelectQuery, string strSearchCondition = "", string strAddNewRow = "")
        {
            //create new instance of PagedDataSource
            PagedDataSource objPds = new PagedDataSource();
            DataSet dsBindData = new DataSet();
            DataView dv = new DataView();

            //set number of pages will appear
            objPds.PageSize = csGlobal.pageSize;
            objPds.AllowPaging = true;

            //Fill DataSet And Create Dataview
            dsBindData = CrystalConnection.CreateDatasetWithoutTransaction(strSelectQuery);
            dv = dsBindData.Tables[0].DefaultView;

            //Filter the DataView According to Search Condition
            if (strSearchCondition != "")
            {
                dv.RowFilter = strSearchCondition;
            }

            objPds.DataSource = dv;

            //Setting CurrentPageIndex, Which page is to be set Current Page
            if (strAddNewRow == "")
                objPds.CurrentPageIndex = currentPage;
            else
                objPds.CurrentPageIndex = objPds.PageCount - 1;

            //Bind the Repeader with PageDataSource
            objRepeater.DataSource = objPds;
            objRepeater.DataBind();

            return objPds;
        }
Exemplo n.º 3
0
 /// <summary>
 /// BindMenu
 /// </summary>
 /// <param name="web"></param>
 /// <param name="listName"></param>
 /// <param name="rptMenu"></param>
 /// <param name="menuPosition"></param>
 /// <param name="menuParent"></param>
 public static void BindMenu(SPWeb web, string listName, Repeater rptMenu, string menuPosition, string menuParent)
 {
     SPSecurity.RunWithElevatedPrivileges(() =>
     {
         using (var adminSite = new SPSite(web.Site.ID))
         {
             using (var adminWeb = adminSite.OpenWeb(web.ID))
             {
                 try
                 {
                     adminWeb.AllowUnsafeUpdates = true;
                     string caml = @"<Where><And><Eq><FieldRef Name='{0}' /><Value Type='Text'>{1}</Value></Eq><Eq><FieldRef Name='{2}' /><Value Type='MultiChoice'>{3}</Value></Eq></And></Where><OrderBy><FieldRef Name='{4}' /></OrderBy>";
                     var query = new SPQuery()
                     {
                         Query = string.Format(CultureInfo.InvariantCulture, caml, FieldsName.MenuList.InternalName.ParentID, menuParent, FieldsName.MenuList.InternalName.MenuPosition, menuPosition, FieldsName.MenuList.InternalName.MenuOrder)
                     };
                     var list = Utilities.GetCustomListByUrl(adminWeb, listName);
                     var items = list.GetItems(query);
                     if (items != null && items.Count > 0)
                     {
                         rptMenu.DataSource = items.GetDataTable();
                         rptMenu.DataBind();
                     }
                 }
                 catch (SPException ex)
                 {
                     Utilities.LogToULS(ex);
                 }
             }
         }
     });
 }
Exemplo n.º 4
0
 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel(category_name, OSEnums.ActionEnum.Delete.ToString()); //检查权限
     int sucCount = 0; //成功数量
     int errorCount = 0; //失败数量
     BLL.contents.article bll = new BLL.contents.article();
     Repeater rptList = new Repeater();
     switch (this.prolistview) {
         case "Img":
             rptList = this.rptList1;
             break;
         case "Txt":
             rptList = this.rptList2;
             break;
         default:
             rptList = this.rptList1;
             break;
     }
     for (int i = 0; i < rptList.Items.Count; i++) {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked) {
             if (bll.Delete(id)) {
                 sucCount++;
             }
             else {
                 errorCount++;
             }
         }
     }
     AddAdminLog(OSEnums.ActionEnum.Edit.ToString(), "删除" + this.category_name + "频道内容成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
     Response.Redirect(Utils.CombUrlTxt("article_list.aspx", "category_id={0}&keywords={1}&property={2}",
     this.category_id.ToString(), this.keywords, this.property));
 }
        /// <summary>
        /// 获得Repeater中已选的CheckBox值集合
        /// </summary>
        /// <param name="list">列表控件</param>
        /// <param name="checkId">CheckBox名称</param>
        /// <returns></returns>
        public static string GetCheckBoxByRepeater(Repeater list, string checkId)
        {
            if (list == null)
            {
                throw new ArgumentNullException("list");
            }

            StringBuilder rets = new StringBuilder();
            for (int i = 0; i < list.Items.Count; i++)
            {
                CheckBox check = (CheckBox) list.Items[i].FindControl(checkId);
                if (check.Checked)
                {
                    if (rets.Length > 0)
                    {
                        rets.Append(",");
                        rets.Append(check.Text);
                    }
                    else
                    {
                        rets.Append(check.Text);
                    }
                }
            }
            return rets.ToString();
        }
Exemplo n.º 6
0
 //批量审核
 protected void btnAudit_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("channel_" + this.channel_name + "_list", DTEnums.ActionEnum.Audit.ToString()); //检查权限
     BLL.article bll = new BLL.article();
     Repeater rptList = new Repeater();
     switch (this.prolistview)
     {
         case "Txt":
             rptList = this.rptList1;
             break;
         default:
             rptList = this.rptList2;
             break;
     }
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.UpdateField(id, "status=0");
         }
     }
     AddAdminLog(DTEnums.ActionEnum.Audit.ToString(), "审核" + this.channel_name + "频道内容信息"); //记录日志
     JscriptMsg("批量审核成功!", Utils.CombUrlTxt("article_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
         this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property));
 }
Exemplo n.º 7
0
    protected void ViewComments(object sender, EventArgs e)
    {
        LinkButton btn    = sender as LinkButton;
        int        id     = GetIdOfAnswer(btn);
        QuizItem   answer = QuizItem.Find(id);

        Panel tmp = SelectorHelpers.FindFirstByCssClass <Panel>(btn.Parent, "viewComments");

        if (!tmp.Visible || tmp.Style["display"] == "none")
        {
            btn.Text    = "Hide " + btn.Text;
            tmp.Visible = true;
            tmp.ReRender();

            System.Web.UI.WebControls.Repeater rep = Selector.SelectFirst <System.Web.UI.WebControls.Repeater>(tmp);
            rep.DataSource = answer.Children;
            rep.DataBind();

            TextArea txt = Selector.SelectFirst <TextArea>(tmp);
            txt.Text = "write your comment here...";

            new EffectRollDown(tmp, 500)
            .Render();
        }
        else
        {
            btn.Text = btn.Text.Replace("Hide ", "");
            new EffectRollUp(tmp, 500)
            .Render();
        }
    }
Exemplo n.º 8
0
 //保存排序
 protected void btnSave_Click(object sender, EventArgs e)
 {
     BLL.goods bll = new BLL.goods();
     Repeater rptList = new Repeater();
     switch (this.prolistview)
     {
         case "Txt":
             rptList = this.rptList1;
             break;
         default:
             rptList = this.rptList2;
             break;
     }
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         int sortId;
         if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
         {
             sortId = 99;
         }
         bll.UpdateField(id, "sort_id=" + sortId.ToString());
     }
     JscriptMsg("保存排序成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
     this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property), "Success");
 }
Exemplo n.º 9
0
 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel(channel_id, DTEnums.ActionEnum.Delete.ToString()); //检查权限
     BLL.goods bll = new BLL.goods();
     Repeater rptList = new Repeater();
     switch (this.prolistview)
     {
         case "Txt":
             rptList = this.rptList1;
             break;
         default:
             rptList = this.rptList2;
             break;
     }
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             bll.Delete(id);
         }
     }
     JscriptMsg("批量删除成功啦!", Utils.CombUrlTxt("list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
     this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property), "Success");
 }
Exemplo n.º 10
0
 public void BindCourseware()
 {
     var repeaters = new Repeater[]
     {A0, A1, A2, A3, A4, A5, A6, B0, B1, B2, B3, B4, B5, B6, C0, C1, C2, C3, C4, C5, C6};
     foreach (var repeater in repeaters)
     {
         Func<ResourceMap, bool> funcWhere;
         Func<ResourceMap, dynamic> funcOrder;
         var index = int.Parse(repeater.ID.Substring(1, 1));
         var order = repeater.ID.Substring(0, 1);
         switch (order)
         {
             case "A":
                 funcOrder = o => o.Time;
                 break;
             case "B":
                 funcOrder = o => o.View;
                 break;
             default:
                 funcOrder = o => o.Credit;
                 break;
         }
         funcWhere =
             o => o.Type == ResourceType.课件 && o.State < State.审核 && o.CatalogId == Courses[index];
         repeater.DataSource = HomoryContext.Value.ResourceMap.Where(predicate: funcWhere).OrderByDescending(funcOrder).Take(10).ToList();
         repeater.DataBind();
     }
 }
Exemplo n.º 11
0
        public void Loadlist(Repeater rpt)
        {
            try
            {
                int sotin = (_typecat == 0 ? lnews.Getsotin(_Catid) : 100);
                var list = lnews.Load_listnews(_Catid);
                if (list.Count > 0)
                {
                    if (_page != 0)
                    {
                        rpt.DataSource = list.Skip(sotin * _page - sotin).Take(sotin);
                        rpt.DataBind();
                    }
                    else
                    {
                        rpt.DataSource = list.Take(sotin);
                        rpt.DataBind();
                    }
                    ltrPage.Text = change.result(list.Count, sotin, _cat_seo_url, 0, _page, 1);
                }
                else { lblMsg.Text = "Nội dung đang được cập nhật!"; }

            }
            catch (Exception)
            {

                throw;
            }
        }
Exemplo n.º 12
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("weixin_sq", MXEnums.ActionEnum.Delete.ToString()); //检查权限
            int sucCount = 0; //成功数量
            int errorCount = 0; //失败数量

            Repeater rptList = new Repeater();
            rptList = this.rptList;

            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.Delete(id))
                    {
                        sucCount++;
                    }
                    else
                    {
                        errorCount++;
                    }
                }
            }
            AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "删除微信上墙图片成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            Response.Redirect(Utils.CombUrlTxt("photo_list.aspx", "id={0}&keywords={1}",
              aid.ToString(), this.keywords));
        }
Exemplo n.º 13
0
        public void Loadlist(Repeater rpt)
        {
            try
            {
                int sotin = (_typecat == 0 ? lnews.Getsotin(_Catid) : 100);
                var list = lnews.Load_listnews(_Catid);
                if (list.Count > 0)
                {
                    //if (_page != 0)
                    //{
                    //    rpt.DataSource = list.Skip(sotin * _page - sotin).Take(sotin);
                    //    rpt.DataBind();
                    //}
                    //else
                    //{
                    rpt.DataSource = list;//.Take(sotin);
                    rpt.DataBind();
                    //}
                    //ltrPage.Text = change.result(list.Count, sotin, _cat_seo_url, 0, _page, 1);
                }
                else { }

            }
            catch
            {

            }
        }
Exemplo n.º 14
0
 public void UpdateProfile(Repeater rpData, Boolean debugMode = false)
 {
     const string profileupload = "NBStore\\profileupload";
     Utils.CreateFolder(PortalSettings.Current.HomeDirectoryMapPath + profileupload);
     var strXml = GenXmlFunctions.GetGenXml(rpData, "", PortalSettings.Current.HomeDirectoryMapPath + profileupload);
     Save(strXml, debugMode);
 }
Exemplo n.º 15
0
 //保存排序
 protected void btnSave_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("channel_" + this.channel_name + "_list", DTEnums.ActionEnum.Edit.ToString()); //检查权限
     BLL.article bll = new BLL.article();
     Repeater rptList = new Repeater();
     switch (this.prolistview)
     {
         case "Txt":
             rptList = this.rptList1;
             break;
         default:
             rptList = this.rptList2;
             break;
     }
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         int sortId;
         if (!int.TryParse(((TextBox)rptList.Items[i].FindControl("txtSortId")).Text.Trim(), out sortId))
         {
             sortId = 99;
         }
         bll.UpdateField(id, "sort_id=" + sortId.ToString());
     }
     AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "保存" + this.channel_name + "频道内容排序"); //记录日志
     JscriptMsg("保存排序成功啦!", Utils.CombUrlTxt("article_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
         this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property), "Success");
 }
Exemplo n.º 16
0
        //批量删除
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("channel_" + this.channel_name + "_list", MXEnums.ActionEnum.Delete.ToString()); //检查权限
            int sucCount = 0; //成功数量
            int errorCount = 0; //失败数量
            BLL.article bll = new BLL.article();
            Repeater rptList = new Repeater();
            rptList = this.rptList1;

            for (int i = 0; i < rptList.Items.Count; i++)
            {
                int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
                CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
                if (cb.Checked)
                {
                    if (bll.Delete(id))
                    {
                        sucCount++;
                    }
                    else
                    {
                        errorCount++;
                    }
                }
            }
            AddAdminLog(MXEnums.ActionEnum.Edit.ToString(), "删除" + this.channel_name + "单页内容成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
            JscriptMsg("删除成功" + sucCount + "条,失败" + errorCount + "条!", Utils.CombUrlTxt("article_page_list.aspx", "channel_id={0}&category_id={1}&keywords={2}&property={3}",
                this.channel_id.ToString(), this.category_id.ToString(), this.keywords, this.property), "Success");
        }
Exemplo n.º 17
0
 //批量删除
 protected void btnDelete_Click(object sender, EventArgs e)
 {
     ChkAdminLevel("link", OSEnums.ActionEnum.Delete.ToString()); //检查权限
     int sucCount = 0; //成功数量
     int errorCount = 0; //失败数量
     BLL.contents.article bll = new BLL.contents.article();
     Repeater rptList = new Repeater();
       rptList = this.rptList1;
     for (int i = 0; i < rptList.Items.Count; i++)
     {
         int id = Convert.ToInt32(((HiddenField)rptList.Items[i].FindControl("hidId")).Value);
         CheckBox cb = (CheckBox)rptList.Items[i].FindControl("chkId");
         if (cb.Checked)
         {
             if (bll.Delete(id))
             {
                 sucCount++;
             }
             else
             {
                 errorCount++;
             }
         }
     }
         AddAdminLog(OSEnums.ActionEnum.Edit.ToString(), "删除[搜索-"+this.keywords+"]频道内容成功" + sucCount + "条,失败" + errorCount + "条"); //记录日志
         Response.Redirect(Utils.CombUrlTxt("search.aspx", "keywords={0}", this.keywords));
 }
Exemplo n.º 18
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     Repeater1 = (Repeater)Skin.FindControl("Repeater1");
     Button1 = (Button)Skin.FindControl("Button1");
     Button1.Click += new EventHandler(Button1_Click);
     DataBind();
 }
Exemplo n.º 19
0
 /// <summary>
 /// Display template with moduleid set
 /// </summary>
 /// <param name="rp1"></param>
 /// <param name="moduleId"></param>
 public void DoDetail(Repeater rp1,int moduleId)
 {
     var obj = new NBrightInfo(true);
     obj.ModuleId = moduleId;
     var l = new List<object> { obj };
     rp1.DataSource = l;
     rp1.DataBind();
 }
Exemplo n.º 20
0
        protected void grvData_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            ImageButton ImageButton1 = (ImageButton)e.Row.FindControl("btnDelete");
            if (ImageButton1 != null)
                ImageButton1.Attributes.Add("onClick", "javascript:return confirm('Bạn có muốn xóa không');");

            rptSubCate = (Repeater)e.Row.FindControl("rptSubCate");
        }
Exemplo n.º 21
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     repeater1 = (Repeater)Skin.FindControl("repeater1");
     AddCategory = (Button)Skin.FindControl("AddCategory");
     Cate_Name = (TextBox)Skin.FindControl("Cate_Name");
     AddCategory.Click += new EventHandler(AddCategory_Click);
     DataBind();
 }
Exemplo n.º 22
0
        public void BindDataToControls(Repeater tasksList, Repeater performersList)
        {
            tasksList.DataSource = _tasksService.GetRecentTasks(5);
            performersList.DataSource = _employeService.GetTopPerformers(5);

            tasksList.DataBind();
            performersList.DataBind();
        }
Exemplo n.º 23
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            CommentRepeater = (Repeater)Skin.FindControl("NewComment");
            //CommentRepeater.DataSource = BView_WeblogUserComment.GetTopCommentByLogUID(blogContext.BlogUserId);
            CommentRepeater.DataSource = BGetCommentInfoByLogId.GetTopCommentByLogUID(blogContext.BlogUserId);
            CommentRepeater.DataBind();

            //throw new NotImplementedException();
        }
Exemplo n.º 24
0
 public void BindCourseware()
 {
     var repeaters = new Repeater[]
     {A0, A1, A2, A3, A4, A5, A6, B0, B1, B2, B3, B4, B5, B6, C0, C1, C2, C3, C4, C5, C6};
     foreach (var repeater in repeaters)
     {
         Func<Resource, bool> funcWhere;
         Func<Resource, dynamic> funcOrder;
         var index = int.Parse(repeater.ID.Substring(1, 1));
         var order = repeater.ID.Substring(0, 1);
         switch (order)
         {
             case "A":
                 funcOrder = o => o.Time;
                 break;
             case "B":
                 funcOrder = o => o.View;
                 break;
             default:
                 funcOrder = o => o.Credit;
                 break;
         }
         if (index < 6)
         {
             funcWhere =
                 o => o.Type == ResourceType.课件 && o.State < State.审核 && o.CourseId != null && o.CourseId == Courses[index];
             if (HomeCampus == null)
             {
                 repeater.DataSource = HomoryContext.Value.Resource.Where(predicate: funcWhere).OrderByDescending(funcOrder).Take(10).ToList();
             }
             else
             {
                 var predicate = SR();
                 repeater.DataSource = HomoryContext.Value.Resource.Where(predicate: funcWhere).Where(predicate).OrderByDescending(funcOrder).Take(10).ToList();
             }
             repeater.DataBind();
         }
         else
         {
             funcWhere = o => o.Type == ResourceType.课件 && o.State < State.审核 && o.CourseId != null;
             var courseP = Courses[index];
             var coursesP = HomoryContext.Value.Catalog.Where(o => o.State < State.审核 && o.Type == CatalogType.课程 && o.ParentId == courseP).ToList();
             if (HomeCampus == null)
             {
                 var source = coursesP.Join(HomoryContext.Value.Resource.Where(funcWhere), c => c.Id, r => r.CourseId, (c, r) => r).ToList();
                 repeater.DataSource = source;
             }
             else
             {
                 var predicate = SR();
                 var source = coursesP.Join(HomoryContext.Value.Resource.Where(funcWhere).Where(predicate), c => c.Id, r => r.CourseId, (c, r) => r).ToList();
                 repeater.DataSource = source;
             }
             repeater.DataBind();
         }
     }
 }
Exemplo n.º 25
0
		public void PreselectCheckboxRepeater(Repeater repeater, List<IContentMetaInfo> lst) {
			foreach (RepeaterItem r in repeater.Items) {
				CheckBox chk = (CheckBox)r.FindControl("chk");
				Guid id = new Guid(chk.Attributes["value"].ToString());
				if (lst.Where(x => x.ContentMetaInfoID == id).Count() > 0) {
					chk.Checked = true;
				}
			}
		}
Exemplo n.º 26
0
 /// <summary>
 /// ����Repeater��������reportname��excel����
 /// </summary>
 /// <param name="reportname">�������ִ�xls��׺</param>
 /// <param name="rp">Repeater�ؼ�</param>
 public static void ExportExcelReport(string reportname,Repeater rp)
 {
     System.Web.HttpContext.Current.Response.Clear();
     System.Web.HttpContext.Current.Response.ContentEncoding=System.Text.Encoding.UTF8;
     System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode(reportname));
     System.Web.HttpContext.Current.Response.ContentType = "application/ms-excel";
     rp.RenderControl(new HtmlTextWriter(System.Web.HttpContext.Current.Response.Output));
     System.Web.HttpContext.Current.Response.End();
 }
Exemplo n.º 27
0
        protected override void AttachChildControls()
        {
            rp_productsales = (Repeater)this.FindControl("rp_productsales");

            DataTable lineItems = ProductBrowser.GetLineItems(Convert.ToInt32(this.Page.Request.QueryString["productId"]), this.maxNum);

            rp_productsales.DataSource = lineItems;
            rp_productsales.DataBind();
        }
Exemplo n.º 28
0
        /// <summary>
        /// Inits the metadata repeater.
        /// </summary>
        /// <param name="pageMetadata">The page metadata.</param>
        /// <param name="metadataTypeName">Name of the metadata type.</param>
        /// <param name="repeater">The repeater.</param>
        protected void InitMetadataRepeater(List<Metadata> pageMetadata, string metadataTypeName, Repeater repeater)
        {
            QueryRequest queryRequestFactory =  QueryRequestFactory.Instance.GetMetadataSubjectInstancesQueryRequest(ModuleCMS.Instance.PageTypes, FoundationContext.Current.LanguageID, FoundationContext.Current.Token);

            List<App_Code.Site.CMS.MetaData.Metadata> metadatas =   MetadataService.Instance.GetMetadatas(queryRequestFactory, ModuleCMS.Instance.PermissionManager,FoundationContext.Current.Token);

            repeater.DataSource = metadatas;
            repeater.DataBind();
        }
Exemplo n.º 29
0
 void bingRepearter(string rootID, Repeater rMenu)
 {
     TreeNodeInfo<MenuInfo> cList = new BLL.Menu().GetTree(rootID);
     if (null == cList)
     {
         return;
     }
     rMenu.DataSource = cList.ChildNodeList;
     rMenu.DataBind();
 }
Exemplo n.º 30
0
 public void read(String instr, Repeater repeater)
 {
     conn.Open();
     SqlCommand cmd = new SqlCommand();
     cmd.CommandText = instr;
     cmd.Connection = conn;
     repeater.DataSource = cmd.ExecuteReader();
     repeater.DataBind();
     conn.Close();
 }
Exemplo n.º 31
0
 protected override void OnLoad( EventArgs e )
 {
     base.OnInit(e);
     if( commandPanel == null ) {
         throw new AlnitakException("Nao foi encontrado o controlo 'commandPannel'");
     }
     commandMenu = (Repeater) commandPanel.FindControl("commandMenu");
     if( commandMenu == null ) {
         throw new AlnitakException("Nao foi encontrado o controlo 'commandMenu' no controlo 'commandPannel'");
     }
 }
Exemplo n.º 32
0
 /// <summary>
 /// 绑定Repeater,绑定前检查数据源是否为空
 /// </summary>
 /// <param name="rp">repeater对象</param>
 /// <param name="data">数据源</param>
 /// <param name="data">数据源</param>
 /// <param name="tip">当数据源为空时要显示友的好提示语</param>
 private static void BindWithCheck(this System.Web.UI.WebControls.Repeater rp, object data, bool NoDataTip, string tip)
 {
     if ((data is DataSet && ((DataSet)data).Tables.Count <= 0) || data == null)
     {
         if (NoDataTip)
         {
             Literal lit = new Literal();
             tip      = string.IsNullOrEmpty(tip) ? "暂无数据!" : tip;
             lit.Text = "<p  style=\"color:red;text-align:center;font-size:14px;\">" + tip + "</p>";
             rp.Controls.Add(lit);
         }
     }
     else
     {
         rp.DataSource = data;
         rp.DataBind();
     }
 }
Exemplo n.º 33
0
    public static void treatmentServicesPaggination(System.Web.UI.WebControls.Repeater rptPager, int recordCount, int currentPage, int PageSize)
    {
        double          dblPageCount = (double)((decimal)recordCount / decimal.Parse(PageSize.ToString()));
        int             pageCount    = (int)Math.Ceiling(dblPageCount);
        List <ListItem> pages        = new List <ListItem>();

        if (pageCount > 0)
        {
            pages.Add(new ListItem("First", "1", currentPage > 1));
            for (int i = 1; i <= pageCount; i++)
            {
                pages.Add(new ListItem(i.ToString(), i.ToString(), i != currentPage));
            }
            pages.Add(new ListItem("Last", pageCount.ToString(), currentPage < pageCount));
        }
        rptPager.DataSource = pages;
        rptPager.DataBind();
    }
Exemplo n.º 34
0
        protected override void AttachChildControls()
        {
            this.hdDesc     = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("hdDesc");
            this.MaterialID = Globals.RequestQueryNum("ID");
            if (this.MaterialID <= 0)
            {
                this.Page.Response.Redirect("/");
            }
            ArticleInfo articleInfo = ArticleHelper.GetArticleInfo(this.MaterialID);

            if (articleInfo == null)
            {
                this.Page.Response.Redirect("/");
            }
            string title = articleInfo.Title;

            System.DateTime now = System.DateTime.Now;
            this.TopCtx  = (System.Web.UI.WebControls.Repeater) this.FindControl("TopCtx");
            this.ItemCtx = (System.Web.UI.WebControls.Repeater) this.FindControl("ItemCtx");
            System.Collections.Generic.List <ArticleInfo> list = new System.Collections.Generic.List <ArticleInfo>();
            list.Add(articleInfo);
            this.TopCtx.DataSource = list;
            this.TopCtx.DataBind();
            if (articleInfo.ArticleType == ArticleType.List)
            {
                string value = Globals.ReplaceHtmlTag(articleInfo.Content, 50);
                if (!string.IsNullOrEmpty(value))
                {
                    this.hdDesc.Value = value;
                }
                System.Collections.Generic.IList <ArticleItemsInfo> itemsInfo = articleInfo.ItemsInfo;
                this.ItemCtx.DataSource = itemsInfo;
                this.ItemCtx.DataBind();
            }
            else
            {
                string value = Globals.ReplaceHtmlTag(articleInfo.Memo, 50);
                if (!string.IsNullOrEmpty(value))
                {
                    this.hdDesc.Value = value;
                }
            }
            PageTitle.AddSiteNameTitle(title);
        }
Exemplo n.º 35
0
        public void rpExportExcel(ref System.Web.UI.WebControls.Repeater rp, string strFileName, String FileType)
        {
            //	DataTable dt = (DataTable)this.Session["GridToExcel"];
            //	if (dt==null) return;
            strFileName = System.Web.HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8);

            //System.IO.StringWriter sw = new System.IO.StringWriter();
            //System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(sw);
            //rp.RenderControl(hw);

            //System.Web.HttpContext.Current.Response.Clear();
            //System.Web.HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
            //System.Web.HttpContext.Current.Response.Charset = "";
            //rp.Page.EnableViewState = false;

            //System.Web.HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=" + strFileName + ".xls");
            //System.Web.HttpContext.Current.Response.Write("<html><head><meta http-equiv=Content-Type content=\"text/html; charset=GB2312\"><title>Copyright by SDU</title></head><body><center>");
            //System.Web.HttpContext.Current.Response.Write(sw.ToString());
            //System.Web.HttpContext.Current.Response.Write("</center></body></html>");
            //System.Web.HttpContext.Current.Response.End();

            System.Web.HttpContext.Current.Response.Clear();
            System.Web.HttpContext.Current.Response.BufferOutput = true;
            //设定输出字符集
            System.Web.HttpContext.Current.Response.Charset         = "GB2312";
            System.Web.HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
            System.Web.HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename="
                                                                 + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8));
            //设置输出流HttpMiME类型(导出文件格式)
            System.Web.HttpContext.Current.Response.ContentType = FileType;
            //关闭ViewState
            rp.Page.EnableViewState = false;
            System.Globalization.CultureInfo cultureInfo  = new System.Globalization.CultureInfo("ZH-CN", true);
            System.IO.StringWriter           stringWriter = new System.IO.StringWriter(cultureInfo);
            HtmlTextWriter textWriter = new HtmlTextWriter(stringWriter);

            //rpt_pro为repeater控件的ID
            //数据源要有边框,否则导出数据也无边框
            rp.RenderControl(textWriter);
            //把HTML写回游览器
            System.Web.HttpContext.Current.Response.Write(stringWriter.ToString());
            System.Web.HttpContext.Current.Response.End();
            System.Web.HttpContext.Current.Response.Flush();
        }
Exemplo n.º 36
0
 void rptCartProducts_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == System.Web.UI.WebControls.ListItemType.Item || e.Item.ItemType == System.Web.UI.WebControls.ListItemType.AlternatingItem)
     {
         System.Web.UI.HtmlControls.HtmlInputHidden promotionProductId = (System.Web.UI.HtmlControls.HtmlInputHidden)e.Item.Controls[0].FindControl("promotionProductId");
         System.Web.UI.WebControls.Repeater         dtPresendPro       = (System.Web.UI.WebControls.Repeater)e.Item.Controls[0].FindControl("dtPresendPro");
         if (shoppingCartInfo != null)
         {
             // 赠送活动
             List <ShoppingCartPresentInfo> presentList = (List <ShoppingCartPresentInfo>)shoppingCartInfo.LinePresentPro;
             if (presentList != null && presentList.Count > 0)
             {
                 var p = presentList.Where(m => m.PromotionProductId == (string.IsNullOrWhiteSpace(promotionProductId.Value) ? 0 : Convert.ToInt32(promotionProductId.Value))).Select(n => n);
                 dtPresendPro.DataSource = p;
                 dtPresendPro.DataBind();
             }
         }
     }
 }
Exemplo n.º 37
0
        private void CategoryRepeater_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            RepeaterItem item = e.Item;

            IEnumerable <Position> positions = this.positionService.GetAllPositions();
            int positionId = SelectedPositionId(positions);

            if ((item.ItemType == ListItemType.Item) ||
                (item.ItemType == ListItemType.AlternatingItem))
            {
                PlayerRepeater = (Repeater)item.FindControl("PlayerRepeater");
                string competenceKey = ((Label)item.FindControl("Label1")).Text.Trim();

                var datasource = this.competenceService.GetAllCompetencesByPosition(positionId).Where(x => x.QuestionsCount > 0 && x.Key == competenceKey);

                PlayerRepeater.DataSource = datasource.First().Questions;
                PlayerRepeater.DataBind();
            }
        }
Exemplo n.º 38
0
        private void ToExcel(System.Web.UI.WebControls.Repeater ctl, IList <EyouSoft.Model.StatisticStructure.EarningsAreaStatistic> PerAreaList)
        {
            ctl.Visible    = true;
            ctl.DataSource = PerAreaList;
            ctl.DataBind();

            HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=ProAreaStaticFile.xls");
            HttpContext.Current.Response.Charset         = "UTF-8";
            HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;
            HttpContext.Current.Response.ContentType     = "application/ms-excel";
            ctl.Page.EnableViewState = false;
            StringWriter sw = new StringWriter();

            System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(sw);
            ctl.RenderControl(hw);
            ctl.Visible = false;

            HttpContext.Current.Response.Write(sw.ToString());
            HttpContext.Current.Response.End();
        }
Exemplo n.º 39
0
        protected override void AttachChildControls()
        {
            int useType = 1;

            int.TryParse(this.Page.Request.QueryString["usedType"], out useType);
            DataTable rptVoucher = MemberProcessor.GetUserVoucher(HiContext.Current.User.UserId, useType);

            if (rptVoucher != null && rptVoucher.Rows.Count > 0)
            {
                this.rptVoucher            = (System.Web.UI.WebControls.Repeater) this.FindControl("rptVoucher");
                this.rptVoucher.DataSource = rptVoucher;
                this.rptVoucher.DataBind();
            }
            PageTitle.AddSiteNameTitle("现金券");

            WAPHeadName.AddHeadName("现金券");

            //查看之后,更新状态为已查阅
            MemberProcessor.UpdateVoucherReaded(HiContext.Current.User.UserId);
        }
Exemplo n.º 40
0
        //- #__BuildControlTree -//
        protected override void __BuildControlTree(Themelia.Web.Controls.DataUserControl __ctrl)
        {
            IParserAccessor __parser     = ((IParserAccessor)(__ctrl));
            String          listCssClass = "index-series";

            if (!String.IsNullOrEmpty(this.ListCssClass))
            {
                listCssClass = this.ListCssClass;
            }
            __parser.AddParsedSubObject(new LiteralControl(String.Format("<div class=\"{0}\">", listCssClass)));
            __parser.AddParsedSubObject(new LiteralControl(String.Format("<h2>{0} {1}</h2>", this.Year, this.HeadingSuffix)));
            //+
            System.Web.UI.WebControls.Repeater yearRepeater = this.__BuildYearRepeaterControl();
            __parser.AddParsedSubObject(yearRepeater);
            //+
            System.Web.UI.WebControls.Repeater repeater = this.__BuildRepeaterControl();
            __parser.AddParsedSubObject(repeater);
            //+
            __parser.AddParsedSubObject(new LiteralControl("</div>"));
        }
Exemplo n.º 41
0
 private void refriendscircle_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == System.Web.UI.WebControls.ListItemType.Item || e.Item.ItemType == System.Web.UI.WebControls.ListItemType.AlternatingItem)
     {
         System.Web.UI.WebControls.Repeater repeater = e.Item.Controls[0].FindControl("ItemInfo") as System.Web.UI.WebControls.Repeater;
         System.Web.UI.WebControls.Literal  literal  = e.Item.Controls[0].FindControl("ItemHtml") as System.Web.UI.WebControls.Literal;
         DataRowView dataRowView = (DataRowView)e.Item.DataItem;
         if (dataRowView["ArticleType"].ToString() == "4")
         {
             System.Collections.Generic.IList <ArticleItemsInfo> articleItems = ArticleHelper.GetArticleItems(int.Parse(dataRowView["ArticleId"].ToString()));
             if (articleItems != null)
             {
                 repeater.DataSource = articleItems;
                 repeater.DataBind();
             }
         }
         else
         {
             literal.Text = "<div class='mate-ctx clear' >" + dataRowView["Memo"].ToString() + "</div>";
         }
     }
 }
Exemplo n.º 42
0
 private void RepeaterCheck(string name, System.Web.UI.WebControls.Repeater rpt, bool b)
 {
     if (rpt != null)
     {
         foreach (RepeaterItem ri in rpt.Items)
         {
             System.Web.UI.WebControls.LinkButton lb = GetLinkButton("lnkb" + name, ri);
             if (lb != null)
             {
                 lb.Visible = b;
                 continue;
             }
             System.Web.UI.HtmlControls.HtmlAnchor hl = GetHtmlLink("lnk" + name, ri);
             if (hl != null)
             {
                 hl.Visible = b;
                 continue;
             }
             GetButton("btn" + name, ri, b);
         }
     }
 }
Exemplo n.º 43
0
        protected override void AttachChildControls()
        {
            int useType = 1;

            if (this.Page.Request.QueryString["usedType"] != null)
            {
                int.TryParse(this.Page.Request.QueryString["usedType"], out useType);
            }
            if (HiContext.Current.User == null)
            {
                return;
            }
            DataTable userCoupons = MemberProcessor.GetUserCoupons(HiContext.Current.User.UserId, useType);

            if (userCoupons != null)
            {
                this.rptCoupons            = (System.Web.UI.WebControls.Repeater) this.FindControl("rptCoupons");
                this.rptCoupons.DataSource = userCoupons;
                this.rptCoupons.DataBind();
            }
            PageTitle.AddSiteNameTitle("优惠券");
        }
Exemplo n.º 44
0
        //- $__BuildControlTree -//
        protected override void __BuildControlTree(Themelia.Web.Controls.DataUserControl __ctrl)
        {
            IParserAccessor __parser = ((IParserAccessor)(__ctrl));

            if (String.IsNullOrEmpty(this.Heading))
            {
                throw new ArgumentNullException("Heading may not be null");
            }
            String listCssClass = "index-section";

            if (!String.IsNullOrEmpty(this.ListCssClass))
            {
                listCssClass = this.ListCssClass;
            }
            __parser.AddParsedSubObject(new LiteralControl("<div class=\"" + listCssClass + "\">"));
            __parser.AddParsedSubObject(new LiteralControl(String.Format("<h3>{0} {1}</h3>", this.Heading, this.HeadingSuffix)));
            //+
            System.Web.UI.WebControls.Repeater repeater = this.__BuildRepeaterControl();
            __parser.AddParsedSubObject(repeater);
            //+
            __parser.AddParsedSubObject(new LiteralControl("</div>"));
        }
        public void outputexcel(System.Web.UI.WebControls.Repeater rt)
        {
            Response.Clear();
            //不缓存
            Response.Buffer  = false;
            Response.Charset = "GB2312";
            //这里的FileName.xls可以用变量动态替换
            Response.AppendHeader("Content-Disposition", "attachment;filename=交易查询.xls");
            Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
            //设置输出文件类型为excel文件
            Response.ContentType = "application/ms-excel";
            //以文本形式显示数据

            Response.Write("<meta http-equiv=Content-Type content=\"text/html;charset=GB2312\">");
            this.EnableViewState = false;
            System.IO.StringWriter       oStringWriter   = new System.IO.StringWriter();
            System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
            this.issue2.RenderControl(oHtmlTextWriter);
            //这里是有分页的重新绑定可以把所有都导出
            Response.Output.Write(oStringWriter.ToString());
            Response.Flush();
            Response.End();
        }
Exemplo n.º 46
0
        protected void listOrders_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == System.Web.UI.WebControls.ListItemType.Item || e.Item.ItemType == System.Web.UI.WebControls.ListItemType.AlternatingItem)
            {
                System.Web.UI.HtmlControls.HtmlInputHidden hidsupplierId = (System.Web.UI.HtmlControls.HtmlInputHidden)e.Item.FindControl("hidsupplierId");

                System.Web.UI.WebControls.Repeater repeater = (System.Web.UI.WebControls.Repeater)e.Item.FindControl("rpProduct");
                if (repeater != null)
                {
                    repeater.ItemDataBound += repeater_ItemDataBound;
                    ShoppingCartInfo shoppingCart = ShoppingCartProcessor.GetShoppingCart();

                    if (shoppingCart != null)
                    {
                        List <ShoppingCartItemInfo> list = (List <ShoppingCartItemInfo>)shoppingCart.LineItems;

                        var llist = list.Where(p => p.SupplierId == Convert.ToInt32(hidsupplierId.Value)).Select(c => c);
                        repeater.DataSource = llist;
                        repeater.DataBind();
                    }
                }
            }
        }
Exemplo n.º 47
0
 protected override void AttachChildControls()
 {
     this.repeaterCoupon = (System.Web.UI.WebControls.Repeater) this.FindControl("repeaterCoupon");
 }
Exemplo n.º 48
0
 public static void RepeaterBind <T>(System.Web.UI.WebControls.Repeater repeater, IList <T> dataSource)
 {
     RepeaterBind <T>(repeater, dataSource, PaginaAtual, QtdRegistrosPagina, TotalRegistros, null, null, null);
     PaginaAtual    = -1;
     TotalRegistros = -1;
 }
 protected override void AttachChildControls()
 {
     this.rp_orderItem = (System.Web.UI.WebControls.Repeater) this.FindControl("rp_orderItem");
 }
Exemplo n.º 50
0
 protected void rptList_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == System.Web.UI.WebControls.ListItemType.Item || e.Item.ItemType == System.Web.UI.WebControls.ListItemType.AlternatingItem)
     {
         System.Web.UI.WebControls.Repeater repeater = (System.Web.UI.WebControls.Repeater)e.Item.FindControl("rptSubList");
         OrderInfo orderInfo = OrderHelper.GetOrderInfo(System.Web.UI.DataBinder.Eval(e.Item.DataItem, "OrderID").ToString());
         if (orderInfo != null && orderInfo.LineItems.Count > 0)
         {
             repeater.DataSource = orderInfo.LineItems.Values;
             repeater.DataBind();
         }
         OrderStatus orderStatus = (OrderStatus)System.Web.UI.DataBinder.Eval(e.Item.DataItem, "OrderStatus");
         string      a           = "";
         if (!(System.Web.UI.DataBinder.Eval(e.Item.DataItem, "Gateway") is System.DBNull))
         {
             a = (string)System.Web.UI.DataBinder.Eval(e.Item.DataItem, "Gateway");
         }
         int num = (System.Web.UI.DataBinder.Eval(e.Item.DataItem, "GroupBuyId") != System.DBNull.Value) ? ((int)System.Web.UI.DataBinder.Eval(e.Item.DataItem, "GroupBuyId")) : 0;
         System.Web.UI.HtmlControls.HtmlInputButton htmlInputButton  = (System.Web.UI.HtmlControls.HtmlInputButton)e.Item.FindControl("btnModifyPrice");
         System.Web.UI.HtmlControls.HtmlInputButton htmlInputButton2 = (System.Web.UI.HtmlControls.HtmlInputButton)e.Item.FindControl("btnSendGoods");
         System.Web.UI.WebControls.Button           button           = (System.Web.UI.WebControls.Button)e.Item.FindControl("btnPayOrder");
         System.Web.UI.WebControls.Button           button2          = (System.Web.UI.WebControls.Button)e.Item.FindControl("btnConfirmOrder");
         System.Web.UI.HtmlControls.HtmlInputButton htmlInputButton3 = (System.Web.UI.HtmlControls.HtmlInputButton)e.Item.FindControl("btnCloseOrderClient");
         System.Web.UI.HtmlControls.HtmlAnchor      htmlAnchor       = (System.Web.UI.HtmlControls.HtmlAnchor)e.Item.FindControl("lkbtnCheckRefund");
         System.Web.UI.HtmlControls.HtmlAnchor      htmlAnchor2      = (System.Web.UI.HtmlControls.HtmlAnchor)e.Item.FindControl("lkbtnCheckReturn");
         System.Web.UI.HtmlControls.HtmlAnchor      htmlAnchor3      = (System.Web.UI.HtmlControls.HtmlAnchor)e.Item.FindControl("lkbtnCheckReplace");
         System.Web.UI.WebControls.Literal          literal          = (System.Web.UI.WebControls.Literal)e.Item.FindControl("WeiXinNickName");
         System.Web.UI.WebControls.Literal          literal2         = (System.Web.UI.WebControls.Literal)e.Item.FindControl("litOtherInfo");
         int        totalPointNumber = orderInfo.GetTotalPointNumber();
         MemberInfo member           = MemberProcessor.GetMember(orderInfo.UserId, true);
         if (member != null)
         {
             literal.Text = "买家:" + member.UserName;
         }
         System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder();
         decimal total = orderInfo.GetTotal();
         if (total > 0m)
         {
             stringBuilder.Append("<strong>¥" + total.ToString("F2") + "</strong>");
             stringBuilder.Append("<small>(含运费¥" + orderInfo.AdjustedFreight.ToString("F2") + ")</small>");
         }
         if (totalPointNumber > 0)
         {
             stringBuilder.Append("<small>" + totalPointNumber.ToString() + "积分</small>");
         }
         if (orderInfo.PaymentType == "货到付款")
         {
             stringBuilder.Append("<span class=\"setColor bl\"><strong>货到付款</strong></span>");
         }
         if (string.IsNullOrEmpty(stringBuilder.ToString()))
         {
             stringBuilder.Append("<strong>¥" + total.ToString("F2") + "</strong>");
         }
         literal2.Text = stringBuilder.ToString();
         if (orderStatus == OrderStatus.WaitBuyerPay)
         {
             htmlInputButton.Visible = true;
             htmlInputButton.Attributes.Add("onclick", "DialogFrame('../trade/EditOrder.aspx?OrderId=" + System.Web.UI.DataBinder.Eval(e.Item.DataItem, "OrderID") + "&reurl='+ encodeURIComponent(goUrl),'修改订单价格',900,450)");
             htmlInputButton3.Attributes.Add("onclick", "CloseOrderFun('" + System.Web.UI.DataBinder.Eval(e.Item.DataItem, "OrderID") + "')");
             htmlInputButton3.Visible = true;
             if (a != "hishop.plugins.payment.podrequest")
             {
                 button.Visible = true;
             }
         }
         if (orderStatus == OrderStatus.ApplyForRefund)
         {
             htmlAnchor.Visible = true;
         }
         if (orderStatus == OrderStatus.ApplyForReturns)
         {
             htmlAnchor2.Visible = true;
         }
         if (orderStatus == OrderStatus.ApplyForReplacement)
         {
             htmlAnchor3.Visible = true;
         }
         if (num > 0)
         {
             GroupBuyStatus groupBuyStatus = (GroupBuyStatus)System.Web.UI.DataBinder.Eval(e.Item.DataItem, "GroupBuyStatus");
             htmlInputButton2.Visible = (orderStatus == OrderStatus.BuyerAlreadyPaid && groupBuyStatus == GroupBuyStatus.Success);
         }
         else
         {
             htmlInputButton2.Visible = (orderStatus == OrderStatus.BuyerAlreadyPaid || (orderStatus == OrderStatus.WaitBuyerPay && a == "hishop.plugins.payment.podrequest"));
         }
         htmlInputButton2.Attributes.Add("onclick", "DialogFrame('../trade/SendOrderGoods.aspx?OrderId=" + System.Web.UI.DataBinder.Eval(e.Item.DataItem, "OrderID") + "&reurl='+ encodeURIComponent(goUrl),'订单发货',750,220)");
         button2.Visible = (orderStatus == OrderStatus.SellerAlreadySent);
     }
 }
 protected override void AttachChildControls()
 {
     this.messagesList              = (System.Web.UI.WebControls.Repeater) this.FindControl("messagesList");
     this.messagesList.ItemCommand += new System.Web.UI.WebControls.RepeaterCommandEventHandler(this.messagesList_ItemCommand);
 }
Exemplo n.º 52
0
 protected override void AttachChildControls()
 {
     this.repeaterPointDetails = (System.Web.UI.WebControls.Repeater) this.FindControl("repeaterPointDetails");
     this.repeaterPointDetails.ItemDataBound += new System.Web.UI.WebControls.RepeaterItemEventHandler(this.repeaterPointDetails_ItemDataBound);
 }
Exemplo n.º 53
0
 /// <summary>
 /// 绑定Repeater,绑定前检查数据源是否为空
 /// 当数据源为空时,无任何提示语显示
 /// </summary>
 /// <param name="rp">repeater对象</param>
 /// <param name="data">数据源</param>
 public static void BindWithCheckNoTip(this System.Web.UI.WebControls.Repeater rp, object data)
 {
     BindWithCheck(rp, data, false, null);
 }
Exemplo n.º 54
0
    public static void LoadCallLogPage(string search_val, System.Web.UI.WebControls.GridView gv, System.Web.UI.WebControls.Repeater rptPager, int pageIndex, DropDownList ddlPageSize, Label lbltotalrecord, int LocationID, DateTime FromDate, DateTime ToDate, String UserID, string SignUp)
    {
        int recordCount = 0;
        int PageSize    = int.Parse(ddlPageSize.SelectedValue);
        SqlClientProvider sqlClientProvider = new SqlClientProvider();
        DataSet           ds = sqlClientProvider.GetCallLogPageWise(search_val, pageIndex, PageSize, out recordCount, LocationID, FromDate, ToDate, UserID, SignUp);

        gv.DataSource = ds;
        gv.DataBind();

        string htmlStatus = "";

        foreach (DataRow dr in ds.Tables[1].Rows)
        {
            htmlStatus += dr["TourStatusName"].ToString() + " : (<b>";
            int count = 0;
            foreach (DataRow drCount in ds.Tables[2].Rows)
            {
                if (drCount["StastusID"].ToString() == dr["TourStatusID"].ToString())
                {
                    count = int.Parse(drCount["NoOfRecords"].ToString());
                }
            }

            htmlStatus += count.ToString() + "</b>) ";
        }

        lbltotalrecord.Text = htmlStatus + " Total Record Found : (<b>" + recordCount + "</b>)";
        clientsPaggination(rptPager, recordCount, pageIndex, PageSize);
    }
        private void Page_Load(object sender, System.EventArgs e)
        {
            //Put user code to initialize the page here

            System.Web.UI.HtmlControls.HtmlForm frm = (HtmlForm)this.FindControl("Form1");
            GHTTestBegin(frm);

            GHTActiveSubTest = GHTSubTest1;
            try
            {
                Repeater1.DataSource = GHTTests.GHDataSources.DSArrayList();
                Repeater1.DataBind();
            }
            catch (Exception ex)
            {
                GHTSubTestUnexpectedExceptionCaught(ex);
            }

            GHTActiveSubTest = GHTSubTest2;
            try
            {
                Repeater2.DataSource = GHTTests.GHDataSources.DSArrayList();
                Repeater2.DataBind();
            }
            catch (Exception ex)
            {
                GHTSubTestUnexpectedExceptionCaught(ex);
            }

            GHTActiveSubTest = GHTSubTest3;
            try
            {
                Repeater3.DataSource = GHTTests.GHDataSources.DSArrayList();
                Repeater3.DataBind();
            }
            catch (Exception ex)
            {
                GHTSubTestUnexpectedExceptionCaught(ex);
            }

            GHTActiveSubTest = GHTSubTest4;
            try
            {
                Repeater4.DataSource = GHTTests.GHDataSources.DSArrayList();
                Repeater4.DataBind();
            }
            catch (Exception ex)
            {
                GHTSubTestUnexpectedExceptionCaught(ex);
            }

            GHTActiveSubTest = GHTSubTest5;
            try
            {
                Repeater5.DataSource = GHTTests.GHDataSources.DSArrayList();
                Repeater5.DataBind();
            }
            catch (Exception ex)
            {
                GHTSubTestUnexpectedExceptionCaught(ex);
            }

            GHTSubTestBegin("Code base template 1");
            try
            {
                System.Web.UI.WebControls.Repeater Repeater6 = new System.Web.UI.WebControls.Repeater();
                GHTActiveSubTest.Controls.Add(Repeater6);
                Repeater6.DataSource     = GHTTests.GHDataSources.DSArrayList();
                Repeater6.FooterTemplate = new t_EmptyLitTemplate();
                Repeater6.ItemTemplate   = new t_DBLitTemplate();
                Repeater6.DataBind();
            }
            catch (Exception ex)
            {
                GHTSubTestUnexpectedExceptionCaught(ex);
            }
            GHTSubTestEnd();

            GHTSubTestBegin("Code base template 2");
            try
            {
                System.Web.UI.WebControls.Repeater Repeater7 = new System.Web.UI.WebControls.Repeater();
                GHTActiveSubTest.Controls.Add(Repeater7);
                Repeater7.DataSource     = GHTTests.GHDataSources.DSArrayList();
                Repeater7.FooterTemplate = new t_PlainTextLitTemplate();
                Repeater7.ItemTemplate   = new t_DBLitTemplate();
                Repeater7.DataBind();
            }
            catch (Exception ex)
            {
                GHTSubTestUnexpectedExceptionCaught(ex);
            }
            GHTSubTestEnd();

            GHTSubTestBegin("Code base template 3");
            try
            {
                System.Web.UI.WebControls.Repeater Repeater8 = new System.Web.UI.WebControls.Repeater();
                GHTActiveSubTest.Controls.Add(Repeater8);
                Repeater8.DataSource     = GHTTests.GHDataSources.DSArrayList();
                Repeater8.FooterTemplate = new t_HtmlLitTemplate();
                Repeater8.ItemTemplate   = new t_DBLitTemplate();
                Repeater8.DataBind();
            }
            catch (Exception ex)
            {
                GHTSubTestUnexpectedExceptionCaught(ex);
            }
            GHTSubTestEnd();

            GHTSubTestBegin("Code base template 4");
            try
            {
                System.Web.UI.WebControls.Repeater Repeater9 = new System.Web.UI.WebControls.Repeater();
                GHTActiveSubTest.Controls.Add(Repeater9);
                Repeater9.DataSource     = GHTTests.GHDataSources.DSArrayList();
                Repeater9.FooterTemplate = new t_ControlLitTemplate();
                Repeater9.ItemTemplate   = new t_DBLitTemplate();
                Repeater9.DataBind();
            }
            catch (Exception ex)
            {
                GHTSubTestUnexpectedExceptionCaught(ex);
            }
            GHTSubTestEnd();

            GHTTestEnd();
        }
Exemplo n.º 56
0
    public static void LoadClientPaymentHistoryPage(string search_val, System.Web.UI.WebControls.GridView gv, System.Web.UI.WebControls.Repeater rptPager, int pageIndex, DropDownList ddlPageSize)
    {
        int recordCount = 0;
        int PageSize    = int.Parse(ddlPageSize.SelectedValue);
        SqlClientProvider sqlClientProvider = new SqlClientProvider();
        DataSet           ds = sqlClientProvider.LoadClientPaymentHistoryPage(search_val, pageIndex, PageSize, out recordCount);

        gv.DataSource = ds;
        gv.DataBind();
        LoadClientPaymentHistoryPage(rptPager, recordCount, pageIndex, PageSize);
    }
Exemplo n.º 57
0
 protected override void AttachChildControls()
 {
     this.listReplace = (System.Web.UI.WebControls.Repeater) this.FindControl("listReplace");
     this.listReplace.ItemDataBound += new System.Web.UI.WebControls.RepeaterItemEventHandler(this.listReplace_ItemDataBound);
 }
Exemplo n.º 58
0
 /// <summary>
 /// 绑定Repeater,绑定前检查数据源是否为空
 /// </summary>
 /// <param name="rp">repeater对象</param>
 /// <param name="data">数据源</param>
 /// <param name="tip">当数据源为空时要显示的友好提示语</param>
 public static void BindWithCheck(this System.Web.UI.WebControls.Repeater rp, object data, string tip)
 {
     BindWithCheck(rp, data, true, tip);
 }
Exemplo n.º 59
0
    public static void LoadClientPage(string search_val, System.Web.UI.WebControls.GridView gv, System.Web.UI.WebControls.Repeater rptPager, int pageIndex, DropDownList ddlPageSize, Label lbltotalrecord, int LocationID, DateTime FromDate, DateTime ToDate)
    {
        int recordCount = 0;
        int PageSize    = int.Parse(ddlPageSize.SelectedValue);
        SqlClientProvider sqlClientProvider = new SqlClientProvider();
        DataSet           ds = sqlClientProvider.GetClientPageWise(search_val, pageIndex, PageSize, out recordCount, LocationID, FromDate, ToDate);

        gv.DataSource = ds;
        gv.DataBind();
        lbltotalrecord.Text = "Total Record Found : " + recordCount;
        clientsPaggination(rptPager, recordCount, pageIndex, PageSize);
    }
Exemplo n.º 60
0
    public static void LoadUSER_MembershipPage(System.Web.UI.WebControls.GridView gv, System.Web.UI.WebControls.Repeater rptPager, int pageIndex, DropDownList ddlPageSize)
    {
        int recordCount = 0;
        int PageSize    = int.Parse(ddlPageSize.SelectedValue);
        SqlUSER_MembershipProvider sqlUSER_MembershipProvider = new SqlUSER_MembershipProvider();
        DataSet ds = sqlUSER_MembershipProvider.GetUSER_MembershipPageWise(pageIndex, PageSize, out recordCount);

        gv.DataSource = ds;
        gv.DataBind();
        uSER_MembershipsPaggination(rptPager, recordCount, pageIndex, PageSize);
    }