public static string OperateRecords(string ids, int op) { string[] array = ids.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); using (BLLProductSecondType bll = new BLLProductSecondType()) { foreach (string id in array) { switch (op) { case 7: SearchProductDetail cond = new SearchProductDetail(); cond.ProSecondTypeID = Convert.ToInt32(id); using (BLLProductDetail jobbll = new BLLProductDetail()) { if (jobbll.GetList(cond).Count > 0) { return("有子类目不能删除;"); } else { bll.Delete(id); break; } } } } if (bll.IsFail) { return(ExceptionManager.GetErrorMsg(bll.DevNetException)); } } return(string.Empty); }
private void bindList() { SearchProductDetail con = new SearchProductDetail(); if (ddlCpInforTypeName.SelectedValue != "") { con.ProTypeID = Convert.ToInt32(ddlCpInforTypeName.SelectedValue); } if (ddlCpInforSecondTypeName.SelectedValue != "") { con.ProSecondTypeID = Convert.ToInt32(ddlCpInforSecondTypeName.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 (BLLProductDetail bll = new BLLProductDetail()) { List <ProductDetail> lists = bll.GetPageList(con, pagina, ProductDetail.ID_FieldName, ScriptQuery.SortEnum.DESC); pager.RecordCount = pagina.RecordCount; pager.PageCount = pagina.PageCount; grid_friendlink.DataSource = lists; grid_friendlink.DataBind(); } }
private void Bind() { SearchProductDetail snt = new SearchProductDetail(); snt.IsEnglish = 1; if (type == 0) { } else { snt.ProTypeID = type; } Pagination pagination = new DevNet.Common.Pagination(pager.PageIndex, pager.PageSize, 0); using (BLLProductDetail bll = new BLLProductDetail()) { List <ProductDetail> lists = bll.GetPageList(snt, pagination); rptProduct.DataSource = lists; rptProduct.DataBind(); pager.RecordCount = pagination.RecordCount; } using (BLLCompanyInformationType bll = new BLLCompanyInformationType()) { string[] fileds = new string[] { "CompanyInformationTypeID", "IsEnglish" }; object[] values = new object[] { type, 1 }; CompanyInformationType contype = bll.GetSingle(type); if (contype != null) { Title = contype.CompanyInformationName; } } }
private void ProBind() { SearchProductDetail snt = new SearchProductDetail(); snt.IsEnglish = 1; Pagination pagination = new DevNet.Common.Pagination(0, 9, 0); using (BLLProductDetail bll = new BLLProductDetail()) { List <ProductDetail> lists = bll.GetPageList(snt, pagination); rptProduct.DataSource = lists; rptProduct.DataBind(); } }
private void ProBind() { SearchProductDetail snt = new SearchProductDetail(); snt.IsEnglish = 1; if (type == 0) { } else { snt.ProTypeID = type; } Pagination pagination = new DevNet.Common.Pagination(pager.PageIndex, pager.PageSize, 0); using (BLLProductDetail bll = new BLLProductDetail()) { List <ProductDetail> lists = bll.GetPageList(snt, pagination); rptProduct.DataSource = lists; rptProduct.DataBind(); pager.RecordCount = pagination.RecordCount; pager.PageCount = pagination.PageCount; } }
/// <summary> /// 加载产品 /// </summary> private void bindInfo() { SearchProductDetail spt = new SearchProductDetail(); using (BLLProductDetail bll = new BLLProductDetail()) { Pagination pagination = new DevNet.Common.Pagination(0, 20, 0); List <ProductDetail> lists = bll.GetPageList(spt, pagination); //if (lists != null) //{ // int x = 0; // for (int i = 0; i < (lists.Count) / 2; i++) // { // prlsdaafgad.InnerHtml += "<li>"; // if (lists[x] != null) // { // prlsdaafgad.InnerHtml += "<a href=\"productDetail.aspx?id=" + lists[x].ID + "\" target=\"_self\"><img src=\"" + phoneImgUrl(lists[x].ProductPic) + "\" alt=\"\" /><span>" + lists[x].ProductName + "</span></a>"; // } // x++; // if (lists[x] != null) // { // prlsdaafgad.InnerHtml += "<a href=\"productDetail.aspx?id=" + lists[x].ID + "\" target=\"_self\"><img src=\"" + phoneImgUrl(lists[x].ProductPic) + "\" alt=\"\" /><span>" + lists[x].ProductName + "</span></a>"; // } // x++; // prlsdaafgad.InnerHtml += "</li>"; // } //} //else //{ // prlsdaafgad.InnerHtml += "暂无数据"; //} } }