code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
.fv_tip{ display:inline-block;} .onShow { background:url(../images/onShow.gif) no-repeat left center; } .onFocus { background:#E9F0FF url(../images/onFocus.gif) no-repeat left center; border:#CDE0FA solid 1px; /* outline radius for mozilla/firefox only */ -moz-box-shadow:0 0 4px #CDE0FA; -webkit-box-shadow:0 0 4px #CDE0FA; } .onError { background:#FFF2E9 url(../images/onError.gif) no-repeat left center; border:#FF0000 solid 1px; /* outline radius for mozilla/firefox only */ -moz-box-shadow:0 0 4px #FF6A6A; -webkit-box-shadow:0 0 4px #FF6A6A; } .onCorrect { background:#E9FFEB url(../images/onCorrect.gif) no-repeat left center; border:#00FF00 solid 1px; /* outline radius for mozilla/firefox only */ -moz-box-shadow:0 0 4px #8CFF8C; -webkit-box-shadow:0 0 4px #8CFF8C; } .onLoad { background:#E9FFEB url(../images/onLoad.gif) no-repeat left center; border:#CDE0FA solid 1px; /* outline radius for mozilla/firefox only */ -moz-box-shadow:0 0 4px #CDE0FA; -webkit-box-shadow:0 0 4px #CDE0FA; } .onShow,.onFocus,.onError,.onCorrect,.onLoad { padding:4px 25px; font-size: 12px; vertical-align:middle; display:inline-block; margin-left:8px; } .input_error { border:#C1C1C1 1px solid;font-size:14px;padding:4px 5px 4px;background-color:#FBFBFB;background-position:0 -72px;color:#444; background-color:#FBE2E2;background-position:0 -144px;border-color:#D28C8C;color:#A63B3B } .input_focus { border:#C1C1C1 1px solid;font-size:14px;padding:4px 5px 4px;background-color:#FBFBFB;background-position:0 -72px;color:#444; background-color:#FFC;background-position:0 -108px;border-color:#C6C69E } .input_show { border:#C1C1C1 1px solid;font-size:14px;padding:4px 5px 4px;background-color:#FBFBFB;background-position:0 -72px;color:#444 } .input_correct { border:#C1C1C1 1px solid;font-size:14px;padding:4px 5px 4px;background-color:#FBFBFB;background-position:0 -72px;color:#444 }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/themes/SolidBox/style/style.css
CSS
oos
2,003
var onShowHtml = ""; var onFocusHtml = "<span class='$class$'><span class='$class$_top'>$data$</span><span class='$class$_bot'></span></span>"; var onErrorHtml = "<span class='$class$'><span class='$class$_top'>$data$</span><span class='$class$_bot'></span></span>"; var onCorrectHtml = "<span class='$class$'></span>"; var onShowClass = "input_public"; var onFocusClass = "input_public input_focus"; var onErrorClass = "input_public input_error"; var onCorrectClass = "input_public input_correct";
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/themes/ArrowSolidBox/js/theme.js
JavaScript
oos
505
.onLoad { background:#E9FFEB url(../images/onLoad.gif) no-repeat 3px 3px; padding-left:25px; font-size: 12px; line-height:22px; vertical-align:middle; } .onCorrect{ display:inline-block; height:22px; background:url(../images/reg-menu.gif) no-repeat 0px -22px; padding-left:15px; margin-left:10px; vertical-align:middle; padding-right:5px; margin-top:5px; } .onError .onFocus p { list-style-type:none; list-style-image:none; line-height : 2; } .onError .onFocus span { color : #000; font-size : 12px; } .onFocus{ width:287px; height:20px; padding-top:3px; left:0px;top:0px; padding:0px; margin::0px; line-height:11px; } .onFocus_top { display:block; width:287px; padding:8px 10px 0 40px; min-height:15px; _height:10px; background:url(../images/verification-ui6.gif) no-repeat 0px 0; } .onFocus_bot { display:block; width:287px; height:5px; background:url(../images/verification-ui6.gif) no-repeat 0px -185px; overflow:hidden; } .onError { width:287px; height:20px; padding-top:3px; left:0px;top:0px; padding:0px; margin::0px; } .onError_top { display:block; width:287px; padding:8px 10px 0 40px; min-height:15px; _height:10px; background:url(../images/verification-ui6.gif) no-repeat 0px -190px; line-height:11px; } .onError_bot { display:block; width:287px; height:5px; background:url(../images/verification-ui6.gif) no-repeat 0px -375px; overflow:hidden; line-height:11px; } .input_public { border:#C1C1C1 1px solid;font-size:12px;line-height:20px; height:22px;padding-left:4px; } .input_error { background-color:#FBE2E2;border-color:#D28C8C;color:#A63B3B } .input_focus { background-color:#FFC;border-color:#C6C69E } .input_correct { background-color:#FBFBFB;color:#444 }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/themes/ArrowSolidBox/style/style.css
CSS
oos
1,900
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="main.aspx.cs" Inherits="TREC.Web.Suppler.main" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="Stylesheet" type="text/css" href="css/style.css" /> </head> <body style="height:auto"> <form id="form1" runat="server"> <div class="i_info" style="display: none"> <ul> <li> <img src="images/u_member.gif" width="16" height="16" title="未通过认证" align="absmiddle" /> 认证: <img src="images/u_email.gif" width="16" height="16" title="未通过邮件认证" align="absmiddle" /> <a href="#" class="l">邮件</a> &nbsp; <img src="images/u_mobile.gif" width="16" height="16" title="未通过手机认证" align="absmiddle" /> <a href="#" class="l">手机</a> &nbsp; <img src="images/u_bank.gif" width="16" height="16" title="未通过银行帐号认证" align="absmiddle" /> <a href="#" class="l">银行</a> &nbsp; <img src="images/u_truename.gif" width="16" height="16" title="通过真实姓名认证" align="absmiddle" /> <a href="#" class="l">实名</a> &nbsp; </li> <li> <img src="images/ico_member.gif" width="16" height="16" alt="" align="absmiddle" /> 资金: <strong class="f_red px14">0.00</strong> 元可用 <span class="f_gray">(0元锁定)</span>&nbsp;&nbsp; </li> <li> <img src="images/ico_credit.gif" width="16" height="16" alt="" align="absmiddle" /> 积分: <strong>0.00</strong> &nbsp;&nbsp; </ul> </div> <div class="i_quick"> <div> <ul> <li><a href="brand/brandList.aspx" class="b"> <img src="images/btn_my.gif" width="32" height="32" alt="" /><br /> <span class="f_red">品牌管理</span></a></li> <li><a href="brand/brandslist.aspx" class="b"> <img src="images/btn_message.gif" width="32" height="32" alt="" /><br /> 品牌系列</a></li> <li><a href="product/productInfo.aspx" class="b"> <img src="images/btn_style.gif" width="32" height="32" alt="" /><br /> 发布产品</a></li> <li><a href="product/productList.aspx" class="b"> <img src="images/btn_edit.gif" width="32" height="32" alt="" /><br /> 产品管理</a></li><%-- <li><a href="/company-102.aspx" target="_blank" class="b"> <img src="images/btn_home.gif" width="32" height="32" alt="" /><br /> <span class="f_red">我的商铺</span></a></li>--%> <li><a href="shop/shopList.aspx" class="b"> <img src="images/btn_edit.gif" width="32" height="32" alt="" /><br /> 店铺管理</a></li> <li><a href="memberInfo.aspx" class="b"> <img src="images/btn_favorite.gif" width="32" height="32" alt="" /><br /> 账号信息</a></li> </ul> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/main.aspx
ASP.NET
oos
3,354
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="head.ascx.cs" Inherits="TREC.Web.Suppler.ascx.head" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <div id="top"> <div class="Fcon"> <span class="f_r" style="float:right"><a href="<%=TREC.ECommerce.ECommon.WebUrl %>/suppler/help.aspx" target="_blank"><img src="<%=TREC.ECommerce.ECommon.WebUrl %>/suppler/images/kjdh.gif" /></a></span> <a href="javascript:;">您好:</a> <a href="javascript:;" style="color: #282828"><%=SupplerPageBase.memberInfo.username%></a> <a href="memberInfo.aspx" target="mainFrame">修改资料</a> | <a href="editPwd.aspx" target="mainFrame">修改密码</a> | <a href="<%=TREC.ECommerce.ECommon.WebUrl %>/loginout.aspx">退出</a> </div> </div> <div class="head headFrame" style="height: 65px;"> <div class="Fcon"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="195" height="55"> <a href="<%=TREC.ECommerce.ECommon.WebUrl %>/suppler/index.aspx"><img src="<%=TREC.ECommerce.ECommon.WebUrl %>/suppler/images/logo.jpg" title="商务中心首页" /></a> </td> <td> <div class="head_user"> <strong class="px14" style="color: #555555;"><%=EnterpriseName %></strong>(<%=SupplerPageBase.memberTypeName%> <a href="#" title="点击隐身"><span class="f_green">在线</span></a>) &nbsp;&nbsp;&nbsp; [ <a href="default.aspx" class="b">我的商务室</a> ] </div> </td> <td class="head_sch"></td> </tr> </table> </div> </div> <div class="clear"></div>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/ascx/head.ascx
ASP.NET
oos
1,932
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.ascx { public partial class head : System.Web.UI.UserControl { public string EnterpriseName = ""; protected void Page_Load(object sender, EventArgs e) { if (SupplerPageBase.memberInfo == null) { Response.Redirect(ECommon.WebUrl + "/login.aspx"); } switch (SupplerPageBase.memberInfo.type) { case (int)EnumMemberType.工厂企业: SupplerPageBase.menuList = ECMenu.GetMenuList("", " where module=15", ""); EnterpriseName = SupplerPageBase.companyInfo.title; break; case (int)EnumMemberType.经销商: SupplerPageBase.menuList = ECMenu.GetMenuList("", " where module=16", ""); EnterpriseName = SupplerPageBase.dealerInfo.title; break; case (int)EnumMemberType.卖场: SupplerPageBase.menuList = ECMenu.GetMenuList("", " where module=17", ""); EnterpriseName = SupplerPageBase.marketInfo.title; break; case (int)EnumMemberType.店铺管理员: SupplerPageBase.menuList = ECMenu.GetMenuList("", " where module=18", ""); EnterpriseName = SupplerPageBase.shopInfo.title; break; } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/ascx/head.ascx.cs
C#
oos
1,691
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productinfo.aspx.cs" Inherits="TREC.Web.Suppler.product.productinfo" EnableEventValidation="false" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href="../../resource/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/json2.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/productinfo.js"></script> <style type="text/css"> a.addproductattributenone{width:130px; height:28px; display:block; float:left; background:url("../images/c7.gif") no-repeat;} a.addproductattributecur{width:130px; height:28px; display:block; float:left; background:url("../images/c5.gif") no-repeat;} a.addproductattributecur:hover{width:130px; height:28px; display:block; float:left; background:url("../images/c6.gif") no-repeat;} td#productattributelist{background:url(../images/c1.gif) no-repeat; padding-top:30px; } #productattributelist ul { margin-left: 0px; } #productattributelist ul li { background: #f3f3f3; display: block; float: left; line-height: 30px; border-bottom: dotted 1px #bbbbbb; margin-bottom: 2px; width: 793px; overflow:hidden; } #productattributelist ul li span { display: block; float: left; padding: 0px 5px; line-height: 30px; height: 30px; margin-left: 5px; overflow: hidden; } #productattributelist ul li span.t{width:50px; overflow:hidden;} #productattributelist ul li span.m{width:217px; overflow:hidden;} #productattributelist ul li span.s{width:105px; overflow:hidden;} #productattributelist ul li span.cbm{width:35px; overflow:hidden;} #productattributelist ul li span.p{width:95px; overflow:hidden;} #productattributelist ul li span.del{width:20px; overflow:hidden; color:#f60; cursor:pointer; text-decoration:underline; font-size:14px;} #productattributelist ul li span.up{width:20px; overflow:hidden; color:#f60; font-weight:bold; float:right;} #productattributelist ul li div.c{float:left; background:#f4f4f4; width:143px; height:30px; line-height:30px;} #productattributelist ul li div.c img{width:24px; line-height:24px; height:24px; margin:0px;display:block; float:left} #attriubteDialog { display: none; width: 400px; } .aui_buttons button, .aui_buttons input[type="submit"]{ float:none;} </style> <script type="text/javascript"> $(function () { //分类下拉绑定产品类型 $("#ddlproductcategory").live("change",function(){ if($("#ddlproductcategory").val()=="7"||$("#ddlproductcategory").val()=="9"||$("#ddlproductcategory").val()=="10"||$("#ddlproductcategory").val()=="11"||$("#ddlproductcategory").val()=="12") { alert("产品分类不允许为主分类:例:不允许选择 卧室家具,请选择 卧室家具-->床"); return false; } if($("#ddlproductcategory").val()!="") { $("#addproductattribute").addClass("addproductattributecur"); $.ajax({ url:'<%=TREC.ECommerce.ECommon.WebUrl %>/ajax/ajaxproduct.ashx', data:'type=getcategorytype&v='+$("#ddlproductcategory").val(), dataType:'json', success:function(data){ $("#ddltype").html("").hide().show(); $("#ddltype").append("<option value=\"\">请选择</option>"); $.each(data,function(i){ $("#ddltype").append("<option value=\""+data[i].id+"\">"+data[i].title+"</option>"); }); } }); } else { $("#addproductattribute").removeClass("addproductattributecur"); } }); //品牌下拉。获得系列及绑定品牌数据 $("#ddlbrand").live("change",function(){ $.ajax({ url:'<%=TREC.ECommerce.ECommon.WebUrl %>/ajax/ajaxuser.ashx', data:'type=getbrands&v='+$("#ddlbrand").val(), dataType:'json', success:function(data){ $("#ddlbrands").html("").hide().show(); $("#ddlbrands").append("<option value=\"\">请选择</option>"); var m=""; var s=""; var c=""; $.each(data,function(i){ if(data[i].id!=""&& data[i].title!="") { $("#ddlbrands").append("<option value=\""+data[i].id+"\">"+data[i].title+"</option>"); } s=data[i].s; m=data[i].m; c=data[i].c; }); $("#ddlstyle").val(s); $("#ddlmaterial").val(m); $("#ddlcolor").val(c); } }); }) //编辑器 var editor1,editor2,editor3,editor4,editor5; KindEditor.ready(function (K) { editor1 = K.create('#txt101', { allowPreviewEmoticons: true, allowImageUpload: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> allowFileManager: true, fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=product&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); editor2 = K.create('#txt102', { allowPreviewEmoticons: true, allowImageUpload: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> allowFileManager: true, fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=product&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); editor3 = K.create('#txt103', { allowPreviewEmoticons: true, allowImageUpload: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> allowFileManager: true, fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=product&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); editor4 = K.create('#txt104', { allowPreviewEmoticons: true, allowImageUpload: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> allowFileManager: true, fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=product&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); editor5 = K.create('#txt105', { allowPreviewEmoticons: true, allowImageUpload: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> allowFileManager: true, fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=product&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); }); //类型名新增js操作效果 $("#selecttypename").toggle(function(){ $("#txtatypename").show(); $(this).text("关闭添加类型").css("color","#f60"); $("#ddltype").val("0"); $("#ddltype").val(""); $("#ddltype").hide(); },function(){ $("#txtatypename").hide(); $(this).text("添加其它类型").css("color","#282828"); $("#ddltype").show(); }); //属性添加按钮 $("#btnAddAttribute").click(function(){ var htmlJson=""; var listHtml=""; var productType=""; var productTypeName=""; var productMaterial=""; var phfacolor=""; var pcolortitle=""; var pacolorimg=""; var plength=""; var pawidth=""; var paheight=""; var pacbm=""; var pmarketprice=""; if(($("#ddltype").val()==""||$("#ddltype").val()=="0") && $("#txtatypename").val()=="") { alert("请选择分类-->选择类型,或点击其它新增"); return false; } if($("#ddltype").val()!="" && $("#ddltype").val()!="0"){ productType="\"typeid\":\""+$("#ddltype").val()+"\","; productTypeName="\"typename\":\""+$("#ddltype").find("option:selected").text()+"\","; listHtml+="<span class=\"t\">"+$("#ddltype").find("option:selected").text()+"</span>"; } else { productType="\"typeid\":\"0\","; productTypeName="\"typename\":\""+$("#txtatypename").val()+"\","; listHtml+="<span class=\"t\">"+$("#txtatypename").val()+"</span>"; } productMaterial="\"pmaterial\":\""+$("#txtamaterial").val()+"\","; phfacolor="\"pacolor\":\""+$("#hfacolor").val()+"\","; pcolortitle="\"pcolortitle\":\""+$("#hfacolortitle").val()+"\","; pacolorimg="\"pcimg\":\""+$("#hfacolorimg").val()+"\","; plength="\"plength\":\""+$("#txtalength").val()+"\","; pawidth="\"pwidth\":\""+$("#txtawidth").val()+"\","; paheight="\"pheight\":\""+$("#txtaheight").val()+"\","; pacbm="\"pcbm\":\""+$("#txtacbm").val()+"\","; pmarketprice="\"pmprice\":\""+$("#txtmarketprice").val()+"\""; htmlJson='{'+productType+productTypeName+productMaterial+phfacolor+pcolortitle+pacolorimg+plength+paheight+pawidth+pacbm+pmarketprice+'},'; $("#hfproductattribute").attr("value",$("#hfproductattribute").attr("value")+htmlJson); listHtml+="<div class=\"c\">"; listHtml+="<img src=\"<%=ECommon.WebUploadTempUrl %>/"+$("#hfacolorimg").val().substring(0,$("#hfacolorimg").val().length-1)+"\" />"; listHtml+="<span style='display:block; float:left; width:40px; color:"+$("#hfacolor").val()+"; margin-left:3px;'>"+$("#hfacolortitle").val()+"</span>"; listHtml+="</div>"; listHtml+="<span class=\"m\">"+$("#txtamaterial").val()+"</span>"; listHtml+="<span class=\"s\">"+$("#txtalength").val(); listHtml+="*"+$("#txtawidth").val(); listHtml+="*"+$("#txtaheight").val()+"</span>"; listHtml+="<span class=\"cbm\" >"+$("#txtacbm").val()+"</span>"; listHtml+="<span class=\"p\">&nbsp;¥"+$("#txtmarketprice").val()+"</span>"; $("#productattributelist >ul").append("<li title='"+htmlJson+"'>"+listHtml+"<span class='del' onclick='delattribute(this)' >删</span><span class='up'></span></li>"); //alert($("#hfproductattribute").attr("value"));\\D345test.close(); art.dialog({id: 'D345'}).close(); }); $("#btnSave").click(function(){ if($("#ddlproductcategory").val()=="7"||$("#ddlproductcategory").val()=="9"||$("#ddlproductcategory").val()=="10"||$("#ddlproductcategory").val()=="12"||$("#ddlproductcategory").val()=="") { alert("不允许选择主分类!"); return false; } if($("#ddlbran,#dddlstyle,#ddlmaterial,#ddlcolor").val()=="") { alert("选择品牌/风格/选材/色系/系列!"); return false; } }) }); //设置图片信息 function openImg(i) { art.dialog.open('product/productattribute.aspx', { title: '设置颜色', width:'380px', height:'150px', ok: function () { var iframe = this.iframe.contentWindow; if (!iframe.document.body) { alert('iframe还没加载完毕呢') return false; }; var form = iframe.document.getElementById('form1'), ctitle = iframe.document.getElementById('ctitle'), cvalue = iframe.document.getElementById('cvalue'), cimg = iframe.document.getElementById('hfsurface'); $("#hfacolor").attr("value",$(cvalue).val()) $("#hfacolortitle").attr("value",$(ctitle).val()) $("#hfacolorimg").attr("value",$(cimg).attr("value")); var nHtml=""; nHtml="<img src=\"<%=ECommon.WebUploadTempUrl %>/"+$(cimg).attr("value").substring(0,$(cimg).attr("value").length-1)+"\" width='24' line-height:24px; height='24' style='display:block; float:left' />"; nHtml+="<span' style='display:block; float:left; color:"+$(cvalue).val()+"; margin-left:3px;'>"+$(ctitle).val()+"</span>"; $($(i)).parent().find(".colorSee").html("").hide().show(); $($(i)).parent().find(".colorSee").html(nHtml); return true; }, cancel: true}); } //删除属性 function delattribute(i) { if($($(i)).attr("title")=='undefined'||$($(i)).attr("title")==null ||$($(i)).attr("title")=="") { if(confirm("是否确认删除规格!")){ $("#hfproductattribute").attr("value",$("#hfproductattribute").attr("value").replace($($(i)).parent().attr("title"),"")); $($(i)).parent().remove(); } return false; } if($($(i)).attr("title")!="" && $($(i)).attr("title")!='undefined') { if(confirm("是否确认删除规格,该数据原保存,删除后不可恢复! 且与该数据相关店铺价格也会清除!")) { $.ajax({ url:'<%=TREC.ECommerce.ECommon.WebUrl %>/ajax/ajaxproduct.ashx', data:'type=deleteproductattribute&v='+$($(i)).attr("title"), success:function(data){ if(data=="1") { $($(i)).parent().remove(); } else { alert("删除错误,找不到数据"); } } }); } } } function editattribute(i) { if($("#ddlproductcategory").val()=="") { alert("请选择产品所属分类再修改规格"); return false; } art.dialog.data('categoryid', $("#ddlproductcategory").val()); art.dialog.data('productattributeid',$($(i)).attr("title")); art.dialog.open('productattributeedit.aspx?id='+$($(i)).attr("title")+"&c="+$("#ddlproductcategory").val(), { title: '修改规格', width:'500px', height:'400px', ok: function () { var iframe = this.iframe.contentWindow; if (!iframe.document.body) { alert('页面正在加载……') return false; }; var form = iframe.document.getElementById('form1'), ctitle = iframe.document.getElementById('ctitle'), cvalue = iframe.document.getElementById('cvalue'), cimg = iframe.document.getElementById('hfcimg'); ctypeid=iframe.document.getElementById('ddltype'); ctypetxtname=iframe.document.getElementById('txttypename'); ctypl=iframe.document.getElementById('txtlength'); ctypw=iframe.document.getElementById('txtwidth'); ctyph=iframe.document.getElementById('txtheight'); ctypcbm=iframe.document.getElementById('txtcbm'); ctypmp=iframe.document.getElementById('hfcimg'); $("#hfacolor").attr("value",$(cvalue).val()) $("#hfacolortitle").attr("value",$(ctitle).val()) $("#hfacolorimg").attr("value",$(cimg).attr("value")); var nHtml=""; $($(i)).parent().find(".colorSee").html("").hide().show(); $($(i)).parent().find(".colorSee").html(nHtml); return true; }, cancel: true}); } function openAttribute() { if($("#ddlproductcategory").val()=="") { alert("请先选择分类"); return false; } else { $("#ddltype").val(""); $("#txtatypename").val(""); $("#txtamaterial").val(""); $("#hfacolor,#hfacolortitle,#hfacolorimg").val(""); $("#txtalength").val(""); $("#txtawidth").val(""); $("#txtaheight").val(""); $("#txtacbm").val(""); $("#txtmarketprice").val(""); } art.dialog({ content: document.getElementById('attriubteDialog'), id: 'D345', title:'添加规格', width:'500px' }); } </script> <style type="text/css"> #tabsnav{width:100%; float:left;} #tabsnav li{float:left; width:79px; height:32px; margin-left:2px;} #tabsnav li a{background:url(../images/c3.gif) no-repeat; line-height:32px; display:block; width:79px; text-align:center;} #tabsnav li a:hover,#tabsnav li a.cur{background:url(../images/c4.gif) no-repeat; no-repeat; } .tabs{width:100%; float:left; display:none} </style> <script type="text/javascript"> $(function () { SetTabs("#tabsnav"); }) function SetTabs(obj) { obj = $(obj); if ($(obj).find("a.cur").attr("href") != "") { $($(obj).find("a.cur").attr("href")).css("display", "block"); } $(obj).find("a").live("click", function () { $(obj).find("a").removeClass("cur"); $(this).addClass("cur"); $(".tabs").css("display", "none"); $($(this).attr("href")).css("display", "block"); }); } </script> </head> <body style="height: auto"> <form id="form1" runat="server"> <div id="attriubteDialog"> <table class="formTable"> <tr> <td align="right" width="60"> 类型: </td> <td> <div style="position: relative;"> <asp:DropDownList ID="ddltype" runat="server" Width="100" CssClass="select"> </asp:DropDownList> <input type="text" class="input" id="txtatypename" style="width: 94px; display: none; border-color: #f60;" /> <a href="javascript:;" id="selecttypename" style="display: inline-block; zoom: 1; *display: inline; width: 75px; line-height: 16px; margin-top:3px;" class="btn_all">添加其它类型</a> </div> </td> </tr> <tr> <td align="right"> 选材: </td> <td> <input type="text" class="input" id="txtamaterial" /> </td> </tr> <tr> <td align="right"> 颜色: </td> <td> <div class="colorSee" style="float: left; background: #f4f4f4; width: 100px; height: 24px; line-height: 24px;"> </div> <a href="javascript:;" style="display: block; float: left; width: 40px; margin-top:3px; line-height: 16px;" onclick="openImg(this)" class="btn_all">设置</a> <input type="hidden" class="input" id="hfacolor" style="width: 60px; display: none;" /> <input type="hidden" class="input" id="hfacolortitle" style="display: none; width: 60px;" /> <input type="hidden" class="input" id="hfacolorimg" style="display: none; width: 60px;" /> </td> </tr> <tr> <td align="right"> 长: </td> <td> <input type="text" class="input" id="txtalength" value="0" style="width: 65px;" /><label>&nbsp;&nbsp;(mm)</label> </td> </tr> <tr> <td align="right"> 宽: </td> <td> <input type="text" class="input" id="txtawidth" value="0" style="width: 65px" /><label>&nbsp;&nbsp;(mm)</label> </td> </tr> <tr> <td align="right"> 高: </td> <td> <input type="text" class="input" id="txtaheight" value="0" style="width: 65px" /><label>&nbsp;&nbsp;(mm)</label> </td> </tr> <tr> <td align="right"> 体积: </td> <td> <input type="text" class="input" id="txtacbm" value="0" style="width: 65px" />&nbsp;&nbsp;(打包后体积) </td> </tr> <tr> <td align="right"> 价格: </td> <td> <input type="text" class="input" id="txtmarketprice" value="0" style="width: 65px" />&nbsp;&nbsp;(市场指导价) </td> </tr> <tr> <td align="right"> </td> <td> <input type="button" class="submit" value="增加" id="btnAddAttribute" /> </td> </tr> </table> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable"> <tr> <td width="85" align="right"> 选择<b>品牌:</b> </td> <td> <asp:DropDownList ID="ddlbrand" runat="server" CssClass="select" Width="85"> </asp:DropDownList> <asp:DropDownList ID="ddlstyle" runat="server" CssClass="select" Width="85"> </asp:DropDownList> <asp:DropDownList ID="ddlmaterial" runat="server" CssClass="select" Width="150"> </asp:DropDownList> <asp:DropDownList ID="ddlcolor" runat="server" CssClass="select" Width="80"> </asp:DropDownList> <asp:DropDownList ID="ddlbrands" runat="server" CssClass="select" Width="80"> </asp:DropDownList> <div class="info"><span class="ico">&nbsp;</span> 品牌选关选项必须选择&nbsp;&nbsp; </div> </td> </tr> <tr> <td align="right"> 产品<b>编号:</b> </td> <td> <asp:TextBox ID="txtsku" runat="server" CssClass="input"></asp:TextBox> <div id="txtskuTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right">支持定制:</td> <td> <asp:RadioButtonList ID="racustomize" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal"> <asp:ListItem Text="否" Value="0" Selected="True"></asp:ListItem> <asp:ListItem Text="是" Value="1"></asp:ListItem> </asp:RadioButtonList> </td> </tr> <tr> <td align="right"> 产品<b>分类:</b> </td> <td> <asp:DropDownList ID="ddlproductcategory" runat="server" CssClass="select selectNone"> </asp:DropDownList> <Label>&nbsp;&nbsp;&nbsp;&nbsp;</Label> <asp:HiddenField ID="hfproductattribute" runat="server" /> <a href="javascript:;" onclick="openAttribute()" id="addproductattribute" class="addproductattributenone">&nbsp;&nbsp;</a> <div id="ddlproductcategoryTip" style="width:280px; float:left"></div> <label style="color:#f60;">&nbsp;&nbsp;&nbsp;<b style="color:#f60">*</b> 请选择分类然后添加产品规格</label> </td> </tr> <tr> <td id="productattributelist" colspan="2"> <ul> <%if (listproductattribute != null) { %> <%foreach (EnProductAttribute pa in listproductattribute) { %> <li><span class="t"> <%=pa.typename%></span> <div class="c"> <img src="<%=string.Format(TREC.Entity.EnFilePath.Product, ECommon.QueryId, TREC.Entity.EnFilePath.ProductAttributeColorImg)%>/<%=pa.productcolorimg %>" width='24' height='24' style="line-height: 24px; display: block; float: left" /> <span style="display: block; float: left; color: <%=pa.productcolorvalue %>; margin-left: 3px; width: 60px;"> <%=pa.productcolortitle %></span></div><span class="m"> <%=pa.productmaterial %></span> <span class="s"> <%=pa.productlength %>* <%=pa.productwidth %>* <%=pa.productheight %></span><span class="cbm"> <%=pa.productcbm %></span><span class="p">&nbsp;&nbsp;¥ <%=pa.markprice %></span> <span class='del' onclick='delattribute(this)'title="<%=pa.id %>">删</span> <%--<span style='width:20px; color:#f60; text-decoration:underline; cursor:pointer' class='edit' onclick='editattribute(this)' title="<%=pa.id %>" >改</span>--%> </li> <%} } %> </ul> </td> </tr> <tr> <td colspan="2">&nbsp;</td> </tr> <tr> <th colspan="2"> <asp:HiddenField ID="hfsurface" runat="server" /> <asp:HiddenField ID="hflogo" runat="server" /> <asp:HiddenField ID="hfbannel" runat="server" /> &nbsp;&nbsp;产品图片信息: </th> </tr> <tr> <td align="right"> &nbsp;&nbsp;缩略图:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d8.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Product, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>"> <asp:HiddenField ID="hfthumb" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File3" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> &nbsp;&nbsp; 详细图:<a href="javascript:;" class="helper" title="点击查看产品详细图片位置示意"><img src="../images/d9.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Product, ECommon.QueryId, TREC.Entity.EnFilePath.DesImage)%>"> <asp:HiddenField ID="hfdesimage" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File5" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td colspan="2">&nbsp;</td> </tr> <tr> <th colspan="2"> &nbsp;&nbsp;产品描述: </th> </tr> <tr> <td colspan="2" style="padding-top:10px;"> <ul id="tabsnav"> <li><a href="#contextd1" class="cur">风格特点</a></li> <li><a href="#contextd2">风格特点</a></li> <li><a href="#contextd3">风格特点</a></li> <li><a href="#contextd4">风格特点</a></li> <li><a href="#contextd5">风格特点</a></li> </ul> <div id="contextd1" class="tabs"> <asp:TextBox ID="txt101" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="8" Height="260" Width="100%"></asp:TextBox> </div> <div id="contextd2" class="tabs"> <asp:TextBox ID="txt102" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="8" Height="260" Width="100%"></asp:TextBox> </div> <div id="contextd3" class="tabs"> <asp:TextBox ID="txt104" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="8" Height="260" Width="100%"></asp:TextBox> </div> <div id="contextd4" class="tabs"> <asp:TextBox ID="txt105" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="8" Height="260" Width="100%"></asp:TextBox> </div> <div id="contextd5" class="tabs"> <asp:TextBox ID="txt103" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="8" Height="260" Width="100%"></asp:TextBox> </div> </td> </tr> <tr> <td align="right"> 排序: </td> <td align="left"> <asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 80px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" OnClick="btnSave_Click" /><input name="重置" type="reset" class="submit" id="btnRequest" value="重置" runat="server" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/product/productinfo.aspx
ASP.NET
oos
37,390
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productattribute.aspx.cs" Inherits="TREC.Web.Suppler.product.productattribute" %> <%@ Import Namespace="TREC.ECommerce" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="Stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/editor/kindeditor/themes/default/default.css" /> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <style type="text/css"> td{height:35px; line-height:35px;} </style> </head> <body style="height:auto"> <form id="form1" runat="server"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td width="70px" align="right">名称:</td> <td><input type="text" class="input" id="ctitle" /></td> </tr> <tr> <td align="right">色值:</td> <td><input type="text" class="input" id="cvalue" /></td> </tr> <tr> <td align="right">色板:</td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Product, ECommon.QueryId, TREC.Entity.EnFilePath.ProductAttributeColorImg)%>"> <asp:HiddenField ID="hfsurface" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"><input id="File1" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> </table> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/product/productattribute.aspx
ASP.NET
oos
2,461
using System; using System.Collections.Generic; using System.Linq; using System.Data; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using LitJson; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.product { public partial class productinfo : SupplerPageBase { public List<EnProductCon> conlist = new List<EnProductCon>(); public List<EnProductAttribute> listproductattribute = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (brandList.Count == 0) { ScriptUtils.ShowAndRedirect("先添加品牌及相关系列", "../brand/brandlist.aspx"); return; } ddlproductcategory.Items.Clear(); ddlproductcategory.DataSource = ECProductCategory.GetProductCategoryListToDDL(""); ddlproductcategory.DataTextField = "title"; ddlproductcategory.DataValueField = "id"; ddlproductcategory.DataBind(); ddlproductcategory.Items.Insert(0, new ListItem("择分类", "")); ddlbrand.DataSource = brandList; ddlbrand.DataTextField = "title"; ddlbrand.DataValueField = "id"; ddlbrand.DataBind(); ddlbrand.Items.Insert(0, new ListItem("择品牌", "")); ddlbrands.Items.Insert(0, new ListItem("择系列", "")); ddlstyle.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品风格); ddlstyle.DataTextField = "title"; ddlstyle.DataValueField = "value"; ddlstyle.DataBind(); ddlstyle.Items.Insert(0, new ListItem("选择风格", "")); ddlmaterial.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品选材); ddlmaterial.DataTextField = "title"; ddlmaterial.DataValueField = "value"; ddlmaterial.DataBind(); ddlmaterial.Items.Insert(0, new ListItem("选择选材", "")); ddlcolor.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品颜色); ddlcolor.DataTextField = "title"; ddlcolor.DataValueField = "value"; ddlcolor.DataBind(); ddlcolor.Items.Insert(0, new ListItem("选择色系", "")); ddltype.Items.Insert(0, new ListItem("选择类型", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnProduct model = ECProduct.GetProductInfo(" where id=" + ECommon.QueryId); if (model != null) { this.txtsku.Text = model.sku; ddlproductcategory.SelectedValue = model.categoryid.ToString(); ddlbrand.SelectedValue = model.brandid.ToString(); ddlbrands.DataSource = ECBrand.GetBrandsList(" brandid=" + model.brandid); ddlbrands.DataTextField = "title"; ddlbrands.DataValueField = "id"; ddlbrands.DataBind(); ddlbrands.Items.Insert(0, new ListItem("选择系列", "")); ddlbrands.SelectedValue = model.brandsid.ToString(); ddlstyle.SelectedValue = model.stylevalue; ddlcolor.SelectedValue = model.colorvalue; ddlmaterial.SelectedValue = model.materialvalue; racustomize.SelectedValue = model.customize.ToString(); ddltype.Items.Clear(); ddltype.DataSource = ECConfig.GetConfigList(" type=" + (int)EnumConfigByProduct.产品类型 + " and value in(" + ECPCategoryPTyp.GetProductCategoryTypeValueList(model.categoryid) + ")"); ddltype.DataTextField = "title"; ddltype.DataValueField = "value"; ddltype.DataBind(); ddltype.Items.Insert(0, new ListItem("选择类型", "")); this.hfsurface.Value = model.surface; this.hflogo.Value = model.logo; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.hfdesimage.Value = model.desimage; conlist = ECProduct.GetProductConList(" productid=" + model.id); if (conlist.Count > 0) { txt101.Text = conlist.Where(x => x.contype == (int)EnumProductConType.风格特点).Count() > 0 ? conlist.Where(x => x.contype == (int)EnumProductConType.风格特点).ToList()[0].con : ""; txt102.Text = conlist.Where(x => x.contype == (int)EnumProductConType.产品细节).Count() > 0 ? conlist.Where(x => x.contype == (int)EnumProductConType.产品细节).ToList()[0].con : ""; txt103.Text = conlist.Where(x => x.contype == (int)EnumProductConType.材质工艺).Count() > 0 ? conlist.Where(x => x.contype == (int)EnumProductConType.材质工艺).ToList()[0].con : ""; txt104.Text = conlist.Where(x => x.contype == (int)EnumProductConType.保养说明).Count() > 0 ? conlist.Where(x => x.contype == (int)EnumProductConType.保养说明).ToList()[0].con : ""; txt105.Text = conlist.Where(x => x.contype == (int)EnumProductConType.配送周期).Count() > 0 ? conlist.Where(x => x.contype == (int)EnumProductConType.配送周期).ToList()[0].con : ""; } listproductattribute = ECProductAttribute.GetProductAttributeList(" productno='" + model.no + "'"); SetPermission(model.createmid, model.companyid, 0, 0, 0,0, (System.Web.UI.WebControls.WebControl)btnSave, (System.Web.UI.HtmlControls.HtmlControl)btnRequest); } } } protected void btnSave_Click(object sender, EventArgs e) { EnProduct model = null; string strErr = ""; if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECProduct.GetProductInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); } if (model == null) { model = new EnProduct(); model.no = ""; model.hits = 0; model.sort = 0; model.createmid = memberInfo.id; model.title = ""; model.attribute = ""; model.auditstatus = 0; model.linestatus = 0; } string shottitle = ""; string tcolor = ""; string sku = this.txtsku.Text; string letter = ""; int categoryid = int.Parse(ddlproductcategory.SelectedValue); string categorytitle = ddlproductcategory.SelectedItem.Text.Replace("-", "").Replace("|", ""); string subcategoryidlist = ""; string subcategorytitlelist = ""; int brandid = int.Parse(ddlbrand.SelectedValue); string brandtitle = ddlbrand.SelectedItem.Text; int brandsid = int.Parse(Request.Params["ddlbrands"].ToString()); string brandstitle = ddlbrands.SelectedItem.Text; string stylevalue = ddlstyle.SelectedValue; string stylename = ddlstyle.SelectedItem.Text; string colorvalue = ddlcolor.SelectedValue; string colorname = ddlcolor.SelectedItem.Text; string materialvalue = ddlmaterial.SelectedValue; string materialname = ddlmaterial.SelectedItem.Text; string unit = "张"; string localitycode = ""; string shipcode = ""; string descript = ""; int customize = int.Parse(racustomize.SelectedValue); string surface = this.hfsurface.Value; string logo = this.hflogo.Value; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string desimage = this.hfdesimage.Value; string tob2c = ""; int comopanyid = 0; string companyname = ""; int lastedid = 0; DateTime lastedittime = DateTime.Now; model.shottitle = shottitle; model.tcolor = tcolor; model.sku = sku; model.letter = letter; model.categoryid = categoryid; model.categorytitle = categorytitle; model.subcategoryidlist = subcategoryidlist; model.subcategorytitlelist = subcategorytitlelist; model.brandid = brandid; model.brandtitle = brandtitle; model.brandsid = brandsid; model.brandstitle = brandstitle; model.stylevalue = stylevalue; model.stylename = stylename; model.colorname = colorname; model.colorvalue = colorvalue; model.materialvalue = materialvalue; model.materialname = materialname; model.unit = unit; model.localitycode = localitycode; model.shipcode = shipcode; model.customize = customize; model.surface = surface; model.logo = logo; model.thumb = thumb; model.bannel = bannel; model.desimage = desimage; model.descript = descript; model.tob2c = tob2c; model.companyid = comopanyid; model.companyname = companyname; model.lastedid = lastedid; model.lastedittime = lastedittime; int aid = ECProduct.EditProduct(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); #region 处理规格 if (hfproductattribute.Value != "") { string objJson = "[" + hfproductattribute.Value.Substring(0, hfproductattribute.Value.Length - 1) + "]"; JsonData jd = JsonMapper.ToObject(objJson); foreach (JsonData j in jd) { JsonData i = j; EnProductAttribute m = new EnProductAttribute(); m.productid = aid; m.productno = ""; m.productsku = model.sku; m.typevalue = i["typeid"].ToString(); m.typename = i["typename"].ToString(); m.productstyle = ""; m.productmaterial = i["pmaterial"].ToString(); m.productcolorimg = i["pcimg"].ToString().EndsWith(",") ? i["pcimg"].ToString().Substring(0, i["pcimg"].ToString().Length - 1) : i["pcimg"].ToString(); if (m.productcolorimg != "") { ecUpload.MoveContentFiles(m.productcolorimg.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Product, aid, EnFilePath.ProductAttributeColorImg)); } m.productcolortitle = i["pcolortitle"].ToString(); m.productcolorvalue = i["pacolor"].ToString(); m.productwidth = TypeConverter.StrToDeimal(i["pwidth"].ToString()); m.productheight = TypeConverter.StrToDeimal(i["pheight"].ToString()); m.productlength = TypeConverter.StrToDeimal(i["plength"].ToString()); m.productcbm = TypeConverter.StrToDeimal(i["pcbm"].ToString()); m.buyprice = 0; m.markprice = TypeConverter.StrToDeimal(i["pmprice"].ToString()); m.saleprice = 0; m.otherinfo = ""; m.storage = 0; m.sort = 0; m.isdefault = 0; ECProductAttribute.EditProductAttribute(m); } } #endregion #region 处理图片 if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Product, aid, EnFilePath.Thumb)); } if (desimage.Length > 0) { ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.Product, aid, EnFilePath.DesImage)); } StringBuilder imglist = Utils.GetImgUrl(txt101.Text + txt102.Text + txt103.Text + txt104.Text + txt105.Text); if (imglist.ToString().Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Product, aid, EnFilePath.ConImage)); } } if (memberInfo.type == (int)EnumMemberType.经销商) { UiCommon.JscriptPrint(this.Page, "编辑成功!", "dealerproductlist.aspx", "Success"); } if (memberInfo.type == (int)EnumMemberType.工厂企业) { UiCommon.JscriptPrint(this.Page, "编辑成功!", "productlist.aspx", "Success"); } #endregion #region 处理内容 txt101.Text = txt101.Text.Replace(TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Product, aid, EnFilePath.ConImage)); txt102.Text = txt102.Text.Replace(TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Product, aid, EnFilePath.ConImage)); txt103.Text = txt103.Text.Replace(TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Product, aid, EnFilePath.ConImage)); txt104.Text = txt104.Text.Replace(TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Product, aid, EnFilePath.ConImage)); txt105.Text = txt105.Text.Replace(TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Product, aid, EnFilePath.ConImage)); conlist = ECProduct.GetProductConList(" productid=" + model.id); EnProductCon m1 = new EnProductCon(); m1.productid = aid; m1.contype = (int)EnumProductConType.风格特点; m1.con = txt101.Text; if (conlist.Where(x => x.contype == (int)EnumProductConType.配送周期).Count() > 0) { m1.id = conlist.Where(x => x.contype == (int)EnumProductConType.配送周期).ToList()[0].id; ECProduct.EditProductCon(m1); } else if (txt101.Text != "") { ECProduct.EditProductCon(m1); } EnProductCon m2 = new EnProductCon(); m2.productid = aid; m2.contype = (int)EnumProductConType.产品细节; m2.con = txt102.Text; if (conlist.Where(x => x.contype == (int)EnumProductConType.产品细节).Count() > 0) { m2.id = conlist.Where(x => x.contype == (int)EnumProductConType.产品细节).ToList()[0].id; ECProduct.EditProductCon(m2); } else if (txt102.Text != "") { ECProduct.EditProductCon(m2); } EnProductCon m3 = new EnProductCon(); m3.productid = aid; m3.contype = (int)EnumProductConType.材质工艺; m3.con = txt103.Text; if (conlist.Where(x => x.contype == (int)EnumProductConType.材质工艺).Count() > 0) { m3.id = conlist.Where(x => x.contype == (int)EnumProductConType.材质工艺).ToList()[0].id; ECProduct.EditProductCon(m3); } else if (txt103.Text != "") { ECProduct.EditProductCon(m3); } EnProductCon m4 = new EnProductCon(); m4.productid = aid; m4.contype = (int)EnumProductConType.保养说明; m4.con = txt104.Text; if (conlist.Where(x => x.contype == (int)EnumProductConType.保养说明).Count() > 0) { m4.id = conlist.Where(x => x.contype == (int)EnumProductConType.保养说明).ToList()[0].id; ECProduct.EditProductCon(m4); } else if (txt104.Text != "") { ECProduct.EditProductCon(m4); } EnProductCon m5 = new EnProductCon(); m5.productid = aid; m5.contype = (int)EnumProductConType.配送周期; m5.con = txt105.Text; if (conlist.Where(x => x.contype == (int)EnumProductConType.配送周期).Count() > 0) { m5.id = conlist.Where(x => x.contype == (int)EnumProductConType.配送周期).ToList()[0].id; ECProduct.EditProductCon(m5); } else if (txt105.Text != "") { ECProduct.EditProductCon(m5); } #endregion } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/product/productinfo.aspx.cs
C#
oos
19,072
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.Suppler.product { public partial class productattribute : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/product/productattribute.aspx.cs
C#
oos
354
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productlist.aspx.cs" Inherits="TREC.Web.Suppler.product.productlist" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table class="searchtable"> <tr> <td align="right">分类:</td><td><asp:DropDownList ID="ddlproductcategory" runat="server"></asp:DropDownList></td> <td align="right">品牌:</td><td><asp:DropDownList ID="ddlbrand" runat="server"></asp:DropDownList></td> <td align="right">名称:</td><td><asp:TextBox ID="txtProductName" runat="server" CssClass="input"></asp:TextBox></td> <td><span class="btn_bg"> <asp:LinkButton ID="lkBtnSearch" runat="server" onclick="lkBtnSearch_Click" >查 找</asp:LinkButton>&nbsp;&nbsp; </span></td> </tr> </table> <div class="clear"></div> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="50px" align="center">编号</th> <th align="center" width="80">分类名称</th> <th align="center" width="120"></th> <th align="left" class="l">产品名称</th> <th align="center" width="80">品牌</th> <th align="center" width="80">系列</th> <th align="center" width="80">风格</th> <th align="center" width="80">色系</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="center"><a href="#"><%#Eval("categorytitle")%></a></td> <td align="center" style="height:70px; line-height:70;"><a href="productinfo.aspx?edit=1&id=<%#Eval("id") %>"><img width="105" height="60" src='<%#TREC.Entity.EnFilePath.GetProductThumbPath(Eval("id") != null ? Eval("id").ToString() : "", Eval("thumb") != null ? Eval("thumb").ToString() : "") %>' /></a></td> <td align="left" class="l edit"><a href="productinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("HtmlProductName")%></a></td> <td align="center"><%#Eval("brandtitle")%></td> <td align="center"><%#Eval("brandstitle")%></td> <td align="center"><%#Eval("stylename")%></td> <td align="center"><%#Eval("colorname")%></td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" FirstPageText="首页" LastPageText="尾页" PageSize="10" NextPageText="下一页" PrevPageText="上一页" onpagechanged="AspNetPager1_PageChanged"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/product/productlist.aspx
ASP.NET
oos
3,946
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.product { public partial class productlist : SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlproductcategory.Items.Clear(); ddlproductcategory.DataSource = ECProductCategory.GetProductCategoryListToDDL(""); ddlproductcategory.DataTextField = "title"; ddlproductcategory.DataValueField = "id"; ddlproductcategory.DataBind(); ddlproductcategory.Items.Insert(0, new ListItem("请选择分类", "")); ddlbrand.DataSource = brandList; ddlbrand.DataTextField = "title"; ddlbrand.DataValueField = "id"; ddlbrand.DataBind(); ddlbrand.Items.Insert(0, new ListItem("请选择品牌", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECProduct.DeleteProduct(TypeConverter.StrToInt(ECommon.QueryId)); } string strWhere = ""; switch (memberInfo.type) { case (int)EnumMemberType.工厂企业: strWhere += " and companyid=" + companyInfo.id; break; } if (ddlproductcategory.SelectedValue != "" && ddlproductcategory.SelectedValue != "0") { strWhere += " and categoryid=" + ddlproductcategory.SelectedValue; } if (ddlbrand.SelectedValue != "" && ddlbrand.SelectedValue != "0") { strWhere += " and brandid=" + ddlbrand.SelectedValue; } if (txtProductName.Text!="") { strWhere += " and (isnull(sku,'')+isnull(title,'')+isnull(shottitle,'')+isnull(brandtitle,'') like '%" + txtProductName.Text + "%')"; } strWhere = strWhere.Length > 0 ? strWhere.Substring(4, strWhere.Length-4) : strWhere; int pageCount=0; rptList.DataSource = ECProduct.GetProductList(AspNetPager1.CurrentPageIndex, AspNetPager1.PageSize, strWhere, out pageCount); rptList.DataBind(); AspNetPager1.RecordCount = pageCount; } protected void lbtnDel_Click(object sender, EventArgs e) { string idlist=""; for (int i = 0; i < rptList.Items.Count; i++) { string id = ((Label)rptList.Items[i].FindControl("lb_id")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { idlist += id + ","; } } if (idlist.Length > 0) { ECProduct.DeleteProductByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "productlist.aspx", "Success"); } } protected void lkBtnSearch_Click(object sender, EventArgs e) { ShowData(); } protected void AspNetPager1_PageChanged(object sender, EventArgs e) { ShowData(); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/product/productlist.aspx.cs
C#
oos
3,673
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dealerproductlist.aspx.cs" Inherits="TREC.Web.Suppler.product.dealerproductlist" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $("tr[isEdit='False']").poshytip(); }) </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table> <tr> <td>分类:</td><td><asp:DropDownList ID="ddlproductcategory" runat="server"></asp:DropDownList></td> <td>品牌:</td><td><asp:DropDownList ID="ddlbrand" runat="server"></asp:DropDownList></td> <td>名称:</td><td><asp:TextBox ID="txtProductName" runat="server" CssClass="input"></asp:TextBox></td> <td><span class="btn_bg"> <asp:LinkButton ID="lkBtnSearch" runat="server" onclick="lkBtnSearch_Click" >查 找</asp:LinkButton>&nbsp;&nbsp; </span></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="50px" align="center">编号</th> <th align="center" width="80">分类名称</th> <th align="left" class="l">产品名称</th> <th align="center" width="80">品牌</th> <th align="center" width="80">系列</th> <th align="center" width="80">风格</th> <th align="center" width="80">色系</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr isEdit="<%#GetEdit(Eval("createmid").ToString()) %>" title='<%#!GetEdit(Eval("createmid").ToString())?Eval("HtmlProductName").ToString()+"&nbsp;&nbsp;不是您创建的,可查看,不可编辑删除":""%>'> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" Enabled='<%#GetEdit(Eval("createmid").ToString()) %>' /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="center"><a href="#"><%#Eval("categorytitle")%></a></td> <td align="left" class="l edit"><a href="productinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("HtmlProductName")%></a></td> <td align="center"><%#Eval("brandtitle")%></td> <td align="center"><%#Eval("brandstitle")%></td> <td align="center"><%#Eval("stylename")%></td> <td align="center"><%#Eval("colorname")%></td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" onpagechanged="AspNetPager1_PageChanged"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/product/dealerproductlist.aspx
ASP.NET
oos
4,041
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.product { public partial class dealerproductlist : SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlproductcategory.Items.Clear(); ddlproductcategory.DataSource = ECProductCategory.GetProductCategoryListToDDL(""); ddlproductcategory.DataTextField = "title"; ddlproductcategory.DataValueField = "id"; ddlproductcategory.DataBind(); ddlproductcategory.Items.Insert(0, new ListItem("请选择分类", "")); ddlbrand.DataSource = brandList; ddlbrand.DataTextField = "title"; ddlbrand.DataValueField = "id"; ddlbrand.DataBind(); ddlbrand.Items.Insert(0, new ListItem("请选择品牌", "")); ShowData(); } } protected void ShowData() { string strWhere = ""; if (brandidlist.Length > 0) { strWhere = " and brandid in (" + brandidlist + ") and brandid!=0"; } if (ddlproductcategory.SelectedValue != "" && ddlproductcategory.SelectedValue != "0") { strWhere += " and categoryid=" + ddlproductcategory.SelectedValue; } if (ddlbrand.SelectedValue != "" && ddlbrand.SelectedValue != "0") { strWhere += " and brandid=" + ddlbrand.SelectedValue; } if (txtProductName.Text != "") { strWhere += " and (isnull(sku,'')+isnull(title,'')+isnull(shottitle,'')+isnull(brandtitle,'') like '%" + txtProductName.Text + "%')"; } strWhere = strWhere.Length > 0 ? strWhere.Substring(4, strWhere.Length - 4) : strWhere; int pageCount=0; rptList.DataSource = ECProduct.GetProductList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out pageCount); rptList.DataBind(); AspNetPager1.RecordCount = pageCount; } protected void lbtnDel_Click(object sender, EventArgs e) { string idlist=""; for (int i = 0; i < rptList.Items.Count; i++) { string id = ((Label)rptList.Items[i].FindControl("lb_id")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { idlist += id + ","; } } if (idlist.Length > 0) { ECProduct.DeleteProductByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "dealerproductlist.aspx", "Success"); } } protected void lkBtnSearch_Click(object sender, EventArgs e) { ShowData(); } protected void AspNetPager1_PageChanged(object sender, EventArgs e) { ShowData(); } protected bool GetEdit(string mid) { if (mid == memberInfo.id.ToString()) return true; return false; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/product/dealerproductlist.aspx.cs
C#
oos
3,610
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="marketstoryinfo.aspx.cs" Inherits="TREC.Web.Suppler.market.marketstoryinfo" EnableEventValidation="false" %> <%@ Import Namespace="TREC.ECommerce" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.validate.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/additional-methods.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/messages_cn.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript"> $(function () { //表单验证JS $("#form1").validate({ //出错时添加的标签 errorElement: "span", showErrors: function (errorMap, errorList) { if (errorList.length > 0) { if ($("#" + errorList[0].element.id).next() != null) { $("#" + errorList[0].element.id).next().remove(); } } this.defaultShowErrors(); }, success: function (label) { //正确时的样式 label.text(" ").addClass("success"); } }); var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=market&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'link', 'fullscreen'] }); }); $("#ddlPro").live("change", function () { if ($(this).val() != "" && $(this).val() != "0") { $.ajax({ url: "<%=ECommon.WebUrl %>/ajaxtools/ajaxarea.ashx", data: "type=c&p=" + $(this).val(), success: function (data) { $("#ddlregcity").html(data) }, error: function (d, m) { alert(m); } }); } }) }); </script> </head> <body style="height:700px;"> <form id="form1" runat="server"> <table class="formTable"> <tr> <td align="right" width="70"> 楼层名称: </td> <td width="200"> <asp:TextBox ID="txttitle" runat="server" CssClass="input required w160"></asp:TextBox>(*例:一楼,二楼) </td> </tr> <tr style="display:none"> <td align="right" valign="top"> 形&nbsp;象&nbsp;&nbsp;图: </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.Surface)%>"> <asp:HiddenField ID="hfsurface" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File1" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display:none"> <td width="70px" align="right"> 企业标志: </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.Logo)%>"> <asp:HiddenField ID="hflogo" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File2" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 楼层图:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d10.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>"> <asp:HiddenField ID="hfthumb" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File3" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display:none"> <td align="right"> 广告幻灯: </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.Banner)%>"> <asp:HiddenField ID="hfbannel" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File4" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display:none"> <td align="right"> 企业展示: </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.DesImage)%>"> <asp:HiddenField ID="hfdesimage" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File5" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display:none"> <td align="right"> 排序: </td> <td> <asp:TextBox ID="txtsort" runat="server" CssClass="input required w160">0</asp:TextBox> </td> </tr> <tr style="display:none"> <td align="right"> 楼层描述: </td> <td> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="660" Height="220"></asp:TextBox> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 180px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" OnClick="btnSave_Click" /><input name="重置" type="reset" class="submit" value="重置" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/marketstoryinfo.aspx
ASP.NET
oos
9,160
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.market { public partial class marketstoryinfo : SupplerPageBase { public string areaCode = ""; public EnMember _memberInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnMarketStorey model = ECMarketStorey.GetMarketStoreyInfo(" where id=" + ECommon.QueryId); if (model != null) { this.txttitle.Text = model.title; this.hfsurface.Value = model.surface; this.hflogo.Value = model.logo; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.hfdesimage.Value = model.desimage; this.txtdescript.Text = model.descript; this.txtsort.Text = model.sort.ToString(); } } } protected void btnSave_Click(object sender, EventArgs e) { TREC.Entity.EnMarketStorey model = null; string strErr = ""; if (this.txttitle.Text.Trim().Length == 0) { strErr += "title不能为空!\\n"; } if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model= ECMarketStorey.GetMarketStoreyInfo(" where id=" + ECommon.QueryId); } if (model == null) { model = new EnMarketStorey(); } int marketid = marketInfo.id; string markettitle = marketInfo.title; string title = this.txttitle.Text; string number = "0"; string surface = this.hfsurface.Value; string logo = this.hflogo.Value; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string desimage = this.hfdesimage.Value; string descript = this.txtdescript.Text; string keywords = ""; string template = ""; int hits = 0; int sort = int.Parse(this.txtsort.Text); int lastedid = memberInfo.id; DateTime lastedittime = DateTime.Now; model.marketid = marketid; model.markettitle = markettitle; model.title = title; model.number = number; model.surface = surface; model.logo = logo; model.thumb = thumb; model.bannel = bannel; model.desimage = desimage; model.descript = descript; model.keywords = keywords; model.template = template; model.hits = hits; model.sort = sort; model.lastedid = lastedid; model.lastedittime = lastedittime; int aid = ECMarketStorey.EditMarketStorey(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (surface.Length > 0) { surface = surface.StartsWith(",") ? surface.Substring(1, surface.Length - 1) : surface; surface = surface.EndsWith(",") ? surface.Substring(0, surface.Length - 1) : surface; ecUpload.MoveFiles(surface.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.Surface)); } if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.Thumb)); } if (logo.Length > 0) { ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.Logo)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.Banner)); } if (desimage.Length > 0) { ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.DesImage)); } UiCommon.JscriptPrint(this.Page, "编辑成功!", "marketstorylist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/marketstoryinfo.aspx.cs
C#
oos
5,024
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="marketinfo.aspx.cs" Inherits="TREC.Web.Suppler.market.marketinfo" EnableEventValidation="false" %> <%@ Import Namespace="TREC.ECommerce" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/marketinfo.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=market&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); }); $("#ddlPro").live("change", function () { if ($(this).val() != "" && $(this).val() != "0") { $.ajax({ url: "<%=ECommon.WebUrl %>/ajaxtools/ajaxarea.ashx", data: "type=c&p=" + $(this).val(), success: function (data) { $("#ddlregcity").html(data) }, error: function (d, m) { alert(m); } }); } }) }); </script> </head> <body style="height: auto"> <form id="form1" runat="server"> <table class="formTable"> <tr> <th colspan="2"> &nbsp;&nbsp;基本信息: </th> </tr> <tr> <td align="right" width="70"> 卖场名称: </td> <td> <asp:TextBox ID="txttitle" runat="server" CssClass="input required w250"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 名称索引: </td> <td> <asp:TextBox ID="txtletter" runat="server" CssClass="input required w250"></asp:TextBox> <div id="txtletterTip" style="width:280px; float:left"></div> </td> </tr> <tr style="display:none"> <td align="right"> 人员规格 : </td> <td> <asp:DropDownList ID="ddlstaffsize" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> </td> </tr> <tr style="display:none"> <td align="right"> 注册年份: </td> <td> <asp:TextBox ID="txtregyear" runat="server" CssClass="input w250 required digits"></asp:TextBox> </td> </tr> <tr style="display:none"> <td align="right"> 注册城市: </td> <td> <asp:DropDownList ID="ddlPro" runat="server" CssClass="select"> </asp:DropDownList> <asp:DropDownList ID="ddlregcity" runat="server" CssClass="select selectNone"> </asp:DropDownList> </td> </tr> <tr> <td align="right"> 营业面积: </td> <td> <asp:TextBox ID="txtcbm" runat="server" CssClass="input number" Width="45"></asp:TextBox><label>(平方米)</label> </td> </tr> <tr> <td align="right"> 投诉电话: </td> <td> <asp:TextBox ID="txtlphone" runat="server" CssClass="input w250"></asp:TextBox> <div id="txtlphoneTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 招商电话: </td> <td> <asp:TextBox ID="txtzphone" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 乘车路线: </td> <td> <asp:TextBox ID="txtbusroute" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 营业时间: </td> <td> <asp:TextBox ID="txthours" runat="server" CssClass="input w380"></asp:TextBox> </td> </tr> <tr style="display:none"> <td align="right"> 业务描述: </td> <td> <asp:TextBox ID="txtbuy" runat="server" CssClass="w250 textarea" TextMode="MultiLine" Rows="4"></asp:TextBox><label>长度不超过250字符,生产/销售/租凭业务描述</label> </td> </tr> <tr> <th colspan="2"> &nbsp;&nbsp; 联系信息: </th> </tr> <tr> <td align="right" > 地区: </td> <td> <div class="_droparea" id="ddlareacode" title="<%=areaCode %>"> </div> </td> </tr> <tr> <td align="right"> 地址: </td> <td> <asp:TextBox ID="txtaddress" runat="server" CssClass="input w380"></asp:TextBox> <div id="txtaddressTip" style="width:280px; float:left"></div> </td> </tr> <tr style="display: none"> <td align="right"> 联系人: </td> <td> <asp:TextBox ID="txtlinkman" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 手机 : </td> <td> <asp:TextBox ID="txtmphone" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 电话 : </td> <td> <asp:TextBox ID="txtphone" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 传真 : </td> <td> <asp:TextBox ID="txtfax" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 邮箱 : </td> <td> <asp:TextBox ID="txtemail" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 邮编 : </td> <td> <asp:TextBox ID="txtpostcode" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 网址 : </td> <td> <asp:TextBox ID="txthomepage" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <th colspan="2"> &nbsp;&nbsp; 图片信息: </th> </tr> <tr> <td align="right" valign="top" width="88"> 形&nbsp;象&nbsp;&nbsp;图:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.Surface)%>"> <asp:HiddenField ID="hfsurface" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File1" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td width="70px" align="right"> 企业标志:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.Logo)%>"> <asp:HiddenField ID="hflogo" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File2" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 缩&nbsp;略&nbsp;&nbsp;图:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>"> <asp:HiddenField ID="hfthumb" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File3" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 广告幻灯:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.Banner)%>"> <asp:HiddenField ID="hfbannel" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File4" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display: none"> <td align="right"> 企业展示:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.DesImage)%>"> <asp:HiddenField ID="hfdesimage" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File5" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> </table> <div class="clear"> </div> <table class="formTable" width="100%"> <tr> <th colspan="2"> &nbsp;&nbsp;卖场介绍: </th> </tr> <tr> <td colspan="2"> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="98%" Height="220"></asp:TextBox> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 180px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" OnClick="btnSave_Click" /><input name="重置" type="reset" class="submit" value="重置" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/marketinfo.aspx
ASP.NET
oos
15,360
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.market { public partial class marketinfo : SupplerPageBase { public string areaCode = ""; public EnMember _memberInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlstaffsize.Items.Clear(); ddlstaffsize.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.企业配置 + " and type=" + (int)EnumConfigByEnterprise.人员规模); ddlstaffsize.DataTextField = "title"; ddlstaffsize.DataValueField = "value"; ddlstaffsize.DataBind(); ddlstaffsize.Items.Insert(0, new ListItem("请选择", "")); ddlPro.Items.Clear(); ddlPro.DataSource = ECArea.GetAreaList(" parentcode=0"); ddlPro.DataTextField = "areaname"; ddlPro.DataValueField = "areacode"; ddlPro.DataBind(); ddlPro.Items.Insert(0, new ListItem("请选择", "")); ddlregcity.Items.Clear(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ShowData(); } } protected void ShowData() { if (memberInfo.type!=(int)EnumMemberType.卖场) { UiCommon.JscriptPrint(this.Page, "对不起您不是卖场账号!", "../main.aspx", "error"); } else { EnMarket model = ECMarket.GetMarketInfo(" where id=" + marketInfo.id); if (model != null) { txttitle.Text = model.title; this.txtletter.Text = model.letter; areaCode = model.areacode; this.txtaddress.Text = model.address; this.ddlstaffsize.SelectedValue = model.staffsize.ToString(); this.txtregyear.Text = model.regyear; if (!string.IsNullOrEmpty(model.regcity)) { this.ddlregcity.SelectedValue = model.regcity; this.ddlPro.SelectedValue = model.regcity.Substring(0, 2) + "0000"; if (model.regcity != model.regcity.Substring(0, 2) + "0000") { ddlregcity.Items.Clear(); ddlregcity.DataSource = ECArea.GetAreaList(" parentcode=" + ddlPro.SelectedValue); ddlregcity.DataTextField = "areaname"; ddlregcity.DataValueField = "areacode"; ddlregcity.DataBind(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlregcity.SelectedValue = model.regcity; } } if (ddlPro.SelectedValue != "") { ddlregcity.Items.Clear(); ddlregcity.DataSource = ECArea.GetAreaList(" parentcode=" + ddlPro.SelectedValue); ddlregcity.DataTextField = "areaname"; ddlregcity.DataValueField = "areacode"; ddlregcity.DataBind(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlregcity.SelectedValue = model.regcity; } this.txtbuy.Text = model.buy; this.txtlinkman.Text = model.linkman; this.txtphone.Text = model.phone; this.txtmphone.Text = model.mphone; this.txtfax.Text = model.fax; this.txtemail.Text = model.email; this.txtpostcode.Text = model.postcode; this.txthomepage.Text = model.homepage; this.hfsurface.Value = model.surface; this.hflogo.Value = model.logo; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.hfdesimage.Value = model.desimage; this.txtdescript.Text = model.descript; this.txtcbm.Text = model.cbm.ToString(); this.txtlphone.Text = model.lphone; this.txtzphone.Text = model.zphone; this.txtbusroute.Text = model.busroute; this.txthours.Text = model.hours; } } } protected void btnSave_Click(object sender, EventArgs e) { EnMarket model = ECMarket.GetMarketInfo(" where id=" + marketInfo.id); string title = txttitle.Text; string letter = this.txtletter.Text; string industry = ""; string productcategory = ""; string areacode = Request.Form["ddlareacode_value"] == null ? Request.Params["ddlareacode_value"] == null ? "" : Request.Params["ddlareacode_value"].ToString() : Request.Form["ddlareacode_value"]; string address = this.txtaddress.Text; int staffsize = TypeConverter.StrToInt(ddlstaffsize.SelectedValue); string regyear = this.txtregyear.Text; string regcity = Request.Form["ddlregcity"] == null ? Request.Form["ddlregcity"] == null ? "" : Request.Form["ddlregcity"].ToString() : Request.Form["ddlregcity"].ToString(); string buy = this.txtbuy.Text; string sell = ""; string linkman = this.txtlinkman.Text; string phone = this.txtphone.Text; string mphone = this.txtmphone.Text; string fax = this.txtfax.Text; string email = this.txtemail.Text; string postcode = this.txtpostcode.Text; string homepage = this.txthomepage.Text; string surface = this.hfsurface.Value; string logo = this.hflogo.Value; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string desimage = this.hfdesimage.Value; string descript = this.txtdescript.Text; DateTime lastedittime = DateTime.Now; model.title = title; model.letter = letter; model.industry = industry; model.productcategory = productcategory; model.areacode = areacode; model.address = address; model.staffsize = staffsize; model.regyear = regyear; model.regcity = regcity; model.buy = buy; model.sell = sell; model.linkman = linkman; model.phone = phone; model.mphone = mphone; model.fax = fax; model.email = email; model.postcode = postcode; model.homepage = homepage; model.surface = surface; model.logo = logo; model.thumb = thumb; model.bannel = bannel; model.desimage = desimage; model.descript = descript; model.lastedittime = lastedittime; model.cbm = TypeConverter.StrToDeimal(txtcbm.Text); model.lphone = this.txtlphone.Text; model.zphone = this.txtzphone.Text; model.busroute = this.txtbusroute.Text; model.hours = this.txthours.Text; model.lastedid = memberInfo.id; model.mapapi = ""; int aid = ECMarket.EditMarket(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (surface.Length > 0) { surface = surface.StartsWith(",") ? surface.Substring(1, surface.Length - 1) : surface; surface = surface.EndsWith(",") ? surface.Substring(0, surface.Length - 1) : surface; ecUpload.MoveFiles(surface.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.Surface)); } if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.Thumb)); } if (logo.Length > 0) { ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.Logo)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.Banner)); } if (desimage.Length > 0) { ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.DesImage)); } StringBuilder imglist = Utils.GetImgUrl(model.descript); if (Utils.GetImgUrl(model.descript).Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ECMarket.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Market, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.ConImage)); } } UiCommon.JscriptPrint(this.Page, "编辑成功!", "default.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/marketinfo.aspx.cs
C#
oos
10,481
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="marketstoryshoplist.aspx.cs" Inherits="TREC.Web.Suppler.market.marketstoryshoplist" %> <%@ Import Namespace="TREC.ECommerce" %><%@ Import Namespace="TREC.Entity" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); }) </script> <style type="text/css"> .mslist{float:left; border-bottom:1px solid #cfcfcf; width:99%; margin:10px 0px;} .mslist li{float:left; padding:0px 5px;height:24px; } .mslist li a{ background:#f4f4f4; display:block; padding:0px 8px; height:24px; line-height:24px;} .mslist li a.cur,.mslist li a:hover{background:#f60;} </style> </head> <body style="height:auto"> <form id="form1" runat="server"> <ul class="mslist"> <li><a href="marketstoryshoplist.aspx?sid=-1" class="<%=UiCommon.QueryStringCur("sid", "-1", "", "cur")%>">未加入</a></li> <%foreach (EnMarketStorey ms in mslist) { %> <li><a href="marketstoryshoplist.aspx?sid=<%=ms.id %>" class="<%=UiCommon.QueryStringCur("sid", ms.id.ToString(), "", "cur")%>"><%=ms.title %></a></li> <%} %> </ul> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable" style="float:left"> <tr> <th width="40px" align="center">选择</th> <th width="40px" align="center">编号</th> <th align="left">&nbsp;&nbsp;店铺名称</th> <th align="left" width="160px">&nbsp;&nbsp;所在楼层</th> </tr> <asp:Repeater ID="rptList" runat="server" OnItemDataBound="rptList_OnItemDataBound"> <ItemTemplate> <tr> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="left" class="edit l"><a href="shopinfo.aspx?edit=1&id=<%#Eval("id") %>"><asp:Label ID="lb_title" runat="server" Text='<%#Eval("title") %>'></asp:Label></a></td> <td align="left" class="l"><asp:DropDownList ID="ddlms" runat="server"></asp:DropDownList> </td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom" style="float:left; width:100%;"> <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnUpStorey" runat="server" OnClientClick="return confirm( '确认更选择中楼层信息? ');" OnClick="lbtnUpStorey_Click" >更新楼层</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/marketstoryshoplist.aspx
ASP.NET
oos
3,819
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setmarketstoryshop.aspx.cs" Inherits="TREC.Web.Suppler.market.setmarketstoryshop" %> <%@ Import Namespace="TREC.ECommerce" %><%@ Import Namespace="TREC.Entity" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); }) </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="40px" align="center">编号</th> <th align="left">&nbsp;&nbsp;店铺名称</th> <th width="80px" align="center">置顶</th> <th width="80px" align="center">推荐</th> <th align="left" width="80px">&nbsp;&nbsp;级别</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="left" class="edit l"><a href="javascript:;"><asp:Label ID="lb_title" runat="server" Text='<%#Eval("shoptitle") %>'></asp:Label></a></td> <td align="center"><a href="setmarketstoryshop.aspx?edit=3&id=<%#Eval("Id")%>&value=<%#Eval("istop").ToString()=="0"?"1":"0" %>&page=<%=ECommon.QueryPageIndex %>"><img src="../images/<%#Eval("istop") %>_421.png" /></a></td> <td align="center"><a href="setmarketstoryshop.aspx?edit=4&id=<%#Eval("Id")%>&value=<%#Eval("isrecommend").ToString()=="0"?"1":"0" %>&page=<%=ECommon.QueryPageIndex %>"><img src="../images/<%#Eval("isrecommend") %>_835.png" /></a></td> <td align="center" class="l"><asp:TextBox ID="txtlev" runat="server" Text='<%#Eval("lev") %>' CssClass="input" Width="40"></asp:TextBox></td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom" > <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnUpLev" runat="server" OnClientClick="return confirm( '确认更选择中楼层信息? ');" OnClick="lbtnUpLev_Click" >更新级别</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/setmarketstoryshop.aspx
ASP.NET
oos
3,546
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.market { public partial class marketstoryshoplist : SupplerPageBase { public List<EnMarketStorey> mslist = new List<EnMarketStorey>(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { mslist = ECMarketStorey.GetMarketStoreyList(" marketid=" + marketInfo.id); ShowData(); } } protected void rptList_OnItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item) { DropDownList ddl = (DropDownList)e.Item.FindControl("ddlms") as DropDownList; ddl.DataSource = mslist; ddl.DataTextField = "title"; ddl.DataValueField = "id"; ddl.DataBind(); ddl.Items.Insert(0, new ListItem("取消楼层", "")); ddl.SelectedValue = Request.QueryString["sid"].ToString(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECShop.DeletEnShop(TypeConverter.StrToInt(ECommon.QueryId)); } string strWhere = " marketid=" + marketInfo.id; if (Request.QueryString["sid"] != null) { if (Request.QueryString["sid"].ToString() == "" || Request.QueryString["sid"].ToString() == "-1") { strWhere += " and id not in(select shopid from t_marketstoreyshop where marketid=" + marketInfo.id + ") or id in(select shopid from t_marketstoreyshop where marketid=" + marketInfo.id + " and storeyid=0)"; } else { strWhere += " and id in(select shopid from t_marketstoreyshop where marketid=" + marketInfo.id + " and storeyid=" + Request.QueryString["sid"].ToString() + ")"; } } rptList.DataSource = ECShop.GetShopList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; } protected void lbtnUpStorey_Click(object sender, EventArgs e) { List<EnMarketStoreyShop> list = new List<EnMarketStoreyShop>(); for (int i = 0; i < rptList.Items.Count; i++) { string shopid = ((Label)rptList.Items[i].FindControl("lb_id")).Text; string shoptitle = ((Label)rptList.Items[i].FindControl("lb_title")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); DropDownList ddl = (DropDownList)rptList.Items[i].FindControl("ddlms"); if (cb.Checked) { EnMarketStoreyShop model = new EnMarketStoreyShop(); model.marketid = marketInfo.id; model.markettitle = marketInfo.title; model.storeyid = TypeConverter.StrToInt(ddl.SelectedValue); model.storeytitle = ddl.SelectedValue == "" ? "未加入楼层" : ddl.SelectedItem.Text; model.shopid = TypeConverter.StrToInt(shopid); model.shoptitle = shoptitle; model.istop = 0; model.isrecommend = 0; model.brandidlist = ""; model.brandtitlelist = ""; model.lev = 0; model.sort = 0; model.lastedid = memberInfo.id; model.lastedittime = DateTime.Now; list.Add(model); } } if (list.Count > 0) { ECMarketStoreyShop.UpMarketShorey(list); UiCommon.JscriptPrint(this.Page, "批量更新楼层成功!", "marketstoryshoplist.aspx?sid=-1&page=" + ECommon.QueryPageIndex, "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/marketstoryshoplist.aspx.cs
C#
oos
4,397
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.market { public partial class marketstorylist : SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECMarketStorey.DeleteMarketStorey(TypeConverter.StrToInt(ECommon.QueryId)); } string strWhere = " marketid=" + marketInfo.id; rptList.DataSource = ECMarketStorey.GetMarketStoreyList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; } protected void lbtnDel_Click(object sender, EventArgs e) { string idlist=""; for (int i = 0; i < rptList.Items.Count; i++) { string id = ((Label)rptList.Items[i].FindControl("lb_id")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { idlist += id + ","; } } if (idlist.Length > 0) { ECMarketStorey.DeleteMarketStoreyByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "marketstorylist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/marketstorylist.aspx.cs
C#
oos
1,833
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.market { public partial class setmarketstoryshop : SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECMarketStoreyShop.DeleteMarketStoreyShop(TypeConverter.StrToInt(ECommon.QueryId)); UiCommon.JscriptPrint(this.Page, "删除除功!", "setmarketstoryshop.aspx?page=" + ECommon.QueryPageIndex, "Success"); } if (ECommon.QueryEdit == "3" && ECommon.QueryId != "" && ECommon.QueryValue != "") { ECMarketStoreyShop.UpMarketShopTop(ECommon.QueryId, ECommon.QueryValue); UiCommon.JscriptPrint(this.Page, "置顶成功!", "setmarketstoryshop.aspx?page=" + ECommon.QueryPageIndex, "Success"); } if (ECommon.QueryEdit == "4" && ECommon.QueryId != "" && ECommon.QueryValue != "") { ECMarketStoreyShop.UpMarketShopRecommend(ECommon.QueryId, ECommon.QueryValue); UiCommon.JscriptPrint(this.Page, "推荐成功!", "setmarketstoryshop.aspx?page=" + ECommon.QueryPageIndex, "Success"); } string strWhere = " marketid=" + marketInfo.id; rptList.DataSource = ECMarketStoreyShop.GetMarketStoreyShopList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; } protected void lbtnUpLev_Click(object sender, EventArgs e) { for (int i = 0; i < rptList.Items.Count; i++) { string id = ((Label)rptList.Items[i].FindControl("lb_id")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); TextBox txtlev = (TextBox)rptList.Items[i].FindControl("txtlev"); if (cb.Checked) { ECMarketStoreyShop.UpMarketShopLev(id, txtlev.Text == "" ? "0" : txtlev.Text); } } UiCommon.JscriptPrint(this.Page, "级别更新成功!", "setmarketstoryshop.aspx?page=" + ECommon.QueryPageIndex, "Success"); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/setmarketstoryshop.aspx.cs
C#
oos
2,648
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="marketstorylist.aspx.cs" Inherits="TREC.Web.Suppler.market.marketstorylist" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); }) </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="40px" align="center">编号</th> <th align="left">&nbsp;&nbsp;楼层名称</th> <th align="center" width="80">&nbsp;&nbsp;编辑</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="left" class="edit l"><a href="marketstoryinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td> <td align="center" class="edit"><a href="marketstoryinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a></td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/market/marketstorylist.aspx
ASP.NET
oos
2,844
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler { public partial class index : SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { switch (memberInfo.type) { case (int)EnumMemberType.个人成员: Response.Redirect("supplerindex.aspx"); break; case (int)EnumMemberType.工厂企业: if (SupplerPageBase.companyInfo != null && SupplerPageBase.companyInfo.id != 0) { if (SupplerPageBase.companyInfo.title == null || SupplerPageBase.companyInfo.title == "" || SupplerPageBase.companyInfo.phone == null || SupplerPageBase.companyInfo.phone == "" || SupplerPageBase.companyInfo.address == null || SupplerPageBase.companyInfo.address == "") { Response.Redirect("f_company/setup1.aspx"); } if (SupplerPageBase.brandidlist == "0"|| SupplerPageBase.brandList == null || SupplerPageBase.brandList.Count <= 0) { Response.Redirect("f_company/setup2.aspx"); } if (SupplerPageBase.brandidlist == "0" || ECBrand.GetBrandsList(" brandid in (" + SupplerPageBase.brandidlist + ")").Count <= 0) { Response.Redirect("f_company/setup3.aspx"); } } else { Response.Redirect("supplerindex.aspx"); } break; case (int)EnumMemberType.经销商: if (SupplerPageBase.dealerInfo != null && SupplerPageBase.dealerInfo.id != 0) { if (SupplerPageBase.dealerInfo.title == null || SupplerPageBase.dealerInfo.title == "" || SupplerPageBase.dealerInfo.phone == null || SupplerPageBase.dealerInfo.phone == "" || SupplerPageBase.dealerInfo.address == null || SupplerPageBase.dealerInfo.address == "") { Response.Redirect("f_dealer/setup1.aspx"); } if (SupplerPageBase.brandList == null || SupplerPageBase.brandList.Count <= 0) { Response.Redirect("f_dealer/setup2.aspx"); } if (SupplerPageBase.brandidlist == "0" || ECBrand.GetBrandsList(" brandid in (" + SupplerPageBase.brandidlist + ")").Count <= 0) { Response.Redirect("f_dealer/setup3.aspx"); } } else { Response.Redirect("supplerindex.aspx"); } break; case (int)EnumMemberType.卖场: break; case (int)EnumMemberType.店铺管理员: break; } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/index.aspx.cs
C#
oos
3,456
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // 有关程序集的常规信息通过以下特性集 // 控制。更改这些特性值可修改 // 与程序集关联的信息。 [assembly: AssemblyTitle("TREC.Web.Suppler")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("FORDIO")] [assembly: AssemblyProduct("TREC.Web.Suppler")] [assembly: AssemblyCopyright("Copyright © FORDIO 2012")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // 将 ComVisible 设置为 false 会使此程序集中的类型 // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, // 则将该类型上的 ComVisible 特性设置为 true。 [assembly: ComVisible(false)] // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID [assembly: Guid("f6bbcf47-5fa6-4dcd-ac88-482f1d233618")] // 程序集的版本信息由下列四个值组成: // // 主版本 // 次版本 // 内部版本号 // 修订号 // // 您可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值, // 方法是按如下所示使用“*”: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/Properties/AssemblyInfo.cs
C#
oos
1,345
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="help.aspx.cs" Inherits="TREC.Web.Suppler.help" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register src="ascx/head.ascx" tagname="head" tagprefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title><%=ECommon.WebTitle%>-供应商系统-帮助中心</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> <link rel="stylesheet" type="text/css" href="css/index.css" /> <link rel="Stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/joyride/joyride-1.0.2.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/joyride/jquery.joyride-1.0.2.min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <script type="text/javascript" src="script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(this).joyride(); $('.helper').poshytip({ className: 'tip-yellowsimple', showTimeout: 1, alignTo: 'target', alignX: 'left', alignY: 'center', offsetX: 5, allowTipHover: false, content: '帮助中心?' }); $(".leftMenu > ul > li > a").live("click", function () { $(".leftMenu > ul > li > a").removeClass("cur"); $(this).addClass("cur"); $(".frameMenu").find("span.title").text($(this).text()) $('#helpIco').poshytip('update', '如果您在 <strong>' + $(this).text() + ' 时遇到问题</strong>,点击 <strong>?</strong> 查看 ' + $(this).text() + '的使用帮助'); }); }); </script> </head> <body> <form id="form1" runat="server"> <uc1:head ID="head1" runat="server" /> <div class="Fcon"> <div class="leftMenu"> <h3><a href="javascript:;">帮助中心</a></h3> <ul> <%foreach (EnArticleCategory c in helpCategoryList) { %> <li><a href="help.aspx?cid=<%=c.id %>" target="_self"><%=c.title %></a></li> <%} %> </ul> </div> <div class="frameMenu"> <span class="title"><asp:Label ID="lbtitle" runat="server"></asp:Label></span><a href="javascript:;" class="helper menuHelper" title="" >&nbsp;</a> </div> <div class="rightFrame" style="height:auto;"> <%if (ECommon.QueryCid == "" && ECommon.QueryId == "") {%> <%=modelMain.context%> <%} %> <%if (ECommon.QueryCid != "" && ECommon.QueryId == "") {%> <ul class="helplist"> <%foreach (EnArticle a in articlelist) { %> <li> <a href="javascript:;"><%=a.title %><span>-<em><%=a.createtime.ToShortDateString() %></em></span></a> </li> <%} %> </ul> <%} %> </div> </div> <div class="clear"></div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/help.aspx
ASP.NET
oos
4,044
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dealerinfo.aspx.cs" Inherits="TREC.Web.Suppler.dealer.dealerinfo" EnableEventValidation="false" %> <%@ Import Namespace="TREC.ECommerce" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.validate.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/additional-methods.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/messages_cn.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <style type="text/css"> .formTable { border: 1px solid #ccc; } .formTable tr th { background: #ededed; text-align: left; } .formTable tr td { border: none; padding-top: 8px; padding-bottom: 8px; } </style> <script type="text/javascript"> $(function () { //表单验证JS $("#form1").validate({ //出错时添加的标签 errorElement: "span", showErrors: function (errorMap, errorList) { if (errorList.length > 0) { if ($("#" + errorList[0].element.id).next() != null) { $("#" + errorList[0].element.id).next().remove(); } } this.defaultShowErrors(); }, success: function (label) { //正确时的样式 label.text(" ").addClass("success"); } }); var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=company&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); }); $("#btnSearch").click(function () { $.ajax({ url: "<%=ECommon.WebUrl %>/ajax/ajaxuser.ashx", data: "type=getnoaddmember&v=" + $("#txtSearch").val(), dataType: "json", success: function (data) { if (data != "") { $("#ddlmember").html(); $("#ddlmember").html("<option value=\"\">请选择</option>"); $.each(data, function (i) { $("#ddlmember").append("<option value=\"" + data[i].id + "\">" + data[i].name + "</option>"); }); } } }) }) $("#ddlPro").live("change", function () { if ($(this).val() != "" && $(this).val() != "0") { $.ajax({ url: "<%=ECommon.WebUrl %>/ajaxtools/ajaxarea.ashx", data: "type=c&p=" + $(this).val(), success: function (data) { $("#ddlregcity").html(data) }, error: function (d, m) { alert(m); } }); } }) }); </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table cellpadding="6" cellspacing="1" class="formTable"> <tr> <td align="right" class="tl" width="160px"> 经销商名称: </td> <td class="tr f_red"> <asp:TextBox ID="txttitle" runat="server" CssClass="input required w160"></asp:TextBox> </td> <td rowspan="13" class="tr f_red" valign="top"> <table class="formTable" style="display:none"> <tr> <td align="right"> 缩&nbsp;略&nbsp;&nbsp;图: </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Company, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>"> <asp:HiddenField ID="hfthumb" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File3" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 广告幻灯: </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Company, ECommon.QueryId, TREC.Entity.EnFilePath.Banner)%>"> <asp:HiddenField ID="hfbannel" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File4" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> </table> </td> </tr> <tr style="display:none"> <td align="right" > 人员规格 : </td> <td > <asp:DropDownList ID="ddlstaffsize" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> </td> </tr> <tr style="display:none"> <td align="right"> 注册年份: </td> <td> <asp:TextBox ID="txtregyear" runat="server" CssClass="input w160 required digits"></asp:TextBox> </td> </tr> <tr style="display:none"> <td align="right"> 注册城市: </td> <td> <asp:DropDownList ID="ddlPro" runat="server" CssClass="select"> </asp:DropDownList> <asp:DropDownList ID="ddlregcity" runat="server" CssClass="select selectNone"> </asp:DropDownList> </td> </tr> <tr> <td align="right" class="tl"> 地区: </td> <td class="tr f_red"> <div class="_droparea" id="ddlareacode" title="<%=areaCode %>"> </div> </td> </tr> <tr> <td align="right" class="tl"> 详细地址: </td> <td class="tr f_red"> <asp:TextBox ID="txtaddress" runat="server" CssClass="input required" Width="260"></asp:TextBox> </td> </tr> <tr> <td align="right" class="tl"> 联系人: </td> <td class="tr f_red"> <asp:TextBox ID="txtlinkman" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr> <td align="right" class="tl"> 手机 : </td> <td class="tr f_red"> <asp:TextBox ID="txtmphone" runat="server" CssClass="input w160 digits"></asp:TextBox> </td> </tr> <tr> <td align="right" class="tl"> 电话 : </td> <td class="tr f_red"> <asp:TextBox ID="txtphone" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr> <td align="right" class="tl"> 传真 : </td> <td class="tr f_red"> <asp:TextBox ID="txtfax" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr> <td align="right" class="tl"> 邮箱 : </td> <td class="tr f_red"> <asp:TextBox ID="txtemail" runat="server" CssClass="input w160 email"></asp:TextBox> </td> </tr> <tr> <td align="right" class="tl"> 邮编 : </td> <td class="tr f_red"> <asp:TextBox ID="txtpostcode" runat="server" CssClass="input w160 digits"></asp:TextBox> </td> </tr> <tr style="display:none"> <td align="right" class="tl"> 工厂网站 : </td> <td class="tr f_red"> <asp:TextBox ID="txthomepage" runat="server" CssClass="input w160"></asp:TextBox>(以http://开始) </td> </tr> <tr> <td align="right" class="tl" valign="top"> 介绍 : </td> <td colspan="2"> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="660" Height="220"></asp:TextBox> </td> </tr> <tr style="display:none"> <td align="right" class="tl"> 审核: </td> <td colspan="2"> <asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select" Width="160" Enabled="false"> </asp:DropDownList> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 80px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" OnClick="btnSave_Click" /><input name="重置" type="reset" class="submit" value="重置" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/dealer/dealerinfo.aspx
ASP.NET
oos
12,361
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.dealer { public partial class dealerinfo : SupplerPageBase { public string areaCode = ""; public EnMember _memberInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlstaffsize.Items.Clear(); ddlstaffsize.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.企业配置 + " and type="+(int)EnumConfigByEnterprise.人员规模); ddlstaffsize.DataTextField = "title"; ddlstaffsize.DataValueField = "value"; ddlstaffsize.DataBind(); ddlstaffsize.Items.Insert(0, new ListItem("请选择", "")); ddlPro.Items.Clear(); ddlPro.DataSource = ECArea.GetAreaList(" parentcode=0"); ddlPro.DataTextField = "areaname"; ddlPro.DataValueField = "areacode"; ddlPro.DataBind(); ddlPro.Items.Insert(0, new ListItem("请选择", "")); ddlregcity.Items.Clear(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlauditstatus.Items.Clear(); WebControlBind.DrpBind(typeof(EnumAuditStatus), ddlauditstatus); ddlauditstatus.Items.Insert(0, new ListItem("请选择", "")); ShowData(); } } protected void ShowData() { EnDealer model = ECDealer.GetDealerInfo(" where id=" + dealerInfo.id); if (model != null) { txttitle.Text = model.title; areaCode = model.areacode; this.txtaddress.Text = model.address; this.ddlstaffsize.SelectedValue = model.staffsize.ToString(); this.txtregyear.Text = model.regyear; if (!string.IsNullOrEmpty(model.regcity)) { this.ddlregcity.SelectedValue = model.regcity; this.ddlPro.SelectedValue = model.regcity.Substring(0, 2) + "0000"; if (model.regcity != model.regcity.Substring(0, 2) + "0000") { ddlregcity.Items.Clear(); ddlregcity.DataSource = ECArea.GetAreaList(" parentcode=" + ddlPro.SelectedValue); ddlregcity.DataTextField = "areaname"; ddlregcity.DataValueField = "areacode"; ddlregcity.DataBind(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlregcity.SelectedValue = model.regcity; } } this.txtlinkman.Text = model.linkman; this.txtphone.Text = model.phone; this.txtmphone.Text = model.mphone; this.txtfax.Text = model.fax; this.txtemail.Text = model.email; this.txtpostcode.Text = model.postcode; this.txthomepage.Text = model.homepage; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.txtdescript.Text = model.descript; this.ddlauditstatus.SelectedValue = model.auditstatus.ToString(); } } protected void btnSave_Click(object sender, EventArgs e) { EnDealer model = ECDealer.GetDealerInfo(" where id=" + dealerInfo.id); if (model == null) { model = new EnDealer(); model.mapapi = ""; model.createmid = 0; } int mid = memberInfo.id; string title = txttitle.Text; string areacode = Request.Form["ddlareacode_value"] == null ? Request.Params["ddlareacode_value"] == null ? "" : Request.Params["ddlareacode_value"].ToString() : Request.Form["ddlareacode_value"]; string address = this.txtaddress.Text; int staffsize = TypeConverter.StrToInt(Request.Params["ddlstaffsize"].ToString()); string regyear = this.txtregyear.Text; string regcity = Request.Form["ddlregcity"] == null ? Request.Form["ddlregcity"] == null ? "" : Request.Form["ddlregcity"].ToString() : Request.Form["ddlregcity"].ToString(); string sell = ""; string linkman = this.txtlinkman.Text; string phone = this.txtphone.Text; string mphone = this.txtmphone.Text; string fax = this.txtfax.Text; string email = this.txtemail.Text; string postcode = this.txtpostcode.Text; string homepage = this.txthomepage.Text; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string descript = this.txtdescript.Text; DateTime lastedittime = DateTime.Now; int auditstatus = TypeConverter.StrToInt(ddlauditstatus.SelectedValue); model.mid = mid; model.title = title; model.areacode = areacode; model.address = address; model.staffsize = staffsize; model.regyear = regyear; model.regcity = regcity; model.sell = sell; model.linkman = linkman; model.phone = phone; model.mphone = mphone; model.fax = fax; model.email = email; model.postcode = postcode; model.homepage = homepage; model.thumb = thumb; model.bannel = bannel; model.descript = descript; model.lastedid = model.mid; model.lastedittime = lastedittime; model.auditstatus = auditstatus; int aid = ECDealer.EditDealer(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Dealer, aid, EnFilePath.Thumb)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Dealer, aid, EnFilePath.Banner)); } StringBuilder imglist = Utils.GetImgUrl(model.descript); if (Utils.GetImgUrl(model.descript).Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ECDealer.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Dealer, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Dealer, aid, EnFilePath.ConImage)); } } UiCommon.JscriptPrint(this.Page, "编辑成功!", "dealerinfo.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/dealer/dealerinfo.aspx.cs
C#
oos
8,010
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="createbrand.aspx.cs" Inherits="TREC.Web.Suppler.f_dealer.createbrand" %> <%@ Import Namespace="TREC.ECommerce" %><%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>创建品牌</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.inputlabel.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.validate.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/additional-methods.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/messages_cn.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { //表单验证JS $("#form1").validate({ //出错时添加的标签 errorElement: "span", showErrors: function (errorMap, errorList) { if (errorList.length > 0) { if ($("#" + errorList[0].element.id).next() != null) { $("#" + errorList[0].element.id).next().remove(); } } this.defaultShowErrors(); }, success: function (label) { //正确时的样式 label.text(" ").addClass("success"); } }); }) </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table class="formTable"> <tr> <th colspan="2">&nbsp;&nbsp;工厂信息:<asp:HiddenField ID="hfcompanyid" runat="server" /></th> </tr> <tr> <td align="right" width="70">厂家名称:</td> <td><asp:TextBox ID="txtcompanytitle" runat="server" CssClass="input required"></asp:TextBox></td> </tr> <tr> <td align="right">联系人:</td> <td><asp:TextBox ID="txtclinkman" runat="server" CssClass="input required"></asp:TextBox></td> </tr> <tr> <td align="right">联系电话:</td> <td><asp:TextBox ID="txtcphone" runat="server" CssClass="input"></asp:TextBox></td> </tr> <tr> <td align="right">厂家介绍:</td> <td><asp:TextBox ID="txtcdescript" runat="server" CssClass="textarea" TextMode="MultiLine" Height="80px" Width="500"></asp:TextBox></td> </tr> </table> <div class="clear"></div> <table class="formTable"> <tr> <th colspan="2">&nbsp;&nbsp;品牌信息:</th> </tr> <tr> <td align="right" width="70">品牌名称:</td> <td><asp:TextBox ID="txtbrandtitle" runat="server" CssClass="input required"></asp:TextBox></td> </tr> <tr> <td align="right">品牌索引:</td> <td><asp:TextBox ID="txtbrandletter" runat="server" CssClass="input required"></asp:TextBox>(*品牌字母缩写)</td> </tr> <tr> <td align="right">品牌Logo:</td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Brand, ECommon.QueryId, TREC.Entity.EnFilePath.Logo)%>"> <asp:HiddenField ID="hfbrandlogo" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"><input id="File2" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right">风格/材质:</td> <td> <asp:DropDownList ID="ddlstyle" runat="server" CssClass="select selectNone"></asp:DropDownList> <asp:DropDownList ID="ddlmaterial" runat="server" CssClass="select selectNone"></asp:DropDownList> <asp:DropDownList ID="ddlspread" runat="server" CssClass="select selectNone"></asp:DropDownList> <asp:DropDownList ID="ddlcolor" runat="server" CssClass="select selectNone"></asp:DropDownList> </td> </tr> <tr> <td align="right">品牌介绍:</td> <td><asp:TextBox ID="txtbranddescript" runat="server" CssClass="textarea" TextMode="MultiLine" Height="80px" Width="500"></asp:TextBox></td> </tr> </table> <div style="margin-top:10px; margin-left:180px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" onclick="btnSave_Click" /><input name="重置" type="reset" class="submit" value="重置" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/createbrand.aspx
ASP.NET
oos
6,621
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_dealer { public partial class createbrand :SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlstyle.Items.Clear(); ddlstyle.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品风格); ddlstyle.DataTextField = "title"; ddlstyle.DataValueField = "value"; ddlstyle.DataBind(); ddlstyle.Items.Insert(0, new ListItem("请选择", "")); ddlmaterial.Items.Clear(); ddlmaterial.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品选材); ddlmaterial.DataTextField = "title"; ddlmaterial.DataValueField = "value"; ddlmaterial.DataBind(); ddlmaterial.Items.Insert(0, new ListItem("请选择", "")); ddlspread.Items.Clear(); ddlspread.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品价位); ddlspread.DataTextField = "title"; ddlspread.DataValueField = "value"; ddlspread.DataBind(); ddlspread.Items.Insert(0, new ListItem("请选择", "")); ddlcolor.Items.Clear(); ddlcolor.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品颜色); ddlcolor.DataTextField = "title"; ddlcolor.DataValueField = "value"; ddlcolor.DataBind(); ddlcolor.Items.Insert(0, new ListItem("请选择", "")); } } protected void btnSave_Click(object sender, EventArgs e) { int companyId = 0; int brandId = 0; if (hfcompanyid.Value == "") { EnCompany companyModel = new EnCompany(); //企业信息 int mid = 0; string title = txtcompanytitle.Text; string letter = ""; int groupid = 0; string attribute = ""; string industry = ""; string productcategory = ""; int vip = 0; string areacode = ""; string address = ""; int staffsize = 0; string regyear = "2012"; string regcity = ""; string buy = ""; string sell = ""; string linkman = txtclinkman.Text; string phone = txtcphone.Text; string mphone = ""; string fax = ""; string email = ""; string postcode = ""; string homepage = ""; string domain = ""; string domainip = ""; string icp = ""; string surface = ""; string logo = ""; string thumb = ""; string bannel = ""; string desimage = ""; string descript = txtcdescript.Text; string keywords = ""; string template = ""; int hits = 0; int sort = 0; DateTime lastedittime = DateTime.Now; int auditstatus = 0; int linestatus = 0; companyModel.id = 0; companyModel.mid = mid; companyModel.title = title; companyModel.letter = letter; companyModel.groupid = groupid; companyModel.attribute = attribute; companyModel.industry = industry; companyModel.productcategory = productcategory; companyModel.vip = vip; companyModel.areacode = areacode; companyModel.address = address; companyModel.staffsize = staffsize; companyModel.regyear = regyear; companyModel.regcity = regcity; companyModel.buy = buy; companyModel.sell = sell; companyModel.linkman = linkman; companyModel.phone = phone; companyModel.mphone = mphone; companyModel.fax = fax; companyModel.email = email; companyModel.postcode = postcode; companyModel.homepage = homepage; companyModel.domain = domain; companyModel.domainip = domainip; companyModel.icp = icp; companyModel.surface = surface; companyModel.logo = logo; companyModel.thumb = thumb; companyModel.bannel = bannel; companyModel.desimage = desimage; companyModel.descript = descript; companyModel.keywords = keywords; companyModel.template = template; companyModel.hits = hits; companyModel.sort = sort; companyModel.mapapi = ""; companyModel.createmid = memberInfo.id; companyModel.lastedid = 0; companyModel.lastedittime = lastedittime; companyModel.auditstatus = auditstatus; companyModel.linestatus = linestatus; companyId=ECCompany.EditCompany(companyModel); } else { companyId = TypeConverter.StrToInt(hfcompanyid.Value); } if (companyId > 0) { string title = txtbrandtitle.Text; string letter = this.txtbrandletter.Text; string productcategory = ""; string style = ddlstyle.SelectedValue; string material = ddlmaterial.SelectedValue; string spread = ddlspread.SelectedValue; string color = ddlcolor.SelectedValue; string surface = ""; string logo = this.hfbrandlogo.Value; string thumb = ""; string bannel = ""; string desimage = ""; string descript = txtbranddescript.Text; DateTime lastedittime = DateTime.Now; EnBrand brandModel = new EnBrand(); brandModel.createmid = memberInfo.id; brandModel.productcount = 0; brandModel.attribute = ""; brandModel.keywords = ""; brandModel.template = "default"; brandModel.homepage = ""; brandModel.hits = 0; brandModel.sort = 0; brandModel.auditstatus = 0; brandModel.linestatus = 0; brandModel.companyid = companyId; brandModel.title = title; brandModel.letter = letter; brandModel.productcategory = productcategory; brandModel.style = style; brandModel.material = material; brandModel.spread = spread; brandModel.color = color; brandModel.surface = surface; brandModel.logo = logo; brandModel.thumb = thumb; brandModel.bannel = bannel; brandModel.desimage = desimage; brandModel.descript = descript; brandModel.lastedittime = lastedittime; brandId = ECBrand.EditBrand(brandModel); } else { ScriptUtils.ShowAndRedirect("工厂信息获取失败!", "setup2.aspx"); return; } if (brandId > 0) { EnAppBrand appmodel = new EnAppBrand(); appmodel.id=0; appmodel.dealerid = dealerInfo.id; appmodel.dealetitle = dealerInfo.title; appmodel.brandid = brandId; appmodel.brandtitle = txtbrandtitle.Text; appmodel.companyid = 0; appmodel.companytitle = ""; appmodel.shopid = 0; appmodel.shoptitle = ""; appmodel.appmodule = (int)EnumAppBrandModule.经销商申请; appmodel.apptype = (int)EnumAppBrandType.申请新建品牌; appmodel.apptime = DateTime.Now; appmodel.createmid = memberInfo.id; appmodel.lastedittime = DateTime.Now; appmodel.auditstatus = 0; int aid = ECAppBrand.EditAppBrand(appmodel); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (this.hfbrandlogo.Value.Length > 0) { this.hfbrandlogo.Value = this.hfbrandlogo.Value.EndsWith(",") ? this.hfbrandlogo.Value.Substring(0, this.hfbrandlogo.Value.Length - 1) : this.hfbrandlogo.Value; ecUpload.MoveFiles(this.hfbrandlogo.Value.Split(','), string.Format(EnFilePath.Brand, brandId, EnFilePath.Logo)); } this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), System.Guid.NewGuid().ToString(), "<script>parent.location.href='setup3.aspx';art.dialog.close()</script>" ); } else { ScriptUtils.ShowAndRedirect("品牌申请己创建,但代理失败,请查找并申请代理!", "setup2.aspx"); } } else { ScriptUtils.ShowAndRedirect("品牌添加失败!", "setup2.aspx"); return; } this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), System.Guid.NewGuid().ToString(), "<script>art.dialog.close()</script>" ); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/createbrand.aspx.cs
C#
oos
10,846
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_dealer { public partial class setup2 : SupplerPageBase { protected string brandnexturl = ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECBrand.GetBrandList(" createmid=" + SupplerPageBase.memberInfo.id).Count > 0) { brandnexturl = "setup3.aspx"; } else { brandnexturl = "../index.aspx"; } string strWhere = " id not in (select brandid from " + TableName.TBAppBrand + " where dealerid=" + dealerInfo.id + ") "; if (txtsearch.Text != "") { strWhere += " and (title like '%" + txtsearch.Text + "%' or stylename like '%" + txtsearch.Text + "%' or companyname like '%" + txtsearch.Text + "%') "; } rptList.DataSource = ECBrand.GetWebBrandList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; } protected void btnAppend_Click(object sender, EventArgs e) { List<EnAppBrand> list = new List<EnAppBrand>(); for (int i = 0; i < rptList.Items.Count; i++) { string id = ((Label)rptList.Items[i].FindControl("lb_id")).Text; string brandtitle = ((Label)rptList.Items[i].FindControl("lb_title")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { EnAppBrand model = new EnAppBrand(); model.dealerid = dealerInfo.id; model.dealetitle = dealerInfo.title; model.brandid = TypeConverter.StrToInt(id); model.brandtitle = brandtitle; model.companyid = 0; model.companytitle = ""; model.shopid = 0; model.shoptitle = ""; model.appmodule = (int)EnumAppBrandModule.经销商申请; model.apptype = (int)EnumAppBrandType.申请代理品牌; model.apptime = DateTime.Now; model.createmid = memberInfo.id; model.lastedittime = DateTime.Now; model.auditstatus = 0; list.Add(model); } } if (list.Count > 0) { if (ECAppBrand.AddAppendBrand(list)>0) { Response.Redirect("../index.aspx"); } } } protected void btnSearch_Click(object sender, EventArgs e) { ShowData(); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/setup2.aspx.cs
C#
oos
3,245
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setup3.aspx.cs" Inherits="TREC.Web.Suppler.f_dealer.setup3" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register Src="../ascx/head.ascx" TagName="head" TagPrefix="uc1" %> <%@ Register src="nav.ascx" tagname="nav" tagprefix="uc2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title><%=ECommon.WebTitle%>-商务中心</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.validate.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/additional-methods.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/messages_cn.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { //表单验证JS $("#form1").validate({ //出错时添加的标签 errorElement: "span", showErrors: function (errorMap, errorList) { if (errorList.length > 0) { if ($("#" + errorList[0].element.id).next() != null) { $("#" + errorList[0].element.id).next().remove(); } } this.defaultShowErrors(); }, success: function (label) { //正确时的样式 label.text(" ").addClass("success"); } }); var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=brands&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'link', 'fullscreen'] }); }); }); </script> </head> <body> <form id="form1" runat="server"> <uc1:head ID="head1" runat="server" /> <div class="Fcon setup"> <div class="setupTitle"> &nbsp;&nbsp;欢迎您进入家具快搜供应商管理系统,请先按顺序添加完成以下内容,以便正式上传产品。 </div> <div class="setupNext"> <uc2:nav ID="nav1" runat="server" /> </div> <div class="setupCon"> <table width="100%" class="formTable"> <tr> <td align="right" width="70"> 选择品牌: </td> <td> <asp:DropDownList ID="ddlbrand" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> </td> </tr> <tr> <td align="right"> 系列名称: </td> <td> <asp:TextBox ID="txttitle" runat="server" CssClass="input required w160"></asp:TextBox> </td> </tr> <tr> <td align="right" valign="top"> 介绍: </td> <td> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="660" Height="200"></asp:TextBox> </td> </tr> <tr> <td align="right"> 排序 : </td> <td> <asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 120px"> <asp:Button ID="btnSave" runat="server" CssClass="submit" OnClick="btnSave_Click" /> </div> </div> </div> <div class="clear"></div> <div class="foot" style=" position:static; left:0px; background:#f4f4f4; bottom:0px; right:0px; width:100%; height:30px; display:none"> 底部 </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/setup3.aspx
ASP.NET
oos
5,959
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setup1.aspx.cs" Inherits="TREC.Web.Suppler.f_dealer.setup1" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register Src="../ascx/head.ascx" TagName="head" TagPrefix="uc1" %> <%@ Register Src="nav.ascx" TagName="nav" TagPrefix="uc2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title> <%=ECommon.WebTitle%>-商务中心</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/dealer.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=company&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); }); $("#btnSearch").click(function () { $.ajax({ url: "<%=ECommon.WebUrl %>/ajax/ajaxuser.ashx", data: "type=getnoaddmember&v=" + $("#txtSearch").val(), dataType: "json", success: function (data) { if (data != "") { $("#ddlmember").html(); $("#ddlmember").html("<option value=\"\">请选择</option>"); $.each(data, function (i) { $("#ddlmember").append("<option value=\"" + data[i].id + "\">" + data[i].name + "</option>"); }); } } }) }) $("#ddlPro").live("change", function () { if ($(this).val() != "" && $(this).val() != "0") { $.ajax({ url: "<%=ECommon.WebUrl %>/ajaxtools/ajaxarea.ashx", data: "type=c&p=" + $(this).val(), success: function (data) { $("#ddlregcity").html(data) }, error: function (d, m) { alert(m); } }); } }) }); </script> </head> <body> <form id="form1" runat="server"> <uc1:head ID="head1" runat="server" /> <div class="Fcon setup"> <div class="setupTitle"> &nbsp;&nbsp;欢迎您进入家具快搜供应商管理系统,请先按顺序添加完成以下内容,以便正式上传产品。 </div> <div class="setupNext"> <uc2:nav ID="nav1" runat="server" /> </div> <div class="setupCon"> <table cellpadding="0" cellspacing="0" class="formTable"> <tr> <td align="right" width="100px"> 经销商名称: </td> <td class="tr"> <asp:TextBox ID="txttitle" runat="server" CssClass="input required w160"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div><label>&nbsp;&nbsp;(名称系统默认第一次为联系人名称,请修改)</label> </td> </tr> <tr style="display: none"> <td align="right"> 缩&nbsp;略&nbsp;&nbsp;图: </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Company, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>"> <asp:HiddenField ID="hfthumb" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File3" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display: none"> <td align="right"> 广告幻灯: </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Company, ECommon.QueryId, TREC.Entity.EnFilePath.Banner)%>"> <asp:HiddenField ID="hfbannel" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File4" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display: none"> <td align="right"> 人员规格 : </td> <td> <asp:DropDownList ID="ddlstaffsize" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> </td> </tr> <tr style="display: none"> <td align="right"> 注册年份: </td> <td> <asp:TextBox ID="txtregyear" runat="server" CssClass="input w160 required digits"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 注册城市: </td> <td> <asp:DropDownList ID="ddlPro" runat="server" CssClass="select"> </asp:DropDownList> <asp:DropDownList ID="ddlregcity" runat="server" CssClass="select selectNone"> </asp:DropDownList> </td> </tr> <tr style="display:none"> <td align="right"> 联系人: </td> <td> <asp:TextBox ID="txtlinkman" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr> <td align="right"> 手机 : </td> <td> <asp:TextBox ID="txtmphone" runat="server" CssClass="input w160 digits"></asp:TextBox> </td> </tr> <tr> <td align="right"> 电话 : </td> <td> <asp:TextBox ID="txtphone" runat="server" CssClass="input w160"></asp:TextBox> <div id="txtphoneTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 传真 : </td> <td> <asp:TextBox ID="txtfax" runat="server" CssClass="input w160"></asp:TextBox> <div id="txtfaxTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 邮箱 : </td> <td> <asp:TextBox ID="txtemail" runat="server" CssClass="input w160 email"></asp:TextBox> <div id="txtemailTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 地区: </td> <td> <div class="_droparea" id="ddlareacode" title="<%=areaCode %>"> </div> </td> </tr> <tr> <td align="right"> 详细地址: </td> <td> <asp:TextBox ID="txtaddress" runat="server" CssClass="input required" Width="260"></asp:TextBox> <div id="txtaddressTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 邮编 : </td> <td> <asp:TextBox ID="txtpostcode" runat="server" CssClass="input w160 digits"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 工厂网站 : </td> <td> <asp:TextBox ID="txthomepage" runat="server" CssClass="input w160"></asp:TextBox>(以http://开始) </td> </tr> <tr> <td align="right" valign="top"> 介绍 : </td> <td colspan="2"> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="660" Height="220"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 审核: </td> <td colspan="2"> <asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select" Width="160" Enabled="false"> </asp:DropDownList> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 120px"> <asp:Button ID="btnSave" runat="server" CssClass="submit" OnClick="btnSave_Click" /> </div> </div> </div> <div class="clear"> </div> <div class="foot" style="position: static; left: 0px; background: #f4f4f4; bottom: 0px; right: 0px; width: 100%; height: 30px; display: none"> 底部 </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/setup1.aspx
ASP.NET
oos
13,198
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_dealer { public partial class setup3 : SupplerPageBase { public string areaCode = ""; public EnBrand _brandInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string strWhere = ""; switch (memberInfo.type) { case (int)EnumMemberType.工厂企业: strWhere = " companyid=" + companyInfo.id; break; case (int)EnumMemberType.经销商: strWhere = " id in (select brandid from " + TableName.TBAppBrand + " where dealerid=" + dealerInfo.id + " and apptype=" + (int)EnumAppBrandType.申请新建品牌 + " and createmid=" + memberInfo.id + ") "; break; } ddlbrand.Items.Clear(); ddlbrand.DataSource = ECBrand.GetBrandList(1, 20, strWhere, out tmpPageCount); ddlbrand.DataTextField = "title"; ddlbrand.DataValueField = "id"; ddlbrand.DataBind(); ddlbrand.Items.Insert(0, new ListItem("请选择", "")); if (tmpPageCount == 0) { ScriptUtils.ShowAndRedirect("请选添加品牌", "appbrand.aspx"); } ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnBrands model = ECBrand.GetBrandsInfo(" where id=" + ECommon.QueryId); if (model != null) { if (model != null && model.brandid != 0) { _brandInfo = ECBrand.GetBrandInfo(" where id=" + model.brandid); this.ddlbrand.Items.Clear(); this.ddlbrand.Items.Insert(0, new ListItem(_brandInfo.title, model.brandid.ToString())); this.ddlbrand.Enabled = false; } txttitle.Text = model.title; this.txtdescript.Text = model.descript; this.txtsort.Text = model.sort.ToString(); //SetPermission(model.createmid, 0, 0, 0, 0, model.brandid, (System.Web.UI.WebControls.WebControl)btnSave, (System.Web.UI.HtmlControls.HtmlControl)btnRequest); } } } protected void btnSave_Click(object sender, EventArgs e) { EnBrands model = null; string strErr = ""; if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECBrand.GetBrandsInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); if (model == null) { model = new EnBrands(); } } else { model = new EnBrands(); model.createmid = 0; model.productcount = 0; model.style = ""; model.spread = ""; model.material = ""; model.createmid = memberInfo.id; model.attribute = ""; model.surface = ""; model.logo = ""; model.thumb = ""; model.bannel = ""; model.desimage = ""; model.keywords = ""; model.template = ""; model.hits = 0; model.auditstatus = 0; model.linestatus = 0; model.letter = ""; } int brandid = TypeConverter.StrToInt(ddlbrand.SelectedValue); string title = txttitle.Text; string descript = this.txtdescript.Text; int sort = TypeConverter.StrToInt(this.txtsort.Text); DateTime lastedittime = DateTime.Now; model.brandid = brandid; model.title = title; model.descript = descript; model.sort = sort; model.lastedittime = lastedittime; int aid = ECBrand.EditBrands(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); StringBuilder imglist = Utils.GetImgUrl(model.descript); if (Utils.GetImgUrl(model.descript).Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ECBrand.UpBrandsConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Brands, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Brands, aid, EnFilePath.ConImage)); } } Response.Redirect("../index.aspx"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/setup3.aspx.cs
C#
oos
6,012
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_dealer { public partial class nav : System.Web.UI.UserControl { protected string s1css = "", s2css = "", s3css = "", s4css = "", s1url = "javascript:;", s2url = "javascript:;", s3url = "javascript:;", s4url = "javascript:;"; protected void Page_Load(object sender, EventArgs e) { if (SupplerPageBase.dealerInfo != null && SupplerPageBase.dealerInfo.id != 0) { bool hasCompany = false, hasBrand = false, hasBrands = false; s1css = "now"; s1url = "javascript:;"; if (SupplerPageBase.dealerInfo.title != null && SupplerPageBase.dealerInfo.title != "" && SupplerPageBase.dealerInfo.phone != null && SupplerPageBase.dealerInfo.phone != "" && SupplerPageBase.dealerInfo.address != null && SupplerPageBase.dealerInfo.address != "") { hasCompany = true; s1css = "has"; s1url = "setup1.aspx"; s2css = "now"; s2url = "setup2.aspx"; } if (WebUtils.GetPageName() != "setup1.aspx" && (SupplerPageBase.dealerInfo.title == null || SupplerPageBase.dealerInfo.title == "" || SupplerPageBase.dealerInfo.phone == null || SupplerPageBase.dealerInfo.phone == "" || SupplerPageBase.dealerInfo.address == null || SupplerPageBase.dealerInfo.address == "")) { Response.Redirect("setup1.aspx"); return; } if (SupplerPageBase.brandList != null && SupplerPageBase.brandList.Count > 0) { hasBrand = true; if (ECBrand.GetBrandList(" createmid=" + SupplerPageBase.memberInfo.id).Count > 0) { s3url = "setup3.aspx"; s2css = "has"; s3css = "now"; } else { s3url = "../index.aspx"; s2css = "has"; s3css = ""; } } if (WebUtils.GetPageName() != "setup2.aspx" && WebUtils.GetPageName() != "setup1.aspx" && (SupplerPageBase.brandList == null || SupplerPageBase.brandList.Count <= 0)) { Response.Redirect("setup2.aspx"); return; } if (SupplerPageBase.brandidlist != "0" && ECBrand.GetBrandsList(" brandid in (" + SupplerPageBase.brandidlist + ")").Count > 0) { hasBrands = true; s3url = "setup3.aspx"; s3css = "has"; s4css = "now"; s4url = "../index.aspx"; } } else { Response.Redirect("../supplerindex.aspx"); return; } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/nav.ascx.cs
C#
oos
3,333
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_dealer { public partial class setup1 : SupplerPageBase { public string areaCode = ""; public EnMember _memberInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlstaffsize.Items.Clear(); ddlstaffsize.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.企业配置 + " and type=" + (int)EnumConfigByEnterprise.人员规模); ddlstaffsize.DataTextField = "title"; ddlstaffsize.DataValueField = "value"; ddlstaffsize.DataBind(); ddlstaffsize.Items.Insert(0, new ListItem("请选择", "")); ddlPro.Items.Clear(); ddlPro.DataSource = ECArea.GetAreaList(" parentcode=0"); ddlPro.DataTextField = "areaname"; ddlPro.DataValueField = "areacode"; ddlPro.DataBind(); ddlPro.Items.Insert(0, new ListItem("请选择", "")); ddlregcity.Items.Clear(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlauditstatus.Items.Clear(); WebControlBind.DrpBind(typeof(EnumAuditStatus), ddlauditstatus); ddlauditstatus.Items.Insert(0, new ListItem("请选择", "")); ShowData(); } } protected void ShowData() { EnDealer model = ECDealer.GetDealerInfo(" where id=" + dealerInfo.id); if (model != null) { txttitle.Text = model.title; areaCode = model.areacode; this.txtaddress.Text = model.address; this.ddlstaffsize.SelectedValue = model.staffsize.ToString(); this.txtregyear.Text = model.regyear; if (!string.IsNullOrEmpty(model.regcity)) { this.ddlregcity.SelectedValue = model.regcity; this.ddlPro.SelectedValue = model.regcity.Substring(0, 2) + "0000"; if (model.regcity != model.regcity.Substring(0, 2) + "0000") { ddlregcity.Items.Clear(); ddlregcity.DataSource = ECArea.GetAreaList(" parentcode=" + ddlPro.SelectedValue); ddlregcity.DataTextField = "areaname"; ddlregcity.DataValueField = "areacode"; ddlregcity.DataBind(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlregcity.SelectedValue = model.regcity; } } this.txtlinkman.Text = model.linkman; this.txtphone.Text = model.phone; this.txtmphone.Text = model.mphone; this.txtfax.Text = model.fax; this.txtemail.Text = model.email; this.txtpostcode.Text = model.postcode; this.txthomepage.Text = model.homepage; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.txtdescript.Text = model.descript; this.ddlauditstatus.SelectedValue = model.auditstatus.ToString(); } } protected void btnSave_Click(object sender, EventArgs e) { EnDealer model = ECDealer.GetDealerInfo(" where id=" + dealerInfo.id); if (model == null) { model = new EnDealer(); model.mapapi = ""; model.createmid = 0; } int mid = memberInfo.id; string title = txttitle.Text; string areacode = Request.Form["ddlareacode_value"] == null ? Request.Params["ddlareacode_value"] == null ? "" : Request.Params["ddlareacode_value"].ToString() : Request.Form["ddlareacode_value"]; string address = this.txtaddress.Text; int staffsize = TypeConverter.StrToInt(Request.Params["ddlstaffsize"].ToString()); string regyear = this.txtregyear.Text; string regcity = Request.Form["ddlregcity"] == null ? Request.Form["ddlregcity"] == null ? "" : Request.Form["ddlregcity"].ToString() : Request.Form["ddlregcity"].ToString(); string sell = ""; string linkman = this.txtlinkman.Text; string phone = this.txtphone.Text; string mphone = this.txtmphone.Text; string fax = this.txtfax.Text; string email = this.txtemail.Text; string postcode = this.txtpostcode.Text; string homepage = this.txthomepage.Text; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string descript = this.txtdescript.Text; DateTime lastedittime = DateTime.Now; int auditstatus = TypeConverter.StrToInt(ddlauditstatus.SelectedValue); model.mid = mid; model.title = title; model.areacode = areacode; model.address = address; model.staffsize = staffsize; model.regyear = regyear; model.regcity = regcity; model.sell = sell; model.linkman = linkman; model.phone = phone; model.mphone = mphone; model.fax = fax; model.email = email; model.postcode = postcode; model.homepage = homepage; model.thumb = thumb; model.bannel = bannel; model.descript = descript; model.lastedid = model.mid; model.lastedittime = lastedittime; model.auditstatus = auditstatus; int aid = ECDealer.EditDealer(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Dealer, aid, EnFilePath.Thumb)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Dealer, aid, EnFilePath.Banner)); } StringBuilder imglist = Utils.GetImgUrl(model.descript); if (Utils.GetImgUrl(model.descript).Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ECDealer.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Dealer, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Dealer, aid, EnFilePath.ConImage)); } } Response.Redirect("setup2.aspx"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/setup1.aspx.cs
C#
oos
7,848
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="nav.ascx.cs" Inherits="TREC.Web.Suppler.f_dealer.nav" %> <ul> <li class="<%=s1css %>"><a href="<%=s1url %>"><p>第一步</p><p>添加供应商基本信息</p></a></li> <li class="<%=s2css %>"><a href="<%=s2url %>"><p>第二步</p><p>添加品牌信息</p></a></li> <li class="<%=s3css %>"><a href="<%=s3url %>"><p>第三步</p><p>添加系列</p></a></li> <li class="<%=s4css %>"><a href="<%=s4url %>"><p>第四步</p><p>可以正常使用供应商管理系统</p></a></li> </ul>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/nav.ascx
ASP.NET
oos
568
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setup2.aspx.cs" Inherits="TREC.Web.Suppler.f_dealer.setup2" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register Src="../ascx/head.ascx" TagName="head" TagPrefix="uc1" %> <%@ Register Src="nav.ascx" TagName="nav" TagPrefix="uc2" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title> <%=ECommon.WebTitle%>-商务中心</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href="../../resource/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.inputlabel.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); $("#txtsearch").inputLabel("请输入品牌工厂名称/品牌名称/风格搜索……"); }) function addBrand() { art.dialog.open('createbrand.aspx?mt=<%=memberInfo.type %>&m=<%=dealerInfo.id %>', { title: '添加新品牌', width: '800px', height: '620px' }); } </script> <style type="text/css"> .brandList { margin-left: 15px; } </style> </head> <body> <form id="form1" runat="server"> <uc1:head ID="head1" runat="server" /> <div class="Fcon setup"> <div class="setupTitle"> &nbsp;&nbsp;欢迎您进入家具快搜供应商管理系统,请先按顺序添加完成以下内容,以便正式上传产品。 </div> <div class="setupNext"> <uc2:nav ID="nav1" runat="server" /> </div> <div class="setupCon"> <%if (TREC.ECommerce.SupplerPageBase.brandList != null && TREC.ECommerce.SupplerPageBase.brandList.Count > 0) { %> <div class="info" style="width:727px"><span class="ico">&nbsp;</span><b>您己创建过</b> <%foreach (EnBrand b in TREC.ECommerce.SupplerPageBase.brandList) { %> &nbsp;&nbsp;<b><a href="javascript:;">[<%=b.title %>]</a></b>&nbsp; <%} %> <b><a href="<%=brandnexturl %>" class="next">点击这里</a></b>&nbsp;进入下一步 </div> <%} %> <table cellpadding="0" cellspacing="0" width="98%" style="margin:0px auto;"> <tr> <td colspan="2" style="height: 20px;"> </td> </tr> <tr> <td colspan="2"> <table style="background:url(../images/e7.gif) no-repeat; width:474px; height:124px; float:left;"> <tr> <td> <script type="text/javascript"> $(function () { $(".checkall").click(function () { var hascheck = false; $("[type='checkbox']").each(function () { if ($(this).attr("checked")) { hascheck = true; } }); if (hascheck) { $("a#btnAppend").addClass("curappend") } else { $("a#btnAppend").removeClass("curappend") } hascheck = false; }); $("#btnAppend").click(function () { var hascheck = false; $("[type='checkbox']").each(function () { if ($(this).attr("checked")) { hascheck = true; } }); if (!hascheck) { alert("选择品牌-->提交"); return false; } else { return confirm('确认代理选中的品牌? '); } hascheck = false; }) }) </script> <div style=" display:block; float:left; height:30px; width:100%; margin-top:30px;"> <asp:TextBox ID="txtsearch" runat="server" CssClass="input" style="margin-left:20px; width:350px; display:block; float:left;"></asp:TextBox> <asp:Button ID="btnSearch" CssClass="submit2" Text="搜索" runat="server" OnClick="btnSearch_Click" /></div> <div style=" display:block; float:left; width:100%"> <asp:LinkButton ID="btnAppend" runat="server" OnClick="btnAppend_Click" CssClass="addapend"></asp:LinkButton></div> </td> </tr> </table> <table style="background:url(../images/e7.gif) no-repeat; width:474px; height:124px; float:right;"> <tr> <td> <a href="javascript:;" id="addBrand" onclick="addBrand()" >&nbsp;</a> </td> </tr> </table> </td> </tr> <tr> <td colspan="2"> &nbsp;&nbsp;&nbsp; </td> </tr> <tr> <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center"> 选择 </th> <th width="40px" align="center"> 编号 </th> <th align="center" width="200px"> 品牌图 </th> <th align="left" class="l" width="200px"> 品牌名 </th> <th align="left"> &nbsp;&nbsp;工厂名 </th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr> <td align="center"> <asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /> </td> <td align="center"> <asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label> </td> <td align="center" style="height: 45px;"> <img src='<%#string.Format(EnFilePath.Brand,Eval("Id"),EnFilePath.Logo) %>/<%#Eval("logo")%>' width="105" height="38" /> </td> <td align="left" class="l edit "> <a href="brandinfo.aspx?edit=1&id=<%#Eval("id") %>"> <asp:Label ID="lb_title" runat="server" Text='<%#Eval("title") %>'></asp:Label></a> </td> <td align="left" class="l"> <%#Eval("companyname")%> </td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <span class="btn_bg">&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:aspnetpager id="AspNetPager1" runat="server" alwaysshow="true" urlpaging="true" firstpagetext="首页" lastpagetext="尾页" nextpagetext="下一页" prevpagetext="上一页"> </webdiyer:aspnetpager> </div> </div> </td> </tr> <tr> <td class="2"> </td> </tr> </table> </div> </div> <div class="clear"> </div> <div class="foot" style="position: static; left: 0px; background: #f4f4f4; bottom: 0px; right: 0px; width: 100%; height: 30px; display: none"> 底部 </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_dealer/setup2.aspx
ASP.NET
oos
10,867
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.brand { public partial class appbrand :SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { string strWhere = " id not in (select brandid from " + TableName.TBAppBrand + " where dealerid=" + dealerInfo.id + ") "; if (txtsearch.Text != "") { strWhere += " and (title like '%" + txtsearch.Text + "%' or stylename like '%" + txtsearch.Text + "%' or companyname like '%" + txtsearch.Text + "%') "; } rptList.DataSource = ECBrand.GetWebBrandList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; } protected void btnAppend_Click(object sender, EventArgs e) { List<EnAppBrand> list = new List<EnAppBrand>(); for (int i = 0; i < rptList.Items.Count; i++) { string id = ((Label)rptList.Items[i].FindControl("lb_id")).Text; string brandtitle = ((Label)rptList.Items[i].FindControl("lb_title")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { EnAppBrand model = new EnAppBrand(); model.dealerid = dealerInfo.id; model.dealetitle = dealerInfo.title; model.brandid = TypeConverter.StrToInt(id); model.brandtitle = brandtitle; model.companyid = 0; model.companytitle = ""; model.shopid = 0; model.shoptitle = ""; model.appmodule = (int)EnumAppBrandModule.经销商申请; model.apptype = (int)EnumAppBrandType.申请代理品牌; model.apptime = DateTime.Now; model.createmid = memberInfo.id; model.lastedittime = DateTime.Now; model.auditstatus = 0; list.Add(model); } } if (list.Count > 0) { ECAppBrand.AddAppendBrand(list); UiCommon.JscriptPrint(this.Page, "品牌批量代理申请成功!", "appbrandlist.aspx", "Success"); } } protected void btnSearch_Click(object sender, EventArgs e) { ShowData(); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/appbrand.aspx.cs
C#
oos
2,920
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="brandlist.aspx.cs" Inherits="TREC.Web.Suppler.brand.brandlist" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); }) </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="40px" align="center">编号</th> <th width="150" align="center">标志图片</th> <th align="left" class="l">品牌名</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr> <td align="center" style="height:80px; line-height:80px;"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="center"> <a href="brandinfo.aspx?edit=1&id=<%#Eval("id") %>"><img src="<%#TREC.Entity.EnFilePath.GetBrandLogoPath(Eval("Id")!=null?Eval("Id").ToString():"",Eval("logo")!=null?Eval("logo").ToString():"") %>" width="105" height="38"/></a> </td> <td align="left" class="l edit "><a href="brandinfo.aspx?edit=1&id=<%#Eval("id") %>"><b><%#Eval("title") %></b></a></td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/brandlist.aspx
ASP.NET
oos
3,024
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="brandinfo.aspx.cs" Inherits="TREC.Web.Suppler.brand.brandinfo" EnableEventValidation="false" %> <%@ Import Namespace="TREC.ECommerce" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/company-brand.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=brand&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'link', 'fullscreen'] }); }); $("#btnSearch").click(function () { $.ajax({ url: "<%=ECommon.WebUrl %>/ajax/ajaxuser.ashx", data: "type=gettopcompany&v=" + $("#txtSearch").val(), dataType: "json", success: function (data) { if (data != "") { $("#ddlcompany").html(); $("#ddlcompany").html("<option value=\"\">请选择</option>"); $.each(data, function (i) { $("#ddlcompany").append("<option value=\"" + data[i].id + "\">" + data[i].name + "</option>"); }); } } }) }); }); </script> </head> <body style="height: auto"> <form id="form1" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable"> <%if (memberInfo.type != (int)TREC.Entity.EnumMemberType.工厂企业) { %> <tr> <th colspan="2"> 品牌所属工厂: </th> </tr> <tr> <td align="right" width="100"> 工厂查找: </td> <td> <asp:TextBox ID="txtSearch" runat="server" CssClass="w160 input"></asp:TextBox>&nbsp;<input type="button" class="submit" value="查找" id="btnSearch" /> </td> </tr> <tr> <td align="right"> 选择工厂: </td> <td> <asp:DropDownList ID="ddlcompany" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> (如果没有找到品牌工厂请选择<b>无关联工厂</b>) </td> </tr> <%} %> <tr> <td align="right" width="100"> 品牌名称: </td> <td> <asp:TextBox ID="txttitle" runat="server" CssClass="input w160"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 名称索引: </td> <td> <asp:TextBox ID="txtletter" runat="server" CssClass="input w160"></asp:TextBox> <div id="txtletterTip" style="width:280px; float:left"></div> <label>(品牌英文名或拼音字母)</label> </td> </tr> <tr> <td align="right" valign="top"> <asp:HiddenField ID="hfthumb" runat="server" /> <asp:HiddenField ID="hfbannel" runat="server" /> <asp:HiddenField ID="hfdesimage" runat="server" /> <asp:HiddenField ID="hfsurface" runat="server" /> 品牌标志: </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Brand, ECommon.QueryId, TREC.Entity.EnFilePath.Logo)%>"> <asp:HiddenField ID="hflogo" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File2" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> <label>(logo志标大小:宽 196px * 高 70px)</label> </td> </tr> <tr> <td align="right"> 品牌档位: </td> <td> <asp:DropDownList ID="ddlspread" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlspreadTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 品牌材质: </td> <td> <asp:DropDownList ID="ddlmaterial" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlmaterialTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 品牌风格: </td> <td> <asp:DropDownList ID="ddlstyle" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlstyleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 品牌色系: </td> <td> <asp:DropDownList ID="ddlcolor" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlcolorTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right" valign="top"> 品牌介绍: </td> <td> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea " TextMode="MultiLine" Rows="8" Width="98%" Height="220"></asp:TextBox> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 100px"> <asp:Button ID="btnSave" runat="server" CssClass="submit" Text="确认保存" OnClick="btnSave_Click" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/brandinfo.aspx
ASP.NET
oos
9,464
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="createbrand.aspx.cs" Inherits="TREC.Web.Suppler.brand.createbrand" %> <%@ Import Namespace="TREC.ECommerce" %><%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>创建品牌</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.inputlabel.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/dealeraddbrand.js"></script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table class="formTable"> <tr> <th colspan="2">&nbsp;&nbsp;工厂信息:<asp:HiddenField ID="hfcompanyid" runat="server" /></th> </tr> <tr> <td align="right" width="70">厂家名称:</td> <td><asp:TextBox ID="txtcompanytitle" runat="server" CssClass="input required"></asp:TextBox> <div id="txtcompanytitleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right">联系人:</td> <td><asp:TextBox ID="txtclinkman" runat="server" CssClass="input required"></asp:TextBox></td> </tr> <tr> <td align="right">联系电话:</td> <td><asp:TextBox ID="txtcphone" runat="server" CssClass="input"></asp:TextBox> <div id="txtcphoneTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right">厂家介绍:</td> <td><asp:TextBox ID="txtcdescript" runat="server" CssClass="textarea" TextMode="MultiLine" Height="80px" Width="500"></asp:TextBox></td> </tr> </table> <div class="clear"></div> <table class="formTable"> <tr> <th colspan="2">&nbsp;&nbsp;品牌信息:</th> </tr> <tr> <td align="right" width="70">品牌名称:</td> <td><asp:TextBox ID="txtbrandtitle" runat="server" CssClass="input required"></asp:TextBox> <div id="txtbrandtitleTip" style="width:280px; float:left"></div></td> </tr> <tr> <td align="right">品牌索引:</td> <td><asp:TextBox ID="txtbrandletter" runat="server" CssClass="input required"></asp:TextBox>(*品牌字母缩写) <div id="txtbrandletterTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right">品牌Logo:</td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Brand, ECommon.QueryId, TREC.Entity.EnFilePath.Logo)%>"> <asp:HiddenField ID="hfbrandlogo" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"><input id="File2" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right">风格/材质:</td> <td> <asp:DropDownList ID="ddlstyle" runat="server" CssClass="select"></asp:DropDownList> <asp:DropDownList ID="ddlmaterial" runat="server" CssClass="select"></asp:DropDownList> <asp:DropDownList ID="ddlspread" runat="server" CssClass="select"></asp:DropDownList> <asp:DropDownList ID="ddlcolor" runat="server" CssClass="select"></asp:DropDownList> <script type="text/javascript"> $(function () { $("#btnSave").click(function () { if ($("#ddlstyle").val() == "" || $("#ddlmaterial").val() == "" || $("#ddlspread").val() == "" || $("#ddlcolor").val() == "") { alert("品牌风格/材质/价位/色系 不能为空"); return false; } }) }) </script> </td> </tr> <tr> <td align="right">品牌介绍:</td> <td><asp:TextBox ID="txtbranddescript" runat="server" CssClass="textarea" TextMode="MultiLine" Height="80px" Width="500"></asp:TextBox></td> </tr> </table> <div style="margin-top:10px; margin-left:180px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" onclick="btnSave_Click" /><input name="重置" type="reset" class="submit" value="重置" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/createbrand.aspx
ASP.NET
oos
6,821
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="appbrand.aspx.cs" Inherits="TREC.Web.Suppler.brand.appbrand" %> <%@ Import Namespace="TREC.ECommerce" %><%@ Import Namespace="TREC.Entity" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>品牌申请</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.inputlabel.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); $("#txtsearch").inputLabel("请输入品牌工厂名称/品牌名称/风格搜索……"); }) function addBrand() { art.dialog.open('brand/createbrand.aspx?mt=<%=memberInfo.type %>&m=<%=dealerInfo.id %>', { title: '添加新品牌', width: '800px', height: '640px' }); } </script> <script type="text/javascript"> $(function () { $(".checkall").click(function () { var hascheck = false; $("[type='checkbox']").each(function () { if ($(this).attr("checked")) { hascheck = true; } }); if (hascheck) { $("a#btnAppend").addClass("curappend") } else { $("a#btnAppend").removeClass("curappend") } hascheck = false; }); $("#btnAppend").click(function () { var hascheck = false; $("[type='checkbox']").each(function () { if ($(this).attr("checked")) { hascheck = true; } }); if (!hascheck) { alert("选择品牌-->提交"); return false; } else { return confirm('确认代理选中的品牌? '); } hascheck = false; }) }) </script> <style type="text/css"> .brandList{margin-left:15px;} </style> </head> <body style="height:auto"> <form id="form1" runat="server"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td colspan="2" style="height:20px;"></td> </tr> <tr> <td width="70px" align="right">品牌搜索:</td> <td><asp:TextBox ID="txtsearch" runat="server" CssClass="input" style="width:300px;"></asp:TextBox> <asp:Button ID="btnSearch" CssClass="submit" Text="搜索" runat="server" onclick="btnSearch_Click" /><span style="display:block; float:left; padding-top:5px;">(*如搜索没有品牌)</span><a href="javascript:;" id="addBrand" onclick="addBrand()" style="margin-top:0px; float:left; margin-left:10px; margin-top:-5px;" >&nbsp;&nbsp;</a> </td> </tr> <tr> <td colspan="2" style="height:20px;"></td> </tr> <tr> <td colspan="2" align="right"><asp:LinkButton ID="btnAppend" runat="server" CssClass="addapend" OnClick="btnAppend_Click" style="float:right; margin-right:95px"></asp:LinkButton></td> </tr> <tr> <td colspan="2">&nbsp;&nbsp;</td> </tr> <tr> <td colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="40px" align="center">编号</th> <th align="center" width="200px">品牌图</th> <th align="left" class="l" width="200px">品牌名</th> <th align="left">&nbsp;&nbsp;工厂名</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="center" style="height:45px;"><img src='<%#string.Format(EnFilePath.Brand,Eval("Id"),EnFilePath.Logo) %>/<%#Eval("logo")%>' width="105" height="38" /></td> <td align="left" class="l edit "><a href="brandinfo.aspx?edit=1&id=<%#Eval("id") %>"><asp:Label ID="lb_title" runat="server" Text='<%#Eval("title") %>'></asp:Label></a></td> <td align="left" class="l"><%#Eval("companyname")%></td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"> </webdiyer:AspNetPager> </div> </div> </td> </tr> <tr> <td class="2"></td> </tr> </table> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/appbrand.aspx
ASP.NET
oos
6,400
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.brand { public partial class brandsinfo : SupplerPageBase { public string areaCode = ""; public EnBrand _brandInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string strWhere = ""; switch (memberInfo.type) { case (int)EnumMemberType.工厂企业: strWhere=" companyid=" + companyInfo.id; break; case (int)EnumMemberType.经销商: strWhere = " id in (select brandid from " + TableName.TBAppBrand + " where dealerid=" + dealerInfo.id + " and apptype=" + (int)EnumAppBrandType.申请新建品牌 + ") "; break; } ddlbrand.Items.Clear(); ddlbrand.DataSource = ECBrand.GetBrandList(1, 20, strWhere, out tmpPageCount); ddlbrand.DataTextField = "title"; ddlbrand.DataValueField = "id"; ddlbrand.DataBind(); ddlbrand.Items.Insert(0, new ListItem("请选择", "")); if (tmpPageCount == 0) { ScriptUtils.ShowAndRedirect("请选添加品牌", "appbrand.aspx"); } ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnBrands model = ECBrand.GetBrandsInfo(" where id=" + ECommon.QueryId); if (model != null) { if (model != null && model.brandid != 0) { _brandInfo = ECBrand.GetBrandInfo(" where id=" + model.brandid); this.ddlbrand.Items.Clear(); this.ddlbrand.Items.Insert(0, new ListItem(_brandInfo.title, model.brandid.ToString())); this.ddlbrand.Enabled = false; } txttitle.Text = model.title; this.txtdescript.Text = model.descript; this.txtsort.Text = model.sort.ToString(); SetPermission(model.createmid,0, 0, 0, 0, model.brandid, (System.Web.UI.WebControls.WebControl)btnSave, (System.Web.UI.HtmlControls.HtmlControl)btnRequest); } } } protected void btnSave_Click(object sender, EventArgs e) { EnBrands model = null; string strErr = ""; if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECBrand.GetBrandsInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); if (model == null) { model = new EnBrands(); } } else { model = new EnBrands(); model.createmid = 0; model.productcount = 0; model.style = ""; model.spread = ""; model.material = ""; model.createmid = memberInfo.id; model.attribute = ""; model.surface = ""; model.logo = ""; model.thumb = ""; model.bannel = ""; model.desimage = ""; model.keywords = ""; model.template = ""; model.hits = 0; model.auditstatus = 0; model.linestatus = 0; model.letter = ""; } int brandid = TypeConverter.StrToInt(ddlbrand.SelectedValue); string title = txttitle.Text; string descript = this.txtdescript.Text; int sort = TypeConverter.StrToInt(this.txtsort.Text); DateTime lastedittime = DateTime.Now; model.brandid = brandid; model.title = title; model.descript = descript; model.sort = sort; model.lastedittime = lastedittime; int aid = ECBrand.EditBrands(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); StringBuilder imglist = Utils.GetImgUrl(model.descript); if (Utils.GetImgUrl(model.descript).Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ECBrand.UpBrandsConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Brands, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Brands, aid, EnFilePath.ConImage)); } } UiCommon.JscriptPrint(this.Page, "编辑成功!", "brandslist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/brandsinfo.aspx.cs
C#
oos
5,998
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.brand { public partial class brandslist : SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECBrand.DeleteBrands(TypeConverter.StrToInt(ECommon.QueryId)); } rptList.DataSource = ECBrand.GetBrandsListToTableByBrandId(brandidlist); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; } protected void lbtnDel_Click(object sender, EventArgs e) { string idlist=""; for (int i = 0; i < rptList.Items.Count; i++) { string id = ((Label)rptList.Items[i].FindControl("lb_id")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { idlist += id + ","; } } if (idlist.Length > 0) { ECBrand.DeleteBrandsByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "brandslist.aspx", "Success"); } } protected bool GetEdit(string bid) { if (dealerCreateBrandIdList.Contains(bid)) return true; return false; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/brandslist.aspx.cs
C#
oos
1,859
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.brand { public partial class createbrand :SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlstyle.Items.Clear(); ddlstyle.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品风格); ddlstyle.DataTextField = "title"; ddlstyle.DataValueField = "value"; ddlstyle.DataBind(); ddlstyle.Items.Insert(0, new ListItem("请选择", "")); ddlmaterial.Items.Clear(); ddlmaterial.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品选材); ddlmaterial.DataTextField = "title"; ddlmaterial.DataValueField = "value"; ddlmaterial.DataBind(); ddlmaterial.Items.Insert(0, new ListItem("请选择", "")); ddlspread.Items.Clear(); ddlspread.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品价位); ddlspread.DataTextField = "title"; ddlspread.DataValueField = "value"; ddlspread.DataBind(); ddlspread.Items.Insert(0, new ListItem("请选择", "")); ddlcolor.Items.Clear(); ddlcolor.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品颜色); ddlcolor.DataTextField = "title"; ddlcolor.DataValueField = "value"; ddlcolor.DataBind(); ddlcolor.Items.Insert(0, new ListItem("请选择", "")); } } protected void btnSave_Click(object sender, EventArgs e) { int companyId = 0; int brandId = 0; if (hfcompanyid.Value == "") { EnCompany companyModel = new EnCompany(); //企业信息 int mid = 0; string title = txtcompanytitle.Text; string letter = ""; int groupid = 0; string attribute = ""; string industry = ""; string productcategory = ""; int vip = 0; string areacode = ""; string address = ""; int staffsize = 0; string regyear = "2012"; string regcity = ""; string buy = ""; string sell = ""; string linkman = txtclinkman.Text; string phone = txtcphone.Text; string mphone = ""; string fax = ""; string email = ""; string postcode = ""; string homepage = ""; string domain = ""; string domainip = ""; string icp = ""; string surface = ""; string logo = ""; string thumb = ""; string bannel = ""; string desimage = ""; string descript = txtcdescript.Text; string keywords = ""; string template = ""; int hits = 0; int sort = 0; DateTime lastedittime = DateTime.Now; int auditstatus = 0; int linestatus = 0; companyModel.id = 0; companyModel.mid = mid; companyModel.title = title; companyModel.letter = letter; companyModel.groupid = groupid; companyModel.attribute = attribute; companyModel.industry = industry; companyModel.productcategory = productcategory; companyModel.vip = vip; companyModel.areacode = areacode; companyModel.address = address; companyModel.staffsize = staffsize; companyModel.regyear = regyear; companyModel.regcity = regcity; companyModel.buy = buy; companyModel.sell = sell; companyModel.linkman = linkman; companyModel.phone = phone; companyModel.mphone = mphone; companyModel.fax = fax; companyModel.email = email; companyModel.postcode = postcode; companyModel.homepage = homepage; companyModel.domain = domain; companyModel.domainip = domainip; companyModel.icp = icp; companyModel.surface = surface; companyModel.logo = logo; companyModel.thumb = thumb; companyModel.bannel = bannel; companyModel.desimage = desimage; companyModel.descript = descript; companyModel.keywords = keywords; companyModel.template = template; companyModel.hits = hits; companyModel.sort = sort; companyModel.mapapi = ""; companyModel.createmid = memberInfo.id; companyModel.lastedid = 0; companyModel.lastedittime = lastedittime; companyModel.auditstatus = auditstatus; companyModel.linestatus = linestatus; companyId=ECCompany.EditCompany(companyModel); } else { companyId = TypeConverter.StrToInt(hfcompanyid.Value); } if (companyId > 0) { string title = txtbrandtitle.Text; string letter = this.txtbrandletter.Text; string productcategory = ""; string style = ddlstyle.SelectedValue; string material = ddlmaterial.SelectedValue; string spread = ddlspread.SelectedValue; string color = ddlcolor.SelectedValue; string surface = ""; string logo = this.hfbrandlogo.Value; string thumb = ""; string bannel = ""; string desimage = ""; string descript = txtbranddescript.Text; DateTime lastedittime = DateTime.Now; EnBrand brandModel = new EnBrand(); brandModel.createmid = memberInfo.id; brandModel.productcount = 0; brandModel.attribute = ""; brandModel.keywords = ""; brandModel.template = "default"; brandModel.homepage = ""; brandModel.hits = 0; brandModel.sort = 0; brandModel.auditstatus = 0; brandModel.linestatus = 0; brandModel.companyid = companyId; brandModel.title = title; brandModel.letter = letter; brandModel.productcategory = productcategory; brandModel.style = style; brandModel.material = material; brandModel.spread = spread; brandModel.color = color; brandModel.surface = surface; brandModel.logo = logo; brandModel.thumb = thumb; brandModel.bannel = bannel; brandModel.desimage = desimage; brandModel.descript = descript; brandModel.lastedittime = lastedittime; brandId = ECBrand.EditBrand(brandModel); } else { UiCommon.JscriptPrint(this.Page, "工厂信息获取失败!", "appbrand.aspx", "error"); return; } if (brandId > 0) { EnAppBrand appmodel = new EnAppBrand(); appmodel.id=0; appmodel.dealerid = dealerInfo.id; appmodel.dealetitle = dealerInfo.title; appmodel.brandid = brandId; appmodel.brandtitle = txtbrandtitle.Text; appmodel.companyid = 0; appmodel.companytitle = ""; appmodel.shopid = 0; appmodel.shoptitle = ""; appmodel.appmodule = (int)EnumAppBrandModule.经销商申请; appmodel.apptype = (int)EnumAppBrandType.申请新建品牌; appmodel.apptime = DateTime.Now; appmodel.createmid = memberInfo.id; appmodel.lastedittime = DateTime.Now; appmodel.auditstatus = 0; int aid = ECAppBrand.EditAppBrand(appmodel); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (this.hfbrandlogo.Value.Length > 0) { this.hfbrandlogo.Value = this.hfbrandlogo.Value.EndsWith(",") ? this.hfbrandlogo.Value.Substring(0, this.hfbrandlogo.Value.Length - 1) : this.hfbrandlogo.Value; ecUpload.MoveFiles(this.hfbrandlogo.Value.Split(','), string.Format(EnFilePath.Brand, brandId, EnFilePath.Logo)); } UiCommon.JscriptPrint(this.Page, "编辑成功!", "appbrandlist.aspx", "Success"); } else { UiCommon.JscriptPrint(this.Page, "品牌申请己创建,但代理失败,请查找并申请代理!", "appbrand.aspx", "error"); } } else { UiCommon.JscriptPrint(this.Page, "品牌添加失败!", "appbrand.aspx", "error"); return; } this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), System.Guid.NewGuid().ToString(), "<script>art.dialog.close()</script>" ); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/createbrand.aspx.cs
C#
oos
10,672
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.brand { public partial class brandlist : SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECBrand.DeleteBrand(TypeConverter.StrToInt(ECommon.QueryId)); } string strWhere=""; switch (memberInfo.type) { case (int)EnumMemberType.工厂企业: strWhere += " companyid=" + companyInfo.id; break; } rptList.DataSource = ECBrand.GetBrandList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; } protected void lbtnDel_Click(object sender, EventArgs e) { string idlist=""; for (int i = 0; i < rptList.Items.Count; i++) { string id = ((Label)rptList.Items[i].FindControl("lb_id")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { idlist += id + ","; } } if (idlist.Length > 0) { ECBrand.DeleteBrandByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "brandlist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/brandlist.aspx.cs
C#
oos
1,969
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.brand { public partial class brandinfo : SupplerPageBase { public string areaCode = ""; public EnCompany _companyInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlcompany.Items.Clear(); ddlcompany.DataSource = ECCompany.GetCompanyList(1, 20, "", out tmpPageCount); ddlcompany.DataTextField = "title"; ddlcompany.DataValueField = "id"; ddlcompany.DataBind(); ddlcompany.Items.Insert(0, new ListItem("选择厂商", "")); ddlcompany.Items.Insert(1, new ListItem("无关联工厂", "0")); ddlstyle.Items.Clear(); ddlstyle.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type="+(int)EnumConfigByProduct.产品风格); ddlstyle.DataTextField = "title"; ddlstyle.DataValueField = "value"; ddlstyle.DataBind(); ddlstyle.Items.Insert(0, new ListItem("选择风格", "")); ddlmaterial.Items.Clear(); ddlmaterial.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品选材); ddlmaterial.DataTextField = "title"; ddlmaterial.DataValueField = "value"; ddlmaterial.DataBind(); ddlmaterial.Items.Insert(0, new ListItem("选择选材", "")); ddlspread.Items.Clear(); ddlspread.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品价位); ddlspread.DataTextField = "title"; ddlspread.DataValueField = "value"; ddlspread.DataBind(); ddlspread.Items.Insert(0, new ListItem("选择价位", "")); ddlcolor.Items.Clear(); ddlcolor.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品颜色); ddlcolor.DataTextField = "title"; ddlcolor.DataValueField = "value"; ddlcolor.DataBind(); ddlcolor.Items.Insert(0, new ListItem("选择颜色", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnBrand model = ECBrand.GetBrandInfo(" where id=" + ECommon.QueryId); if (model != null) { if (model != null && model.companyid != 0) { _companyInfo = ECCompany.GetCompanyInfo(" where id=" + model.companyid); this.ddlcompany.Items.Clear(); this.ddlcompany.Items.Insert(0, new ListItem(_companyInfo.title, model.companyid.ToString())); this.ddlcompany.Enabled = false; } txttitle.Text = model.title; this.txtletter.Text = model.letter; this.ddlstyle.SelectedValue = model.style; this.ddlmaterial.SelectedValue = model.material; this.ddlspread.SelectedValue = model.spread; this.ddlcolor.SelectedValue = model.color; this.hfsurface.Value = model.surface; this.hflogo.Value = model.logo; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.hfdesimage.Value = model.desimage; this.txtdescript.Text = model.descript; //SetPermission(model.createmid, model.companyid, 0, 0, 0, model.id, (System.Web.UI.WebControls.WebControl)btnSave, (System.Web.UI.HtmlControls.HtmlControl)btnRequest); } } } protected void btnSave_Click(object sender, EventArgs e) { EnBrand model = null; string strErr = ""; if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECBrand.GetBrandInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); if (model == null) if(model==null) { model = new EnBrand(); } } else { model = new EnBrand(); model.createmid = 0; model.productcount = 0; model.createmid = memberInfo.id; model.attribute = ""; model.keywords = ""; model.template = "default"; model.homepage = ""; model.hits = 0; model.sort = 0; model.auditstatus = 0; model.linestatus = 0; } int companyid = 0; if (memberInfo.type == (int)EnumMemberType.工厂企业) { companyid = companyInfo.id; } else { companyid = TypeConverter.StrToInt(ddlcompany.SelectedValue); } string title = txttitle.Text; string letter = this.txtletter.Text; string productcategory = ""; string style = ddlstyle.SelectedValue; string material = ddlmaterial.SelectedValue; string spread = ddlspread.SelectedValue; string color = ddlcolor.SelectedValue; string surface = this.hfsurface.Value; string logo = this.hflogo.Value; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string desimage = this.hfdesimage.Value; string descript = this.txtdescript.Text; DateTime lastedittime = DateTime.Now; model.companyid = companyid; model.title = title; model.letter = letter; model.productcategory = productcategory; model.style = style; model.material = material; model.spread = spread; model.color = color; model.surface = surface; model.logo = logo; model.thumb = thumb; model.bannel = bannel; model.desimage = desimage; model.descript = descript; model.lastedittime = lastedittime; int aid = ECBrand.EditBrand(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (surface.Length > 0) { surface = surface.StartsWith(",") ? surface.Substring(1, surface.Length - 1) : surface; surface = surface.EndsWith(",") ? surface.Substring(0, surface.Length - 1) : surface; ecUpload.MoveFiles(surface.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.Surface)); } if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.Thumb)); } if (logo.Length > 0) { ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.Logo)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.Banner)); } if (desimage.Length > 0) { ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.DesImage)); } StringBuilder imglist = Utils.GetImgUrl(model.descript); if (Utils.GetImgUrl(model.descript).Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ECBrand.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Brand, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.ConImage)); } } UiCommon.JscriptPrint(this.Page, "编辑成功!", "brandlist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/brandinfo.aspx.cs
C#
oos
9,845
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.brand { public partial class appbrandlist : SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECBrand.DeleteBrand(TypeConverter.StrToInt(ECommon.QueryId)); } string strWhere=""; switch (memberInfo.type) { case (int)EnumMemberType.经销商: strWhere += " dealerid=" + dealerInfo.id; break; case (int)EnumMemberType.工厂企业: strWhere += " companyid=" + companyInfo.id; break; } rptList.DataSource = ECAppBrand.GetAppBrandList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; } protected void lbtnDel_Click(object sender, EventArgs e) { string idlist=""; for (int i = 0; i < rptList.Items.Count; i++) { string id = ((Label)rptList.Items[i].FindControl("lb_id")).Text; CheckBox cb = (CheckBox)rptList.Items[i].FindControl("cb_id"); if (cb.Checked) { idlist += id + ","; } } if (idlist.Length > 0) { ECAppBrand.DeleteAppBrandByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "appbrandlist.aspx", "Success"); } } protected bool GetEdit(string bid) { if (dealerCreateBrandIdList.Contains(bid)) return true; return false; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/appbrandlist.aspx.cs
C#
oos
2,312
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="brandslist.aspx.cs" Inherits="TREC.Web.Suppler.brand.brandslist" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $("tr[isEdit='False']").poshytip(); }); </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="40px" align="center">编号</th> <th align="center" width="200">&nbsp;&nbsp;品牌名</th> <th align="left">&nbsp;&nbsp;品牌系列名</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr isEdit="<%#GetEdit(Eval("brandid").ToString()) %>" title='<%#!GetEdit(Eval("brandid").ToString())?Eval("brandtitle").ToString()+"&nbsp;&nbsp;不是您创建的,可查看,不可编辑删除":""%>'> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" Enabled='<%#GetEdit(Eval("brandid").ToString()) %>' /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="center" ><%#Eval("brandtitle")%></td> <td align="left" class="l edit"><a href="<%#GetEdit(Eval("brandid").ToString())?"brandsinfo.aspx?edit=1&id="+Eval("id"):"javascript:;"%>"><%#Eval("title")%></a></td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/brandslist.aspx
ASP.NET
oos
2,976
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="brandsinfo.aspx.cs" Inherits="TREC.Web.Suppler.brand.brandsinfo" EnableEventValidation="false" %> <%@ Import Namespace="TREC.ECommerce" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/company-brands.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=brands&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'link', 'fullscreen'] }); }); }); </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table width="100%" class="formTable"> <tr> <td align="right" width="70"> 选择品牌: </td> <td> <asp:DropDownList ID="ddlbrand" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlbrandTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 系列名称: </td> <td> <asp:TextBox ID="txttitle" runat="server" CssClass="input w160"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right" valign="top"> 介绍: </td> <td> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea " TextMode="MultiLine" Rows="5" Width="660" Height="200"></asp:TextBox> </td> </tr> <tr> <td align="right"> 排序 : </td> <td> <asp:TextBox ID="txtsort" runat="server" CssClass="input w160 digits">0</asp:TextBox> <div id="txtsortTip" style="width:280px; float:left"></div> </td> </tr> </table> <div style="margin-top:10px; margin-left:70px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" onclick="btnSave_Click" /><input name="重置" type="reset" class="submit" value="重置" runat="server" id="btnRequest" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/brandsinfo.aspx
ASP.NET
oos
4,722
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="appbrandlist.aspx.cs" Inherits="TREC.Web.Suppler.brand.appbrandlist" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); $("tr[isEdit='False']").poshytip(); }) </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="40px" align="center">编号</th> <th align="left" class="l" width="160">品牌名</th> <th align="left" class="l"><%=memberInfo.type == (int)TREC.Entity.EnumMemberType.工厂企业 ? "申请经销商" : "品牌工厂" %></th> <th width="120px" align="center">类型</th> <th align="center" width="80px">审核状态</th> <th align="center" width="160px">申请时间</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr isEdit="<%#GetEdit(Eval("brandid").ToString()) %>" title='<%#!GetEdit(Eval("brandid").ToString())?Eval("brandtitle").ToString()+"&nbsp;&nbsp;不是您创建的,可查看,不可编辑删除":""%>'> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" Enabled='<%#GetEdit(Eval("brandid").ToString()) %>' /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("id")%>'></asp:Label></td> <td align="left" class="l edit"><a href="<%#GetEdit(Eval("brandid").ToString())?"brandinfo.aspx?edit=1&id="+Eval("brandid"):"javascript:;"%>"><%#Eval("brandtitle") %></a></td> <td align="left" class="l edit"><a href="javascript:;"><%#memberInfo.type == (int)TREC.Entity.EnumMemberType.工厂企业 ? Eval("dealertitle") : Eval("companytitle") %></a></td> <td align="center"><a href="javascript:;"><%#Enum.GetName(typeof(TREC.Entity.EnumAppBrandType), Eval("apptype"))%></a></td> <td align="center"><%#Enum.GetName(typeof(TREC.Entity.EnumAuditStatus), Eval("auditstatus"))%></td> <td align="center"><%#Eval("apptime")%></td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/brand/appbrandlist.aspx
ASP.NET
oos
3,977
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler { public partial class help : SupplerPageBase { protected EnArticle model = null; protected List<EnArticle> articlelist = new List<EnArticle>(); protected EnArticleCategory modelMain = null; protected List<EnArticleCategory> helpCategoryList = new List<EnArticleCategory>(); protected void Page_Load(object sender, EventArgs e) { lbtitle.Text = "帮助中心"; modelMain=ECArticle.GetArticleCategoryInfo(" where letter='help-model'"); if (modelMain != null) { lbtitle.Text = modelMain.title; helpCategoryList = ECArticle.GetReaderArticleCategoryList(1, 30, " and parentid=" + modelMain.id, "", "lft", "asc", out tmpPageCount); if (ECommon.QueryCid != "" && ECommon.QueryId == "") { lbtitle.Text = helpCategoryList.Single(x => x.id.ToString() == ECommon.QueryCid).title; articlelist = ECArticle.GetReaderArticleList(1, 50, " and categoryid=" + ECommon.QueryCid, out tmpPageCount); } if (ECommon.QueryCid == "" && ECommon.QueryId == "") { } } else { Response.Write("请新建一个文档分类,并将索引设为:'help-model',确保索引唯一"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/help.aspx.cs
C#
oos
1,707
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="TREC.Web.Suppler.index" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register src="ascx/head.ascx" tagname="head" tagprefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title><%=ECommon.WebTitle%>-商务中心</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> <link rel="stylesheet" type="text/css" href="css/index.css" /> <link rel="Stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/joyride/joyride-1.0.2.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/joyride/jquery.joyride-1.0.2.min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <script type="text/javascript" src="script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $('.helper').poshytip({ className: 'tip-yellowsimple', showTimeout: 1, alignTo: 'target', alignX: 'left', alignY: 'center', offsetX: 5, allowTipHover: false, content: '帮助中心?' }); $(".leftMenu > ul > li > a").live("click", function () { $(".leftMenu > ul > li > a").removeClass("cur"); $(this).addClass("cur"); $(".frameMenu").find("span.title").text($(this).text()) $('#helpIco').poshytip('update', '如果您在 <strong>' + $(this).text() + ' 时遇到问题</strong>,点击 <strong>?</strong> 查看 ' + $(this).text() + '的使用帮助'); }); }); </script> </head> <body> <form id="form1" runat="server"> <uc1:head ID="head1" runat="server" /> <div class="Fcon"> <div class="leftMenu"> <%int c = 0;%> <%foreach (TREC.Entity.EnMenu m in SupplerPageBase.menuList) { %> <%if (c != 0 && m.parent == 0) { %> </ul> <%} %> <%if (m.lev == 1) { %> <h3><a href="javascript:;"><%=m.title%></a></h3> <ul> <%} else if (m.lev == 2) { %> <li><a href="<%=TREC.ECommerce.ECommon.getMenuUrl(m.url) %>" target="mainFrame"> <%=m.title%></a></li> <%} %> <%c++; } %> </ul> <%int j = 0;%> <%foreach (TREC.Entity.EnMenu m in TREC.ECommerce.ECMenu.GetMenuList("", " where module=14", "")) { %> <%if (j != 0 && m.parent == 0) { %> </ul> <%} %> <%if (m.lev == 1) { %> <h3><a href="javascript:;"><%=m.title%></a></h3> <ul> <%} else if (m.lev == 2) { %> <li><a href="<%=TREC.ECommerce.ECommon.getMenuUrl(m.url) %>" target="mainFrame"> <%=m.title%></a></li> <%} %> <%j++; } %> <li><a href="<%=TREC.ECommerce.ECommon.WebUrl %>/loginout.aspx">退出系统</a></li> </ul> </div> <div class="frameMenu"> <span class="title">系统中心</span><a href="javascript:;" class="helper menuHelper" title="" >&nbsp;</a> </div> <div class="rightFrame" style="height:auto;"> <iframe src="main.aspx" width="100%;" onload="Javascript:SetWinHeight(this)" frameborder="0" scrolling="no" name="mainFrame" id="mainFrame"></iframe> </div> </div> <div class="clear"></div> <div class="foot" style=" position:static; left:0px; background:#f4f4f4; bottom:0px; right:0px; width:100%; height:30px; display:none"> 底部 </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/index.aspx
ASP.NET
oos
4,826
/* [Destoon B2B System] Copyright (c) 2008-2011 Destoon.COM This is NOT a freeware, use is subject to license.txt */ .mainInfoTable td{ text-align:left; vertical-align:top} .i_info {border-bottom:#9CB8CC 1px solid;padding:0 0 10px 10px;} .i_info li {padding:7px 0 7px 0;} .i_quick li {width:19%;float:left;text-align:center;padding:20px 0 10px 0;} .i_quick a {display:block;width:100%;height:100%;} .i_quick img {margin:0 0 8px 0;} .i_note {padding:5px;} .i_note textarea {border:#9CB8CC 1px solid;padding:3px;width:98%;height:80px;word-break:break-all;color:#444444;} .i_find {margin:10px 0 0 0;background:#F6F9FC;} .i_find div {padding:3px 8px 3px 10px;background:url('../images/menu_bg.gif') repeat-x;border-bottom:#E4EDF4 1px solid;} .i_find li {height:22px;line-height:22px;overflow:hidden;padding:0 5px 0 10px;background:url('../images/li_dot.gif') no-repeat 5px 9px;} .i_head {border:#6C92AD 1px solid;background:url('../images/ihead_bg.gif') repeat-x;height:24px;line-height:24px;padding:0 10px 0 10px;} .i_body {border:#6C92AD 1px solid;border-top:none;background:#FFFFFF;margin:0 0 10px 0;} .i_rt {width:300px;background:#E4EDF4;padding:8px;} .i_sys {padding:5px 5px 5px 8px;} .i_sys li {height:26px;line-height:26px;overflow:hidden;padding:0 5px 0 15px;background:url('../images/message_sys.gif') no-repeat 0 5px;} .i_user td {border-bottom:#E4EDF4 1px solid;} .i_user_l {width:60px;padding:6px 6px 6px 10px;border-right:#E4EDF4 1px solid;color:#005599;} .lay{top:0px; left:0px; right:0px; bottom:0px; position:fixed; z-index:20000; background:#282828; width:100%; height:100%;} .diBox{ width:811px; height:537px; position:fixed; z-index:20001; top:50%; left:50%; margin:-280px 0px 0px -410px; background:url('../images/f_d_bg.jpg') no-repeat;} .diTop{height:83px; width:100%; float:left;} .diTop ul{margin-left:5px;} .diTop ul li{float:left; width:134px; height:68px; text-align:center; margin:7px 0px 7px 0px;} .diTop ul li.cur{background:url('../images/f_d_topbg.jpg') no-repeat;} .diTop ul li a{color:#00415f; font-weight:bold; padding-top:25px; display:block; } .diTop ul li.cur a{color:#a1e3ff; font-weight:bold;} .diTop ul li span{display:block; float:left; text-align:center; line-height:20px; width:100%; color:#fff; font-weight:bold;} .diTop ul li span.t{color:#9dd0a0} .diTop ul li span.e{color:#f50} .diTitle{float:left; width:100%; height:27px; text-align:center; color:#f1f9ff; font-weight:bold; line-height:29px;} .diFrame{background:url('../images/f_f_bg.jpg') no-repeat; width:100%; height:371px; float:left; padding-top:11px; padding-bottom:10px;} .diFoot{color:#33a7ed; line-height:27px; text-align:center;} .diFoot span.w{padding:0px 5px; color:#fff;} .dicFrame{background:none;} .dicFrame .FrameCon{margin:0px auto 0px auto; height:360px; width:763px; background:none;} .FrameCon ul.main li{margin:50px 10px 0px 60px;height:269px; width:169px; cursor:pointer;} .FrameCon ul.main li:hover{cursor:pointer;} .FrameCon ul.main li a{ display:block; height:269px; width:169px; text-decoration:none;} .FrameCon ul.main li.f a{ background:url('../images/1-2.jpg') no-repeat;} .FrameCon ul.main li.f a.cur,.FrameCon ul.main li.f a:hover,.FrameCon ul.main li:hover{ background:url('../images/1-1.jpg') no-repeat;} .FrameCon ul.main li.t a{ background:url('../images/2-2.jpg') no-repeat;} .FrameCon ul.main li.t a.cur,.FrameCon ul.main li.t a:hover{ background:url('../images/2-1.jpg') no-repeat;} .FrameCon ul.main li.s a{ background:url('../images/3-2.jpg') no-repeat;} .FrameCon ul.main li.s a.cur,.FrameCon ul.main li.s a:hover{ background:url('../images/3-1.jpg') no-repeat;} .FrameCon ul.main li a span{ text-decoration:none; display:block; float:left; margin:0px auto; } .FrameCon ul.main li a span.t{ margin-top:120px; color:#0280b5; font-weight:bold; font-size:14px; width:100%; text-align:center;} .FrameCon ul.main li a span.c{ font-size:12px; color:#656565; padding:15px;} .FrameCon ul.main li a.cur span.t,.FrameCon ul.main li a:hover span.t{color:#d11414;} .FrameCon table.firsForm{width:60%; margin:30px auto 0px auto; position:relative; background:none; } .FrameCon table.firsForm tr td{color:#5b5b5b; height:30px; line-height:30px; text-align:left; font-size:12px; background:none;} .FrameCon table.firsForm tr td input,.FrameCon table.firsForm tr td label,.FrameCon table.firsForm tr td textarea,.FrameCon table.firsForm tr td select{margin:0px 3px;} .FrameCon table.firsForm tr td input.text{width:250px; line-height:20px; height:20px; border:1px solid #abadb3; font-size:12px; background:#fff;} .FrameCon table.firsForm tr td input.text_focus{width:250px; line-height:20px; height:20px; border:1px solid #017cb6;background:#fff;}
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/css/index.css
CSS
oos
4,759
/* [Destoon B2B System] Copyright (c) 2008-2011 Destoon.COM This is NOT a freeware, use is subject to license.txt */ .message_head {background:#EFF5FB;border-bottom:#AAC1DE 1px solid;padding:10px 30px 10px 30px;line-height:22px;color:#666666;} .message_head strong {font-size:14px;color:#000000;} .message_head span {color:#798699;padding:0 5px 0 2px;} .message_body {background:#FFFFFF;font-size:14px;line-height:200%;padding:10px 30px 10px 30px;} .message_body a:link,.message_body a:visited,.message_body a:active {color:#1E5494;text-decoration:underline;} .message_body a:hover {color:#FF6600;text-decoration:none;} .message_foot {background:#EFF5FB;border-top:#AAC1DE 1px solid;border-bottom:#AAC1DE 1px solid;padding:10px 30px 10px 30px;}
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/css/message.css
CSS
oos
756
/* Stylesheet for Tigra Calendar v5.0 Product is Public Domain (Free for any kind of applicaiton, customization and derivative works are allowed) URL: http://www.softcomplex.com/products/tigra_calendar/ - all image paths are relative to path of stylesheet - the styles below can be moved into the document or in existing stylesheet */ /* input box in default state */ .tcalInput { background: url('../images/cal.gif') 100% 50% no-repeat; padding-right: 20px; cursor: pointer; } /* additional properties for input boxe in activated state, above still applies unless in conflict */ .tcalActive { background-image: url('../images/no_cal.gif'); } /* container of calendar's pop-up */ #tcal { position: absolute; visibility: hidden; z-index: 100; width: 170px; background-color: white; margin-top: 2px; padding: 0 2px 2px 2px; border: 1px solid silver; -moz-box-shadow: 3px 3px 4px silver; -webkit-box-shadow: 3px 3px 4px silver; box-shadow: 3px 3px 4px silver; -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver')"; filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver'); } /* table containing navigation and current month */ #tcalControls { border-collapse: collapse; border: 0; width: 100%; } #tcalControls td { border-collapse: collapse; border: 0; padding: 0; width: 16px; background-position: 50% 50%; background-repeat: no-repeat; cursor: pointer; } #tcalControls th { border-collapse: collapse; border: 0; padding: 0; line-height: 25px; font-size: 10px; text-align: center; font-family: Tahoma, Geneva, sans-serif; font-weight: bold; white-space: nowrap; } #tcalPrevYear { background-image: url('../images/prev_year.gif'); } #tcalPrevMonth { background-image: url('../images/prev_mon.gif'); } #tcalNextMonth { background-image: url('../images/next_mon.gif'); } #tcalNextYear { background-image: url('../images/next_year.gif'); } /* table containing week days header and calendar grid */ #tcalGrid { border-collapse: collapse; border: 1px solid silver; width: 100%; } #tcalGrid th { border: 1px solid silver; border-collapse: collapse; padding: 3px 0; text-align: center; font-family: Tahoma, Geneva, sans-serif; font-size: 10px; background-color: gray; color: white; height:14px; color:#000; } #tcalGrid td { border: 0; border-collapse: collapse; padding: 2px 0; text-align: center; font-family: Tahoma, Geneva, sans-serif; width: 14%; font-size: 11px; cursor: pointer; } #tcalGrid td.tcalOtherMonth { color: silver; } #tcalGrid td.tcalWeekend { background-color: #ACD6F5; } #tcalGrid td.tcalToday { border: 1px solid red; } #tcalGrid td.tcalSelected { background-color: #FFB3BE; }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/css/tcal.css
CSS
oos
2,843
._jsfileupload{ display:block; float:left; width:450px;} ._fileTools{display:block; float:left;width:450px; margin:0px 0px 5px 0px;} ._fileTools input{height:18px; line-height:18px;} /*路径显示控件*/ ._fileTools ._fileValue{float:left;} ._fileTools .w380{width:250px;} /*file容器样式*/ ._jsfileupload a.files {margin:0 auto;float:left; width:64px;height:18px;overflow:hidden;display:block;border:1px solid #70b1cf;text-decoration:none; background:url(../images/upfilebg.gif) left top no-repeat;} /*file设为透明,并覆盖整个触发面*/ ._jsfileupload a.files input {margin-left:-240px;font-size:20px;cursor:pointer;filter:alpha(opacity=0);opacity:0;} /*取消点击时的虚线框*/ ._jsfileupload a.files,._jsfileuploada.files input{outline:none;/*ff*/hide-focus:expression(this.hideFocus=true);/*ie*/} /*上传文件时切换图片*/ .filesbg2{background:url(../images/upfilebg2.gif) left top no-repeat!important;} ._jsfileupload .uploading{float:left;background:url(../images/loading.gif) no-repeat left center;padding-left:18px;display:none;line-height:20px;height:20px;} ._jsfileupload input.filelistinput{display:none;} ._filepreview,._filedel{display:block; float:left; padding:4px;}
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/css/fileupload.css
CSS
oos
1,233
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class companybrandlist : WebPageBase { /// <summary> /// 下一页连接 /// </summary> public string NextUrl { get { if (ECommon.QueryPageIndex == AspNetPager1.PageCount) { return "#"; } else { return string.Format(EnUrls.CompanyBrandListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchStaffsize, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex+1); } } } //上一页连接 public string PrvUrl { get { if (ECommon.QueryPageIndex==1) { return "#"; } else { return string.Format(EnUrls.CompanyBrandListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchStaffsize, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex - 1); } } } public string sortTitle = "按&nbsp;名&nbsp;称"; public string sortDate = "按&nbsp;时&nbsp;间"; public string sortHot = "推荐厂家"; public List<EnWebCompanyBrand> list = new List<EnWebCompanyBrand>(); protected void Page_Load(object sender, EventArgs e) { pageTitle = "-品牌工厂-按品牌"; string strWhere = ""; if (ECommon.QuerySearchBrand != "") { string t = ECommon.QuerySearchBrand.StartsWith("_") ? ECommon.QuerySearchBrand.Substring(1, ECommon.QuerySearchBrand.Length - 1) : ECommon.QuerySearchBrand; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and brandid in (" + t + ") "; } if (ECommon.QuerySearchStyle != "") { string t = ECommon.QuerySearchStyle.StartsWith("_") ? ECommon.QuerySearchStyle.Substring(1, ECommon.QuerySearchStyle.Length - 1) : ECommon.QuerySearchStyle; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and stylevalue in (" + t + ") "; } if (ECommon.QuerySearchMaterial != "") { string t = ECommon.QuerySearchMaterial.StartsWith("_") ? ECommon.QuerySearchMaterial.Substring(1, ECommon.QuerySearchMaterial.Length - 1) : ECommon.QuerySearchMaterial; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and materialvalue in (" + t + ") "; } if (ECommon.QuerySearchSpread != "") { string t = ECommon.QuerySearchSpread.StartsWith("_") ? ECommon.QuerySearchSpread.Substring(1, ECommon.QuerySearchSpread.Length - 1) : ECommon.QuerySearchSpread; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and spreadvalue in (" + t + ") "; } if (ECommon.QuerySearchStaffsize != "") { string t = ECommon.QuerySearchStaffsize.StartsWith("_") ? ECommon.QuerySearchStaffsize.Substring(1, ECommon.QuerySearchStaffsize.Length - 1) : ECommon.QuerySearchStaffsize; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and staffsize in (" + t + ") "; } if (ECommon.QuerySearchKey != "") { strWhere += " and title+brandtitle like '%" + ECommon.QuerySearchKey + "%' "; } strWhere = strWhere != "" ? " and ( " + strWhere.Substring(4, strWhere.Length - 4) + " )" : ""; string orderType = "desc"; string orderKey = "sort"; switch (ECommon.QuerySearchSort.ToLower()) { case "_t1": orderType = "desc"; orderKey = "title"; sortTitle = "名称升序"; break; case "_t2": orderKey = "title"; orderType = "asc"; sortTitle = "名称排序"; break; case "_d1": orderKey = "lastedittime"; orderType = "desc"; sortDate = "由近到远"; break; case "_d2": orderKey = "lastedittime"; orderType = "asc"; sortDate = "由远到近"; break; case "_h1": orderKey = "hits"; orderType = "desc"; sortHot = "由高到低"; break; case "_h2": orderKey = "hits"; orderType = "asc"; sortHot = "由低到高"; break; } list = ECCompany.GetWebCompanyBrandList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, orderKey, orderType, out tmpPageCount); AspNetPager1.RecordCount = tmpPageCount; AspNetPager1.EnableUrlRewriting = true; AspNetPager1.UrlRewritePattern = string.Format(EnUrls.CompanyBrandListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchStaffsize, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, "{0}"); } /// <summary> /// AspNetPager1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::Wuqi.Webdiyer.AspNetPager AspNetPager1; } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/companybrandlist.aspx.cs
C#
oos
6,814
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; namespace TREC.Web.aspx { public partial class loginout : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { CookiesHelper.WriteCookie("mid", "", -1); CookiesHelper.WriteCookie("mpwd", "", -1); Response.Redirect(ResolveUrl("~/index.aspx")); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/loginout.aspx.cs
C#
oos
522
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.shop { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class product :ShopPageBase { /// <summary> /// 下一页连接 /// </summary> public string NextUrl { get { if (ECommon.QueryPageIndex == AspNetPager1.PageCount) { return "#"; } else { return string.Format(EnUrls.ShopInfoProductList, ECommon.QuerySId, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex + 1, ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); } } } //上一页连接 public string PrvUrl { get { if (ECommon.QueryPageIndex == 1) { return "#"; } else { return string.Format(EnUrls.ShopInfoProductList, ECommon.QuerySId, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex - 1, ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); } } } public string sortTitle = "按&nbsp;名&nbsp;称"; public string sortDate = "按&nbsp;时&nbsp;间"; public string sortHot = "推荐产品"; public List<EnWebProduct> list = new List<EnWebProduct>(); protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + shopInfo.title + "-销售产品"; string strWhere = ""; #region 搜索条件 if (ECommon.QuerySearchBrand != "") { string t = ECommon.QuerySearchBrand.StartsWith("_") ? ECommon.QuerySearchBrand.Substring(1, ECommon.QuerySearchBrand.Length - 1) : ECommon.QuerySearchBrand; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and brandid in (" + t + ") "; } if (ECommon.QuerySearchStyle != "") { string t = ECommon.QuerySearchStyle.StartsWith("_") ? ECommon.QuerySearchStyle.Substring(1, ECommon.QuerySearchStyle.Length - 1) : ECommon.QuerySearchStyle; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += "and stylevalue in (" + t + ") "; } if (ECommon.QuerySearchMaterial != "") { string t = ECommon.QuerySearchMaterial.StartsWith("_") ? ECommon.QuerySearchMaterial.Substring(1, ECommon.QuerySearchMaterial.Length - 1) : ECommon.QuerySearchMaterial; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and materialvalue in (" + t + ") "; } if (ECommon.QuerySearchSpread != "") { string t = ECommon.QuerySearchSpread.StartsWith("_") ? ECommon.QuerySearchSpread.Substring(1, ECommon.QuerySearchSpread.Length - 1) : ECommon.QuerySearchSpread; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = "'" + t.Replace("_", "','") + "'"; strWhere += " and brandid in ( select id from " + TableName.TBBrand + " where spread in (" + t + ") and linestatus=1) "; } if (ECommon.QuerySearchCategory != "") { strWhere += " and categoryid in (" + ECommon.QuerySearchCategory + ")"; } if (ECommon.QuerySearchPCategory != "") { strWhere += " and categoryid in (select id from t_productcategory where parentid=" + ECommon.QuerySearchPCategory + ")"; } strWhere = strWhere != "" ? " and ( " + strWhere.Substring(4, strWhere.Length - 4) + " )" : ""; if (ECommon.QuerySearchComposing != "" && ECommon.QuerySearchComposing == "recomm") { strWhere += " and attribute like '%102,%'"; } if (ECommon.QueryType != "") { string str = ""; foreach (string s in ECommon.QuerySearchType.Substring(1, ECommon.QuerySearchType.Length - 1).Split('_')) { str += " and attributexml like '%<typevalue>" + s + "</typevalue>%' "; } str = str != "" ? " and ( " + str.Substring(4, str.Length - 4) + " )" : ""; strWhere += str; } strWhere = strWhere == " brandid in (select brandid from t_shopbrand where shopid=" + ECommon.QuerySId + ")" ? "" : strWhere + " and brandid in (select brandid from t_shopbrand where shopid=" + ECommon.QuerySId + ")"; #endregion #region 排序 string orderType = ""; string orderKey = ""; switch (ECommon.QuerySearchSort.ToLower()) { case "_t1": orderType = "desc"; orderKey = "title"; sortTitle = "名称升序"; break; case "_t2": orderKey = "title"; orderType = "asc"; sortTitle = "名称排序"; break; case "_d1": orderKey = "lastedittime"; orderType = "desc"; sortDate = "由近到远"; break; case "_d2": orderKey = "lastedittime"; orderType = "asc"; sortDate = "由远到近"; break; case "_h1": orderKey = "hits"; orderType = "desc"; sortHot = "由高到低"; break; case "_h2": orderKey = "hits"; orderType = "asc"; sortHot = "由低到高"; break; } #endregion int pageCount = 0; list = ECProduct.GetWebProductList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, orderKey, orderType, out tmpPageCount); AspNetPager1.RecordCount = pageCount; AspNetPager1.EnableUrlRewriting = true; AspNetPager1.UrlRewritePattern = string.Format(EnUrls.ShopInfoProductList, ECommon.QuerySId, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, "{0}", ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); pageTitle = "-产品"; } /// <summary> /// AspNetPager1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::Wuqi.Webdiyer.AspNetPager AspNetPager1; } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/shop/product.aspx.cs
C#
oos
8,052
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.shop { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class address :ShopPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + shopInfo.title + "-经销店铺-联系地址"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/shop/address.aspx.cs
C#
oos
543
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.shop { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class index :ShopPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + shopInfo.title + "-经销店铺-首页"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/shop/index.aspx.cs
C#
oos
535
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.shop { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class index2 :ShopPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + shopInfo.title + "-经销店铺-首页"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/shop/index2.aspx.cs
C#
oos
536
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.shop { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class promotion :ShopPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + shopInfo.title + "-经销店铺-促销信息"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/shop/promotion.aspx.cs
C#
oos
545
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.company { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class about :CompanyPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + companyInfo.title + "-厂家介绍"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/company/about.aspx.cs
C#
oos
537
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.company { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class product :CompanyPageBase { /// <summary> /// 下一页连接 /// </summary> public string NextUrl { get { if (ECommon.QueryPageIndex == AspNetPager1.PageCount) { return "#"; } else { return string.Format(EnUrls.CompanyInfoProductList,ECommon.QueryCId, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex + 1, ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); } } } //上一页连接 public string PrvUrl { get { if (ECommon.QueryPageIndex == 1) { return "#"; } else { return string.Format(EnUrls.CompanyInfoProductList, ECommon.QueryCId, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex - 1, ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); } } } public string sortTitle = "按&nbsp;名&nbsp;称"; public string sortDate = "按&nbsp;时&nbsp;间"; public string sortHot = "推荐产品"; public List<EnWebProduct> list = new List<EnWebProduct>(); protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + companyInfo.title + "-家具产品"; string strWhere = ""; #region 搜索条件 if (ECommon.QuerySearchBrand != "") { string t = ECommon.QuerySearchBrand.StartsWith("_") ? ECommon.QuerySearchBrand.Substring(1, ECommon.QuerySearchBrand.Length - 1) : ECommon.QuerySearchBrand; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and brandid in (" + t + ") "; } if (ECommon.QuerySearchStyle != "") { string t = ECommon.QuerySearchStyle.StartsWith("_") ? ECommon.QuerySearchStyle.Substring(1, ECommon.QuerySearchStyle.Length - 1) : ECommon.QuerySearchStyle; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += "and stylevalue in (" + t + ") "; } if (ECommon.QuerySearchMaterial != "") { string t = ECommon.QuerySearchMaterial.StartsWith("_") ? ECommon.QuerySearchMaterial.Substring(1, ECommon.QuerySearchMaterial.Length - 1) : ECommon.QuerySearchMaterial; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and materialvalue in (" + t + ") "; } if (ECommon.QuerySearchSpread != "") { string t = ECommon.QuerySearchSpread.StartsWith("_") ? ECommon.QuerySearchSpread.Substring(1, ECommon.QuerySearchSpread.Length - 1) : ECommon.QuerySearchSpread; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = "'" + t.Replace("_", "','") + "'"; strWhere += " and brandid in ( select id from " + TableName.TBBrand + " where spread in (" + t + ") and linestatus=1) "; } if (ECommon.QuerySearchCategory != "") { strWhere += " and categoryid in (" + ECommon.QuerySearchCategory + ")"; } if (ECommon.QuerySearchPCategory != "") { strWhere += " and categoryid in (select id from t_productcategory where parentid=" + ECommon.QuerySearchPCategory + ")"; } strWhere = strWhere != "" ? " and ( " + strWhere.Substring(4, strWhere.Length - 4) + " )" : ""; if (ECommon.QuerySearchComposing != "" && ECommon.QuerySearchComposing == "recomm") { strWhere += " and attribute like '%102,%'"; } if (ECommon.QueryType != "") { string str = ""; foreach (string s in ECommon.QuerySearchType.Substring(1, ECommon.QuerySearchType.Length - 1).Split('_')) { str += " or attributexml like '%<typevalue>" + s + "</typevalue>%' "; } str = str != "" ? " and ( " + str.Substring(3, str.Length - 3) + " )" : ""; strWhere += str; } strWhere = strWhere == " companyid=" + ECommon.QueryCId ? "" : strWhere + " and companyid=" + ECommon.QueryCId; #endregion #region 排序 string orderType = ""; string orderKey = ""; switch (ECommon.QuerySearchSort.ToLower()) { case "_t1": orderType = "desc"; orderKey = "title"; sortTitle = "名称升序"; break; case "_t2": orderKey = "title"; orderType = "asc"; sortTitle = "名称排序"; break; case "_d1": orderKey = "lastedittime"; orderType = "desc"; sortDate = "由近到远"; break; case "_d2": orderKey = "lastedittime"; orderType = "asc"; sortDate = "由远到近"; break; case "_h1": orderKey = "hits"; orderType = "desc"; sortHot = "由高到低"; break; case "_h2": orderKey = "hits"; orderType = "asc"; sortHot = "由低到高"; break; } #endregion int pageCount = 0; list = ECProduct.GetWebProductList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, orderKey, orderType, out tmpPageCount); AspNetPager1.RecordCount = pageCount; AspNetPager1.EnableUrlRewriting = true; AspNetPager1.UrlRewritePattern = string.Format(EnUrls.CompanyInfoProductList, ECommon.QueryCId, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, "{0}", ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); pageTitle = "-产品"; } /// <summary> /// AspNetPager1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::Wuqi.Webdiyer.AspNetPager AspNetPager1; } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/company/product.aspx.cs
C#
oos
7,962
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.company { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class address :CompanyPageBase { public int BrandId = 0; public string BrandTitle = ""; public List<EnWebShop> list = new List<EnWebShop>(); public string shopMaps = ""; protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + companyInfo.title + "-展厅地址"; if (ECommon.QuerySearchBrand == "" && companyInfo.CompanyBrandList.Count > 0) { BrandId = TypeConverter.StrToInt(companyInfo.CompanyBrandList[0].id); BrandTitle = companyInfo.CompanyBrandList[0].title; } else { if (companyInfo.CompanyBrandList.Count == 0) { ScriptUtils.ShowAndRedirect("暂无品牌!", ECommon.WebUrl + "/company/" + companyInfo.id + "/index.aspx"); return; } //companyInfo.CompanyBrandList.Find(x=>x.id.ToString()==ECommon.QuerySearchBrand).descript BrandId = TypeConverter.StrToInt(companyInfo.CompanyBrandList.Find(x => x.id.ToString() == ECommon.QuerySearchBrand).id); BrandTitle = companyInfo.CompanyBrandList.Find(x => x.id.ToString() == ECommon.QuerySearchBrand).title; } int pageCount = 0; string sortKey=""; string orderType=""; string strWhere=" and brandxml like '<id>" + BrandId + "</id>'"; list = ECShop.GetWebShopList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, sortKey, orderType, out pageCount); AspNetPager1.RecordCount = pageCount; AspNetPager1.EnableUrlRewriting = true; AspNetPager1.UrlRewritePattern = string.Format(EnUrls.ShopListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchStaffsize, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, "{0}"); } /// <summary> /// AspNetPager1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::Wuqi.Webdiyer.AspNetPager AspNetPager1; } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/company/address.aspx.cs
C#
oos
2,736
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.company { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class news :CompanyPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + companyInfo.title + "-厂家新闻"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/company/news.aspx.cs
C#
oos
536
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.company { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class index :CompanyPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + companyInfo.title + "-厂家首页"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/company/index.aspx.cs
C#
oos
537
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.company { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class brand :CompanyPageBase { public int BrandId = 0; public string BrandDescript = ""; protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + companyInfo.title + "-厂家品牌"; if (ECommon.QuerySearchBrand == "" && companyInfo.CompanyBrandList.Count > 0) { BrandId = TypeConverter.StrToInt(companyInfo.CompanyBrandList[0].id); BrandDescript = companyInfo.CompanyBrandList[0].descript; } else { //companyInfo.CompanyBrandList.Find(x=>x.id.ToString()==ECommon.QuerySearchBrand).descript if (companyInfo.CompanyBrandList.Count == 0) { ScriptUtils.ShowAndRedirect("暂无品牌!", ECommon.WebUrl + "/company/" + companyInfo.id + "/index.aspx"); return; } BrandId = TypeConverter.StrToInt(companyInfo.CompanyBrandList.Find(x => x.id.ToString() == ECommon.QuerySearchBrand).id); BrandDescript = companyInfo.CompanyBrandList.Find(x => x.id.ToString() == ECommon.QuerySearchBrand).descript; } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/company/brand.aspx.cs
C#
oos
1,579
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.company { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class index2 :CompanyPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + companyInfo.title + "-厂家首页"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/company/index2.aspx.cs
C#
oos
538
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.company { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class credit :CompanyPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + companyInfo.title + "-认证证书"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/company/credit.aspx.cs
C#
oos
538
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class login :WebPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-会员登陆"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/login.aspx.cs
C#
oos
499
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class productinfo :WebPageBase { public EnWebProduct productInfo = new EnWebProduct(); public EnProductCon m1 = new EnProductCon(); public EnProductCon m2 = new EnProductCon(); public EnProductCon m3 = new EnProductCon(); public EnProductCon m4 = new EnProductCon(); public EnProductCon m5 = new EnProductCon(); protected void Page_Load(object sender, EventArgs e) { if (ECommon.QueryPId != "") { productInfo = ECProduct.GetWebProducInfo(" where id=" + ECommon.QueryPId); m1 = ECProduct.GetProductConInfo(" where contype =" + (int)EnumProductConType.风格特点 + " and productid=" + productInfo.id); m2 = ECProduct.GetProductConInfo(" where contype =" + (int)EnumProductConType.产品细节 + " and productid=" + productInfo.id); m3 = ECProduct.GetProductConInfo(" where contype =" + (int)EnumProductConType.材质工艺 + " and productid=" + productInfo.id); m4 = ECProduct.GetProductConInfo(" where contype =" + (int)EnumProductConType.保养说明 + " and productid=" + productInfo.id); m5 = ECProduct.GetProductConInfo(" where contype =" + (int)EnumProductConType.配送周期 + " and productid=" + productInfo.id); pageTitle = productInfo.brandtitle + " " + productInfo.stylename + " " + productInfo.categorytitle + " (" + productInfo.sku + ") " + " " + productInfo.materialname + "产品信息"; } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/productinfo.aspx.cs
C#
oos
1,917
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class reg :WebPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-会员注册"; if (!IsPostBack) { } if (WebRequest.GetFormString("hf") == "add") { if (WebRequest.GetFormString("txtValidation").ToLower() == "" || WebRequest.GetFormString("txtValidation").ToLower() != SessionHelper.Get("_session_reg").ToLower()) { ScriptUtils.ShowAndRedirect("验证码为空或错误", "reg.aspx"); Response.Redirect("reg.aspx"); } if (ECMember.ChkecUserName(WebRequest.GetFormString("txtRegName")) > 0) { ScriptUtils.ShowMessage(this.Page, "hasMember", "用户名己存在!"); return; } if (WebRequest.GetFormString("txtRegName") != "" && WebRequest.GetFormString("txtRegName") != "") { EnMember memberModel = new EnMember(); memberModel.id = 0; memberModel.username = WebRequest.GetFormString("txtRegName"); memberModel.password = MyMD5.GetMD5(WebRequest.GetFormString("txtRegPwd")); memberModel.paypassword = memberModel.password; memberModel.birthdate = TypeConverter.StrToDateTime("1900-01-01"); memberModel.type = (int)EnumMemberType.个人成员; memberModel.groupid = 0; memberModel.sound = ""; memberModel.tname = ""; memberModel.email = ""; memberModel.gender = 0; memberModel.mobile = ""; memberModel.phone = ""; memberModel.msn = ""; memberModel.qq = ""; memberModel.skype = ""; memberModel.ali = ""; memberModel.areacode = ""; memberModel.address = ""; memberModel.department = ""; memberModel.career = ""; memberModel.bank = ""; memberModel.account = ""; memberModel.alipay = ""; memberModel.authtime = TypeConverter.StrToDateTime("1900-01-01"); memberModel.auth = ""; memberModel.authvalue = ""; memberModel.vemail = 0; memberModel.vmobile = 0; memberModel.vname = 0; memberModel.vbank = 0; memberModel.vcompany = 0; memberModel.valipay = 0; memberModel.support = ""; memberModel.inviter = ""; memberModel.regtime = TypeConverter.StrToDateTime("1900-01-01"); memberModel.logintime = TypeConverter.StrToDateTime("1900-01-01"); memberModel.chat = 0; memberModel.message = 0; memberModel.logincount = 0; memberModel.regip = WebRequest.GetIP(); memberModel.regtime = DateTime.Now; memberModel.loginip = WebRequest.GetIP(); int mid = ECMember.EditMember(memberModel); if (mid > 0) { CookiesHelper.WriteCookie("mid", mid.ToString()); CookiesHelper.WriteCookie("mname", memberModel.username); CookiesHelper.WriteCookie("mpwd", memberModel.password); Response.Redirect("/suppler/supplerindex.aspx"); } } Response.Redirect("/index.aspx"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/reg.aspx.cs
C#
oos
4,327
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class promotioninfo : WebPageBase { public EnWebPromotion promotionInfo = new EnWebPromotion(); protected void Page_Load(object sender, EventArgs e) { if (ECommon.QueryPId != "") { promotionInfo = ECPromotion.GetWebPromotionList(1, 1, " and id=" + ECommon.QueryPId, "", "", out tmpPageCount)[0]; } pageTitle = "-活动列表"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/promotioninfo.aspx.cs
C#
oos
772
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.ascx { public partial class _head : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_head.ascx.cs
C#
oos
362
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.ascx { public partial class _nav : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_nav.ascx.cs
C#
oos
343
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.ascx { public partial class _headA : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_headA.ascx.cs
C#
oos
363
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.ascx { public partial class _marketnav : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_marketnav.ascx.cs
C#
oos
349
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.ascx { public partial class _shopnav : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_shopnav.ascx.cs
C#
oos
347
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.ascx { public partial class _companynav : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_companynav.ascx.cs
C#
oos
350
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.aspx.ascx { public partial class _shopproduct : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_shopproduct.ascx.cs
C#
oos
412
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.ascx { public partial class _resource : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_resource.ascx.cs
C#
oos
348
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.aspx.ascx { public partial class _companyproduct : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_companyproduct.ascx.cs
C#
oos
415
using System; using System.Collections.Generic; using System.Linq; using System.Data; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TRECommon; using TREC.Entity; namespace TREC.Web.aspx.ascx { public partial class _brandletter : System.Web.UI.UserControl { public DataTable dtBrandLetterIndex = new DataTable(); public string[] letterIndex = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}; protected void Page_Load(object sender, EventArgs e) { dtBrandLetterIndex = ECBrand.GetBrandLetterList(); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_brandletter.ascx.cs
C#
oos
725
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.ascx { public partial class _foot : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/ascx/_foot.ascx.cs
C#
oos
344
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.market { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class about : MarketPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + marketInfo.title + "-家具卖场-卖场介绍"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/market/about.aspx.cs
C#
oos
536
using System; using System.Collections.Generic; using System.Linq; using System.Data; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.market { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class product :MarketPageBase { /// <summary> /// 下一页连接 /// </summary> public string NextUrl { get { if (ECommon.QueryPageIndex == AspNetPager1.PageCount) { return "#"; } else { return string.Format(EnUrls.MarketInfoProductList, ECommon.QueryMid, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex + 1, ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); } } } //上一页连接 public string PrvUrl { get { if (ECommon.QueryPageIndex == 1) { return "#"; } else { return string.Format(EnUrls.MarketInfoProductList, ECommon.QueryMid, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex - 1, ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); } } } public string sortTitle = "按&nbsp;名&nbsp;称"; public string sortDate = "按&nbsp;时&nbsp;间"; public string sortHot = "推荐产品"; public List<EnWebProduct> list = new List<EnWebProduct>(); public DataTable dtBrandLetterIndex = new DataTable(); public string[] letterIndex = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; protected void Page_Load(object sender, EventArgs e) { dtBrandLetterIndex = ECBrand.GetMarketBrandLetterList(marketInfo.id); string strWhere = ""; #region 搜索条件 if (ECommon.QuerySearchBrand != "") { string t = ECommon.QuerySearchBrand.StartsWith("_") ? ECommon.QuerySearchBrand.Substring(1, ECommon.QuerySearchBrand.Length - 1) : ECommon.QuerySearchBrand; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and brandid in (" + t + ") "; } if (ECommon.QuerySearchStyle != "") { string t = ECommon.QuerySearchStyle.StartsWith("_") ? ECommon.QuerySearchStyle.Substring(1, ECommon.QuerySearchStyle.Length - 1) : ECommon.QuerySearchStyle; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and stylevalue in (" + t + ") "; } if (ECommon.QuerySearchMaterial != "") { string t = ECommon.QuerySearchMaterial.StartsWith("_") ? ECommon.QuerySearchMaterial.Substring(1, ECommon.QuerySearchMaterial.Length - 1) : ECommon.QuerySearchMaterial; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and materialvalue in (" + t + ") "; } if (ECommon.QuerySearchSpread != "") { string t = ECommon.QuerySearchSpread.StartsWith("_") ? ECommon.QuerySearchSpread.Substring(1, ECommon.QuerySearchSpread.Length - 1) : ECommon.QuerySearchSpread; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = "'" + t.Replace("_", "','") + "'"; strWhere += " and brandid in ( select id from " + TableName.TBBrand + " where spread in (" + t + ") and linestatus=1) "; } if (ECommon.QuerySearchCategory != "") { strWhere += " and categoryid in (" + ECommon.QuerySearchCategory + ")"; } strWhere = strWhere != "" ? " and ( " + strWhere.Substring(4, strWhere.Length - 4) + " )" : ""; if (ECommon.QuerySearchComposing != "" && ECommon.QuerySearchComposing == "recomm") { strWhere += " and attribute like '%102,%'"; } if (ECommon.QueryType != "") { string str = ""; foreach (string s in ECommon.QuerySearchType.Substring(1, ECommon.QuerySearchType.Length - 1).Split('_')) { str += " and attributexml like '%<typevalue>" + s + "</typevalue>%' "; } str = str != "" ? " and ( " + str.Substring(4, str.Length - 4) + " )" : ""; strWhere += str; } strWhere = strWhere == "" ? " and brandid in (select brandid from t_shopbrand where shopid in (select shopid from t_marketstoreyshop where marketid=" + marketInfo.id + ") ) " : strWhere + " and brandid in (select brandid from t_shopbrand where shopid in (select shopid from t_marketstoreyshop where marketid=" + marketInfo.id + ") ) "; #endregion #region 排序 string orderType = ""; string orderKey = ""; switch (ECommon.QuerySearchSort.ToLower()) { case "_t1": orderType = "desc"; orderKey = "title"; sortTitle = "名称升序"; break; case "_t2": orderKey = "title"; orderType = "asc"; sortTitle = "名称排序"; break; case "_d1": orderKey = "lastedittime"; orderType = "desc"; sortDate = "由近到远"; break; case "_d2": orderKey = "lastedittime"; orderType = "asc"; sortDate = "由远到近"; break; case "_h1": orderKey = "hits"; orderType = "desc"; sortHot = "由高到低"; break; case "_h2": orderKey = "hits"; orderType = "asc"; sortHot = "由低到高"; break; } #endregion int pageCount = 0; list = ECProduct.GetWebProductList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, orderKey, orderType, out tmpPageCount); AspNetPager1.RecordCount = pageCount; AspNetPager1.EnableUrlRewriting = true; AspNetPager1.UrlRewritePattern = string.Format(EnUrls.MarketInfoProductList, ECommon.QueryMid, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, "{0}", ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); pageTitle = "-产品"; } /// <summary> /// AspNetPager1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::Wuqi.Webdiyer.AspNetPager AspNetPager1; } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/market/product.aspx.cs
C#
oos
8,252
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.market { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class address : MarketPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + marketInfo.title + "-家具卖场-卖场地址"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/market/address.aspx.cs
C#
oos
538
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.market { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class news : MarketPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + marketInfo.title + "-家具卖场-卖场新闻"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/market/news.aspx.cs
C#
oos
535
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.market { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class index : MarketPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + marketInfo.title + "-家具卖场-首页"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/market/index.aspx.cs
C#
oos
530
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.market { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class brand : MarketPageBase { public string sortTitle = "按&nbsp;名&nbsp;称"; public string sortDate = "按&nbsp;时&nbsp;间"; public string sortHot = "推荐店铺"; /// <summary> /// 下一页连接 /// </summary> public string NextUrl { get { if (ECommon.QueryPageIndex == AspNetPager1.PageCount) { return "#"; } else { return string.Format(EnUrls.MarketInfoBrandList, ECommon.QueryMid, ECommon.QuerySearchMarketStorey, ECommon.QuerySearchSort, ECommon.QueryPageIndex + 1); } } } //上一页连接 public string PrvUrl { get { if (ECommon.QueryPageIndex == 1) { return "#"; } else { return string.Format(EnUrls.MarketInfoBrandList, ECommon.QueryMid, ECommon.QuerySearchMarketStorey, ECommon.QuerySearchSort, ECommon.QueryPageIndex - 1); } } } public List<EnWebMarketStoreyShop> list = new List<EnWebMarketStoreyShop>(); protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + marketInfo.title + "-家具卖场-卖场品牌"; string strWhere = " and (marketid=" + marketInfo.id + ") "; if (ECommon.QuerySearchMarketStorey != "") { strWhere += " and storeyid=" + ECommon.QuerySearchMarketStorey; } string orderKey = ""; string orderType = ""; int pageCount = 0; #region 排序 switch (ECommon.QuerySearchSort.ToLower()) { case "_t1": orderType = "desc"; orderKey = "shoptitle"; sortTitle = "名称升序"; break; case "_t2": orderKey = "shoptitle"; orderType = "asc"; sortTitle = "名称排序"; break; case "_d1": orderKey = "lastedittime"; orderType = "desc"; sortDate = "由近到远"; break; case "_d2": orderKey = "lastedittime"; orderType = "asc"; sortDate = "由远到近"; break; case "_h1": orderKey = "hits"; orderType = "desc"; sortHot = "由高到低"; break; case "_h2": orderKey = "hits"; orderType = "asc"; sortHot = "由低到高"; break; } #endregion list = ECMarketStoreyShop.GetWebMarketStoreyShopList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, orderKey, orderType, out pageCount); AspNetPager1.RecordCount = pageCount; AspNetPager1.EnableUrlRewriting = true; AspNetPager1.UrlRewritePattern = string.Format(EnUrls.MarketInfoBrandList, ECommon.QueryMid, ECommon.QuerySearchMarketStorey, ECommon.QuerySearchSort,"{0}"); } /// <summary> /// AspNetPager1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::Wuqi.Webdiyer.AspNetPager AspNetPager1; } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/market/brand.aspx.cs
C#
oos
4,241
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.market { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class index2 : MarketPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + marketInfo.title + "-家具卖场-首页"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/market/index2.aspx.cs
C#
oos
531
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx.market { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class promotion : MarketPageBase { protected void Page_Load(object sender, EventArgs e) { pageTitle = "-" + marketInfo.title + "-家具卖场-促销信息"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/market/promotion.aspx.cs
C#
oos
540
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class index :WebPageBase { public string[] letterIndex = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; List<EnWebAggregation> list = new List<EnWebAggregation>(); public List<EnWebAggregation> searchHotKey = new List<EnWebAggregation>(); //搜索价位 public List<EnWebAggregation> searchSpreadList = new List<EnWebAggregation>(); //搜索价位 public List<EnWebAggregation> searchStyleList = new List<EnWebAggregation>(); //搜索价位 public List<EnWebAggregation> searchMatialList = new List<EnWebAggregation>(); //搜索材质 public List<EnWebAggregation> searchBrand = new List<EnWebAggregation>(); //搜索品牌 public List<EnWebAggregation> searchMarket = new List<EnWebAggregation>(); //搜索卖场 public List<EnWebAggregation> searchMarketPic = new List<EnWebAggregation>(); //搜索场场图文 public List<EnWebAggregation> hotShopList = new List<EnWebAggregation>(); //关注经销商 public List<EnWebAggregation> shopList = new List<EnWebAggregation>(); //销销商 public List<EnWebAggregation> hotMarketList = new List<EnWebAggregation>(); //关注卖场 public List<EnWebAggregation> marketList = new List<EnWebAggregation>(); //卖场列表 public List<EnWebAggregation> hotCompany = new List<EnWebAggregation>(); //关注厂家 public List<EnWebAggregation> companyPicList = new List<EnWebAggregation>(); //优秀品牌厂家 public List<EnWebAggregation> style1 = new List<EnWebAggregation>(); //现代简约 public List<EnWebAggregation> style2 = new List<EnWebAggregation>(); //田园/地中海 public List<EnWebAggregation> style3 = new List<EnWebAggregation>(); //美式乡村 public List<EnWebAggregation> style4 = new List<EnWebAggregation>(); //新古典/后现代 public List<EnWebAggregation> style5 = new List<EnWebAggregation>(); //欧式 public List<EnWebAggregation> style6 = new List<EnWebAggregation>(); //中式现代/…… protected void Page_Load(object sender, EventArgs e) { list = ECAggregation.GetWebIndexAggregationListByParentIdList(); searchHotKey = list.Where(x => x.type == 26).ToList(); searchSpreadList = list.Where(x => x.type == 18).ToList(); searchStyleList= list.Where(x => x.type == 19).ToList(); searchMatialList= list.Where(x => x.type == 20).ToList(); searchBrand= list.Where(x => x.type == 21).ToList(); searchMarket= list.Where(x => x.type == 22).ToList(); searchMarketPic= list.Where(x => x.type == 23).ToList(); hotShopList= list.Where(x => x.type == 16).ToList(); shopList= list.Where(x => x.type == 15).ToList(); hotMarketList= list.Where(x => x.type == 11).ToList(); marketList= list.Where(x => x.type == 10).ToList(); hotCompany = list.Where(x => x.type == 8).ToList(); companyPicList = list.Where(x => x.type == 7).ToList(); style1 = list.Where(x => x.type == 2).ToList(); style2 = list.Where(x => x.type == 3).ToList(); style3 = list.Where(x => x.type == 4).ToList(); style4 = list.Where(x => x.type == 5).ToList(); style5 = list.Where(x => x.type == 24).ToList(); style6 = list.Where(x => x.type == 25).ToList(); pageTitle = "-首页"; } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/index.aspx.cs
C#
oos
3,943
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class productlist :WebPageBase { /// <summary> /// 下一页连接 /// </summary> public string NextUrl { get { if (ECommon.QueryPageIndex == AspNetPager1.PageCount) { return "#"; } else { return string.Format(EnUrls.ProductListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex + 1,ECommon.QuerySearchType,ECommon.QuerySearchPCategory,ECommon.QuerySearchCategory); } } } //上一页连接 public string PrvUrl { get { if (ECommon.QueryPageIndex == 1) { return "#"; } else { return string.Format(EnUrls.ProductListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex - 1, ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); } } } public string sortTitle = "按&nbsp;名&nbsp;称"; public string sortDate = "按&nbsp;时&nbsp;间"; public string sortHot = "推荐产品"; public List<EnWebProduct> list = new List<EnWebProduct>(); protected void Page_Load(object sender, EventArgs e) { string strWhere = ""; #region 搜索条件 if (ECommon.QuerySearchBrand != "") { string t = ECommon.QuerySearchBrand.StartsWith("_") ? ECommon.QuerySearchBrand.Substring(1, ECommon.QuerySearchBrand.Length - 1) : ECommon.QuerySearchBrand; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and brandid in (" + t + ") "; } if (ECommon.QuerySearchStyle != "") { string t = ECommon.QuerySearchStyle.StartsWith("_") ? ECommon.QuerySearchStyle.Substring(1, ECommon.QuerySearchStyle.Length - 1) : ECommon.QuerySearchStyle; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and stylevalue in (" + t + ") "; } if (ECommon.QuerySearchMaterial != "") { string t = ECommon.QuerySearchMaterial.StartsWith("_") ? ECommon.QuerySearchMaterial.Substring(1, ECommon.QuerySearchMaterial.Length - 1) : ECommon.QuerySearchMaterial; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = t.Replace("_", ","); strWhere += " and materialvalue in (" + t + ") "; } if (ECommon.QuerySearchSpread != "") { string t = ECommon.QuerySearchSpread.StartsWith("_") ? ECommon.QuerySearchSpread.Substring(1, ECommon.QuerySearchSpread.Length - 1) : ECommon.QuerySearchSpread; t = t.EndsWith("_") ? t.Substring(0, t.Length - 1) : t; t = "'" + t.Replace("_", "','") + "'"; strWhere += " and brandid in ( select id from " + TableName.TBBrand + " where spread in (" + t + ") and linestatus=1) "; } if (ECommon.QuerySearchCategory != "") { strWhere += " and categoryid in (" + ECommon.QuerySearchCategory + ")"; } if (ECommon.QuerySearchComposing != "" && ECommon.QuerySearchComposing == "recomm") { strWhere += " and attribute like '%102,%'"; } if (ECommon.QuerySearchKey != "") { strWhere += " and (title like '%" + ECommon.QuerySearchKey + "%' or sku like '%" + ECommon.QuerySearchKey + "%' or brandtitle like '%" + ECommon.QuerySearchKey + "%')"; } strWhere = strWhere != "" ? " and ( " + strWhere.Substring(4, strWhere.Length - 4) + " )" : ""; if (ECommon.QueryType != "") { string str = ""; foreach (string s in ECommon.QuerySearchType.Substring(1, ECommon.QuerySearchType.Length - 1).Split('_')) { str += " and attributexml like '%<typevalue>" + s + "</typevalue>%' "; } str = str != "" ? " and ( " + str.Substring(4, str.Length - 4) + " )" : ""; strWhere += str; } #endregion #region 排序 string orderType = "desc"; string orderKey = "sort"; switch (ECommon.QuerySearchSort.ToLower()) { case "_t1": orderType = "desc"; orderKey = "title"; sortTitle = "名称升序"; break; case "_t2": orderKey = "title"; orderType = "asc"; sortTitle = "名称排序"; break; case "_d1": orderKey = "lastedittime"; orderType = "desc"; sortDate = "由近到远"; break; case "_d2": orderKey = "lastedittime"; orderType = "asc"; sortDate = "由远到近"; break; case "_h1": orderKey = "hits"; orderType = "desc"; sortHot = "由高到低"; break; case "_h2": orderKey = "hits"; orderType = "asc"; sortHot = "由低到高"; break; } #endregion int pageCount = 0; list = ECProduct.GetWebProductList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, orderKey, orderType, out pageCount); AspNetPager1.RecordCount = pageCount; AspNetPager1.EnableUrlRewriting = true; AspNetPager1.UrlRewritePattern = string.Format(EnUrls.ProductListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, "{0}", ECommon.QuerySearchType, ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory); pageTitle = "-产品"; } /// <summary> /// AspNetPager1 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::Wuqi.Webdiyer.AspNetPager AspNetPager1; } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/productlist.aspx.cs
C#
oos
7,741
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.aspx { #region 类库引用 using TRECommon; using TREC.ECommerce; using TREC.Entity; #endregion public partial class search : WebPageBase { protected void Page_Load(object sender, EventArgs e) { string type = ""; string key = ""; if (Request.QueryString["type"] != null && Request.QueryString["type"].ToString() != "") { type = Request.QueryString["type"].ToString(); type = type.StartsWith("-") ? type.Substring(1, type.Length - 1) : type; } if (Request.QueryString["key"] != null && Request.QueryString["key"].ToString() != "") { key = Request.QueryString["key"].ToString(); key = key.StartsWith("-") ? key.Substring(1, key.Length - 1) : key; } switch (type) { case "brand": //品牌 Response.Redirect(WebUtils.ResolveUrl("~"+string.Format(EnUrls.CompanyBrandListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchStaffsize, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, key, ECommon.QueryPageIndex))); break; case "distributor": //经销商 Response.Redirect(WebUtils.ResolveUrl("~"+string.Format(EnUrls.ShopListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchStaffsize, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, key, ECommon.QueryPageIndex))); break; case "product": //产品 Response.Redirect(WebUtils.ResolveUrl("~"+string.Format(EnUrls.ProductListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchColor, ECommon.QuerySearchSort, ECommon.QuerySearchComposing,key, ECommon.QueryPageIndex, "", ECommon.QuerySearchPCategory, ECommon.QuerySearchCategory))); break; case "market": //卖场 Response.Redirect(WebUtils.ResolveUrl("~"+string.Format(EnUrls.MarketListSearch, ECommon.QuerySearchBrand, ECommon.QuerySearchStyle, ECommon.QuerySearchMaterial, ECommon.QuerySearchSpread, ECommon.QuerySearchStaffsize, ECommon.QuerySearchSort, ECommon.QuerySearchComposing, ECommon.QuerySearchKey, ECommon.QueryPageIndex, ECommon.QuerySearchArea))); break; case "information": //资讯 Response.Redirect(WebUtils.ResolveUrl("~" + string.Format(EnUrls.PromotionListsearch, ECommon.QueryCId, ECommon.QuerySId, ECommon.QueryPId, ECommon.QueryBId, ECommon.QueryMid, ECommon.QuerySearchArea, ECommon.QueryStime, ECommon.QueryEtime, ECommon.QuerySearchSort, ECommon.QuerySearchKey, ECommon.QueryPageIndex))); break; } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/aspx/search.aspx.cs
C#
oos
3,247