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 |
|---|---|---|---|---|---|
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.Admin.member
{
public partial class membergroupinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnMemberGroup model = ECMember.GetMemberGroupInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.txttitle.Text = model.title;
this.txtcolor.Text = model.color;
this.txtavatar.Text = model.avatar;
this.txtintegral.Text = model.integral.ToString();
this.txtmoney.Text = model.money.ToString();
this.txtpermissions.Text = model.permissions;
this.txtlev.Text = model.lev.ToString();
this.txtdescript.Text = model.descript;
this.txtsort.Text = model.sort.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
TREC.Entity.EnMemberGroup 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.id = TypeConverter.StrToInt(ECommon.QueryId);
}
if(model==null)
{
model = new EnMemberGroup();
}
string title = this.txttitle.Text;
string color = this.txtcolor.Text;
string avatar = this.txtavatar.Text;
decimal integral = TypeConverter.StrToDeimal(this.txtintegral.Text);
decimal money = TypeConverter.StrToDeimal(this.txtmoney.Text);
string permissions = this.txtpermissions.Text;
int lev = TypeConverter.StrToInt(this.txtlev.Text);
string descript = this.txtdescript.Text;
int sort = TypeConverter.StrToInt(this.txtsort.Text);
model.title = title;
model.color = color;
model.avatar = avatar;
model.integral = integral;
model.money = money;
model.permissions = permissions;
model.lev = lev;
model.descript = descript;
model.sort = sort;
int aid = ECMember.EditMemberGroup(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "membergrouplist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/member/membergroupinfo.aspx.cs | C# | oos | 3,288 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="memberlist.aspx.cs" Inherits="TREC.Web.Admin.member.memberlist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="memberinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80" align="center">会员类型:</td>
<td width="100">
<asp:DropDownList ID="ddlmembertype" runat="server"></asp:DropDownList>
</td>
<td width="80" align="left">会员别级:</td>
<td><asp:DropDownList ID="ddlmembergroup" runat="server"></asp:DropDownList></td>
<td width="50" align="right">关健字:</td>
<td width="150">
<asp:TextBox ID="txtUserName" runat="server" class="keyword"></asp:TextBox>
</td>
<td width="60" align="center">
<asp:Button ID="btnSearch" runat="server" Text="查询" CssClass="submit"
onclick="btnSearch_Click" />
</td>
</tr>
</table>
<div class="spClear"></div>
<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="160px">会员类型</th>
<th align="center" width="160px">会员级别</th>
<th align="left">登陆名</th>
<th align="center" width="160px">Email</th>
<th align="center" width="160px">最后活动时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><%#Enum.GetName(typeof(TREC.Entity.EnumMemberType),Eval("type")) %></td>
<td align="center"><%#Eval("groupid") %></td>
<td align="left"><a href="memberinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("username") %></a></td>
<td align="center"><%#Eval("email") %></td>
<td align="center"><%#Eval("lastedittime")%></td>
<td align="right" style="padding-left:5px;"><a href="memberinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="memberlist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/member/memberlist.aspx | ASP.NET | oos | 4,491 |
<%@ WebHandler Language="C#" CodeBehind="adminajax.ashx.cs" Class="TREC.Web.Admin.ajax.adminajax" %>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/ajax/adminajax.ashx | ASP.NET | oos | 105 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.IO;
using System.Data;
using TREC.ECommerce;
using TREC.Entity;
namespace TREC.Web.Admin.ajax
{
/// <summary>
/// adminajax 的摘要说明
/// </summary>
public class adminajax : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/plain";
string type = "";
string value = "";
string t = "";
if (context.Request.QueryString["type"] != null)
{
type = context.Request.QueryString["type"];
}
else
{
type = context.Request.Params["type"];
}
if (context.Request.QueryString["v"] != null)
{
value = context.Request.QueryString["v"];
}
else
{
value = context.Request.Params["v"];
}
if (context.Request.QueryString["t"] != null)
{
t = context.Request.QueryString["t"];
}
else
{
t = context.Request.Params["t"];
}
switch (type)
{
case "getmodulerootmenu":
context.Response.Write(GetModuleRootMenu(value));
break;
case "getconfigtypemarket":
context.Response.Write(GetConfigTypeMarket(value,t));
break;
default:
context.Response.Write("ajax数据读取错误");
break;
}
context.Response.End();
}
public string GetModuleRootMenu(string value)
{
StringBuilder sb = new StringBuilder();
sb.Append("{\"id\":\"0\",\"name\":\"一级菜单\"},");
foreach (EnMenu m in ECMenu.GetMenuList(" parent=0 and module=" + value))
{
sb.Append("{\"id\":\"" + m.id + "\",\"name\":\"" + m.title + "\"},");
}
if (sb.Length > 0)
{
return "[" + sb.ToString().Substring(0, sb.ToString().Length - 1) + "]";
}
return "";
}
//判断类型标识是否存在
public string GetConfigTypeMarket(string mark,string t)
{
if(t!="")
{
return "1";
}
if (ECConfig.ExitConfigTypeMark(mark) > 0)
{
return "0";
}
return "1";
}
public bool IsReusable
{
get
{
return false;
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/ajax/adminajax.ashx.cs | C# | oos | 2,936 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="companygrouplist.aspx.cs" Inherits="TREC.Web.Admin.company.companygrouplist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="companygroupinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 工厂管理 > 工厂组管理</b>
</div>
<div class="spClear"></div>
<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">名称</th>
<th width="60px" align="center">积分</th>
<th width="60px" align="center">金钱</th>
<th width="60px" align="center">级别</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="membergroupinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><%#Eval("integral")%></td>
<td align="center"><%#Eval("money")%></td>
<td align="center"><%#Eval("lev")%></td>
<td align="right" style="padding-left:5px;"><a href="membergroupinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="membergroupinfo.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/company/companygrouplist.aspx | ASP.NET | oos | 3,480 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="companygroupinfo.aspx.cs" Inherits="TREC.Web.Admin.company.companygroupinfo" %>
<%@ 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">
$(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>
<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>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="companygrouplist.aspx">返回列表</a></span><b>您当前的位置:首页 > 工厂管理 > 工厂组管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">工厂组信息</th>
</tr>
<tr>
<td width="120" align="right">
名称 :
</td>
<td align="left">
<asp:TextBox ID="txttitle" runat="server" CssClass="w160 input required"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
颜色 :
</td>
<td align="left">
<asp:TextBox ID="txtcolor" runat="server" CssClass="w160 input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
组图标 :
</td>
<td align="left">
<asp:TextBox ID="txtavatar" runat="server" CssClass="w160 input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
积分 :
</td>
<td align="left">
<asp:TextBox ID="txtintegral" runat="server" CssClass="w160 input required number">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
金钱 :
</td>
<td align="left">
<asp:TextBox ID="txtmoney" runat="server" CssClass="w160 input required number">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
广告数量 :
</td>
<td align="left">
<asp:TextBox ID="txtadcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
店铺数量 :
</td>
<td align="left">
<asp:TextBox ID="txtshopcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
品牌数量 :
</td>
<td align="left">
<asp:TextBox ID="txtbrandcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
促销数量 :
</td>
<td align="left">
<asp:TextBox ID="txtpromotioncount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
广告推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtadrecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
店铺推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtshoprecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
品牌推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtbrandrecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
促销推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtpromotionrecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
权限 :
</td>
<td align="left">
<asp:TextBox ID="txtpermissions" runat="server" CssClass="w160 input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
级别 :
</td>
<td align="left">
<asp:TextBox ID="txtlev" runat="server" CssClass="w160 input required digits">1</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
描述 :
</td>
<td align="left">
<asp:TextBox ID="txtdescript" runat="server" CssClass=" w380 textarea" TextMode="MultiLine" Rows="3"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td align="left">
<asp:TextBox ID="txtsort" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
</table>
<div style="margin-top:10px; margin-left:140px">
<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/Admin/company/companygroupinfo.aspx | ASP.NET | oos | 7,672 |
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.Admin.company
{
public partial class companyinfo : AdminPageBase
{
public string areaCode = "";
public EnMember _memberInfo = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddlmember.Items.Clear();
ddlmember.DataSource = ECMember.GetTop20MemberList();
ddlmember.DataTextField = "username";
ddlmember.DataValueField = "id";
ddlmember.DataBind();
ddlmember.Items.Insert(0, new ListItem("请选择", ""));
ddlmember.Items.Insert(1, new ListItem("无联联账号", "0"));
ddlcompanygroup.Items.Clear();
ddlcompanygroup.DataSource = ECCompany.GetCompanyGroupList("");
ddlcompanygroup.DataTextField = "title";
ddlcompanygroup.DataValueField = "id";
ddlcompanygroup.DataBind();
ddlcompanygroup.Items.Insert(0, new ListItem("请选择", ""));
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("请选择", ""));
ddllinestatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAuditStatus), ddllinestatus);
ddllinestatus.Items.Insert(0, new ListItem("请选择", ""));
chkattribute.Items.Clear();
WebControlBind.CheckBoxListBind(typeof(EnumAttribute), chkattribute);
WebControlBind.DrpBind(typeof(EnumTemplate), ddltemplate);
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnCompany model = ECCompany.GetCompanyInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
if (model != null && model.mid != 0)
{
_memberInfo = ECMember.GetMemberInfo(" where id=" + model.mid);
if (_memberInfo != null && _memberInfo.id != 0)
{
this.ddlmember.Items.Clear();
this.ddlmember.Items.Insert(0, new ListItem(_memberInfo.username, model.mid.ToString()));
this.ddlmember.Enabled = false;
}
}
txttitle.Text = model.title;
this.txtletter.Text = model.letter;
this.ddlcompanygroup.SelectedValue = model.groupid.ToString();
WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute);
this.txtvip.Text = model.vip.ToString();
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.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.txtdomain.Text = model.domain;
this.txtdomainip.Text = model.domainip;
this.txticp.Text = model.icp;
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.txtkeywords.Text = model.keywords;
this.ddltemplate.SelectedValue = model.template;
this.txthits.Text = model.hits.ToString();
this.txtsort.Text = model.sort.ToString();
this.txtlastedittime.Text = model.lastedittime.ToString();
this.ddlauditstatus.SelectedValue = model.auditstatus.ToString();
this.ddllinestatus.SelectedValue = model.linestatus.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnCompany model = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECCompany.GetCompanyInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
if (model == null)
{
model = new EnCompany();
}
}
if (model == null)
{
model = new EnCompany();
model.mapapi = "";
model.createmid = 0;
}
int mid = TypeConverter.StrToInt(ddlmember.SelectedValue);
string title = txttitle.Text;
string letter = this.txtletter.Text;
int groupid = TypeConverter.StrToInt(ddlcompanygroup.SelectedValue);
string attribute = WebControlBind.CheckBoxListSelected(chkattribute);
string industry = "";
string productcategory = "";
int vip = TypeConverter.StrToInt(this.txtvip.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 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 domain = this.txtdomain.Text;
string domainip = this.txtdomainip.Text;
string icp = this.txticp.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;
string keywords = this.txtkeywords.Text;
string template = ddltemplate.SelectedValue;
int hits = TypeConverter.StrToInt(this.txthits.Text);
int sort = TypeConverter.StrToInt(this.txtsort.Text);
DateTime lastedittime = DateTime.Now;
int auditstatus = TypeConverter.StrToInt(ddlauditstatus.SelectedValue);
int linestatus = TypeConverter.StrToInt(ddllinestatus.SelectedValue);
model.mid = mid;
model.title = title;
model.letter = letter;
model.groupid = groupid;
model.attribute = attribute;
model.industry = industry;
model.productcategory = productcategory;
model.vip = vip;
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.domain = domain;
model.domainip = domainip;
model.icp = icp;
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 = adminId;
model.lastedittime = lastedittime;
model.auditstatus = auditstatus;
model.linestatus = linestatus;
int aid = ECCompany.EditCompany(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.Company, aid, EnFilePath.Surface));
}
if (thumb.Length > 0)
{
ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Company, aid, EnFilePath.Thumb));
}
if (logo.Length > 0)
{
ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.Company, aid, EnFilePath.Logo));
}
if (bannel.Length > 0)
{
ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Company, aid, EnFilePath.Banner));
}
if (desimage.Length > 0)
{
ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.Company, 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) {
ECCompany.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Company, aid, EnFilePath.ConImage)), aid);
ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Company, aid, EnFilePath.ConImage));
}
}
UiCommon.JscriptPrint(this.Page, "编辑成功!", "companylist.aspx?page="+ECommon.QueryPageIndex, "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/company/companyinfo.aspx.cs | C# | oos | 14,118 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="companylist.aspx.cs" Inherits="TREC.Web.Admin.company.companylist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="companyinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<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">登陆名</th>
<th align="center" width="160px">Email</th>
<th align="center" width="160px">最后活动时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="companyinfo.aspx?edit=1&id=<%#Eval("id") %>&page=<%=ECommon.QueryPageIndex %>"><%#Eval("title") %></a></td>
<td align="center"><%#Eval("email") %></td>
<td align="center"><%#Eval("lastedittime")%></td>
<td align="right" style="padding-left:5px;"><a href="companyinfo.aspx?edit=1&id=<%#Eval("id") %>&page=<%=ECommon.QueryPageIndex %>">修改</a>|<a href="companylist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/company/companylist.aspx | ASP.NET | oos | 3,442 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="companyinfo.aspx.cs" Inherits="TREC.Web.Admin.company.companyinfo" 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" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/functioni.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="companylist.aspx">返回列表</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">登陆账号信息</th>
</tr>
<tr>
<td width="390px" valign="top">
<table class="formTable" width="380px">
<tr>
<th colspan="2">账号信息:</th>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "" && _memberInfo!=null)
{ %>
<tr>
<td align="right" width="70">通 行 证:</td>
<td><%=_memberInfo.passport %></td>
</tr>
<%}
else
{ %>
<tr>
<td align="right" width="70">会员查找:</td>
<td><asp:TextBox ID="txtSearch" runat="server" CssClass="w160 input"></asp:TextBox> <input type="button" class="submit" value="查找" id="btnSearch" /></td>
</tr>
<%} %>
<tr>
<td align="right">登陆账号:</td>
<td><asp:DropDownList ID="ddlmember" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380px">
<tr>
<th colspan="2">企业信息:</th>
</tr>
<tr>
<td width="70px" align="right">
推荐属性:
</td>
<td >
<asp:CheckBoxList runat="server" ID="chkattribute" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList>
</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">
企业组 :
</td>
<td>
<asp:DropDownList ID="ddlcompanygroup" runat="server" CssClass="select selectNone" Width="160px"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
名称索引:
</td>
<td>
<asp:TextBox ID="txtletter" runat="server" CssClass="input required w160"></asp:TextBox>
</td>
</tr>
<tr>
<td width="76px" align="right">
是否vip :
</td>
<td>
<asp:TextBox ID="txtvip" runat="server" Width="45" CssClass="input required">0</asp:TextBox><label>(1-10值越大级别越高,0为不是vip)</label>
</td>
</tr>
<tr>
<td align="right">
人员规格 :
</td>
<td>
<asp:DropDownList ID="ddlstaffsize" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
注册年份:
</td>
<td>
<asp:TextBox ID="txtregyear" runat="server" CssClass="input w160 required digits"></asp:TextBox>
</td>
</tr>
<tr>
<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="txtbuy" runat="server" CssClass="w250 textarea" TextMode="MultiLine" Rows="4"></asp:TextBox><label>长度不超过250字符,生产/销售/租凭业务描述</label>
</td>
</tr>
</table>
</td>
<td width="380px" valign="top">
<table class="formTable" width="380px">
<tr>
<th colspan="2">联系信息:</th>
</tr>
<tr>
<td align="right" width="70px" >地区:</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 w250 required"></asp:TextBox></td>
</tr>
<tr>
<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"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
电话 :
</td>
<td>
<asp:TextBox ID="txtphone" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
传真 :
</td>
<td>
<asp:TextBox ID="txtfax" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
邮箱 :
</td>
<td>
<asp:TextBox ID="txtemail" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
邮编 :
</td>
<td>
<asp:TextBox ID="txtpostcode" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
主页 :
</td>
<td>
<asp:TextBox ID="txthomepage" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">图片信息:</th>
</tr>
<tr>
<td align="right" valign="top">形 象 图:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Company, 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 type="file" class="upload" onchange="_upfile(this)" runat="server" /></a>
<span class="uploading">正在上传,请稍后……</span>
</div>
</div>
</td>
</tr>
<tr>
<td width="70px" align="right">企业标志:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Company, 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 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" 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 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 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.DesImage)%>">
<asp:HiddenField ID="hfdesimage" runat="server" />
<div class="fileTools">
<input type="text" class="input w160 filedisplay" />
<a href="javascript:;" class="files"><input type="file" class="upload" onchange="_upfile(this)" runat="server" /></a>
<span class="uploading">正在上传,请稍后……</span>
</div>
</div>
</td>
</tr>
</table>
</td>
<td valign="top">
<table class="formTable" width="380">
<tr>
<th colspan="2">优化及配置:</th>
</tr>
<tr>
<td width="70px" align="right">关 键 字:</td>
<td><asp:TextBox id="txtkeywords" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">配置域名:</td>
<td><asp:TextBox id="txtdomain" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">配置IP:</td>
<td><asp:TextBox id="txtdomainip" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">ICP备案:</td>
<td><asp:TextBox id="txticp" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">企业风格:</td>
<td><asp:DropDownList ID="ddltemplate" runat="server"></asp:DropDownList></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">企业描述:</th>
</tr>
<tr>
<td colspan="2"><asp:TextBox id="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">企业状态:</th>
</tr>
<tr>
<td width="90px" align="right">审核:</td>
<td><asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">上/下线:</td>
<td><asp:DropDownList ID="ddllinestatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td>
<asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
<tr>
<td align="right">
点击量 :
</td>
<td>
<asp:TextBox ID="txthits" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
最后修改 :
</td>
<td>
<asp:TextBox ID="txtlastedittime" runat="server" CssClass="input Wdate w160 required" onfocus="WdatePicker()"></asp:TextBox>
</td>
</tr>
<%} %>
</table>
</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/Admin/company/companyinfo.aspx | ASP.NET | oos | 22,743 |
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.Admin.company
{
public partial class companygroupinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnCompanyGroup model = ECCompany.GetCompanyGroupInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.txttitle.Text = model.title;
this.txtcolor.Text = model.color;
this.txtavatar.Text = model.avatar;
this.txtintegral.Text = model.integral.ToString();
this.txtmoney.Text = model.money.ToString();
this.txtadcount.Text = model.adcount.ToString();
this.txtshopcount.Text = model.shopcount.ToString();
this.txtbrandcount.Text = model.brandcount.ToString();
this.txtpromotioncount.Text = model.promotioncount.ToString();
this.txtadrecommend.Text = model.adrecommend.ToString();
this.txtshoprecommend.Text = model.shoprecommend.ToString();
this.txtbrandrecommend.Text = model.brandrecommend.ToString();
this.txtpromotionrecommend.Text = model.promotionrecommend.ToString();
this.txtpermissions.Text = model.permissions;
this.txtlev.Text = model.lev.ToString();
this.txtdescript.Text = model.descript;
this.txtsort.Text = model.sort.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnCompanyGroup model = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
string title = this.txttitle.Text;
string color = this.txtcolor.Text;
string avatar = this.txtavatar.Text;
decimal integral = TypeConverter.StrToDeimal(this.txtintegral.Text);
decimal money = TypeConverter.StrToDeimal(this.txtmoney.Text);
int adcount = TypeConverter.StrToInt(this.txtadcount.Text);
int shopcount = TypeConverter.StrToInt(this.txtshopcount.Text);
int brandcount = TypeConverter.StrToInt(this.txtbrandcount.Text);
int promotioncount = TypeConverter.StrToInt(this.txtpromotioncount.Text);
int adrecommend = TypeConverter.StrToInt(this.txtadrecommend.Text);
int shoprecommend = TypeConverter.StrToInt(this.txtshoprecommend.Text);
int brandrecommend = TypeConverter.StrToInt(this.txtbrandrecommend.Text);
int promotionrecommend = TypeConverter.StrToInt(this.txtpromotionrecommend.Text);
string permissions = this.txtpermissions.Text;
int lev = TypeConverter.StrToInt(this.txtlev.Text);
string descript = this.txtdescript.Text;
int sort = TypeConverter.StrToInt(this.txtsort.Text);
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECCompany.GetCompanyGroupInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
if (model == null)
{
model = new EnCompanyGroup();
}
}
else
{
model = new EnCompanyGroup();
}
model.title = title;
model.color = color;
model.avatar = avatar;
model.integral = integral;
model.money = money;
model.adcount = adcount;
model.shopcount = shopcount;
model.brandcount = brandcount;
model.promotioncount = promotioncount;
model.adrecommend = adrecommend;
model.shoprecommend = shoprecommend;
model.brandrecommend = brandrecommend;
model.promotionrecommend = promotionrecommend;
model.permissions = permissions;
model.lev = lev;
model.descript = descript;
model.sort = sort;
int aid = ECCompany.EditCompanyGroup(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "CompanyGrouplist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/company/companygroupinfo.aspx.cs | C# | oos | 4,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.Admin.company
{
public partial class companylist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECCompany.DeleteCompany(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECCompany.GetCompanyList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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)
{
ECCompany.DeleteCompanyByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "companylist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/company/companylist.aspx.cs | C# | oos | 1,727 |
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.Admin.company
{
public partial class companygrouplist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECCompany.DeletEnCompanyGroup(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECCompany.GetCompanyGroupList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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)
{
ECCompany.DeletEnCompanyGroupByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "membergrouplist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/company/companygrouplist.aspx.cs | C# | oos | 1,753 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TREC.ECommerce;
namespace TREC.Web.Admin
{
public partial class login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void loginsubmit_Click(object sender, ImageClickEventArgs e)
{
if (txtUserName.Text == "admin" && txtUserPwd.Text == "jjks")
{
TRECommon.CookiesHelper.WriteCookie("aadmin", TRECommon.MyMD5.GetMD5("admin"));
TRECommon.CookiesHelper.WriteCookie("apwd", TRECommon.MyMD5.GetMD5("jjks"));
Response.Redirect("index.aspx");
}
else
{
Response.Redirect("login.aspx");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/login.aspx.cs | C# | oos | 916 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TREC.Web.Admin
{
public partial class main : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/main.aspx.cs | C# | oos | 332 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="menu.aspx.cs" Inherits="TREC.Web.Admin.menu" %>
<%@ 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 href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js" language="javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function () {
$(".leftMenu").find("ul").hide();
$(".leftMenu").find("h3:eq(0)").next("ul").show() ;
$('.leftMenu > h3').live('click', function () {
if ($(this).next().css('display') == 'none') {
$(this).next().css('display', "block");
$(this).find("img").attr("src", "images/nav_menu_dow.gif");
} else {
$(this).next().css('display', "none");
$(this).find("img").attr("src", "images/nav_menu_up.gif");
}
});
});
</script>
<style type="text/css">
*{margin:0px; padding:0px;}
.menu_title2{background:url("images/title_bg_quit.gif"); height:25px; line-height:25px;}
.menu_title2 span{ display:block;}
.menu_title2 span a{margin-left:4px;}
.leftMenu h3{ background-image:url("images/menu_bg.gif"); height:29px; line-height:29px; cursor:pointer;}
.leftMenu h3 img{margin:0px 5px 0px 10px;}
.leftMenu ul{margin-bottom:15px;}
.leftMenu ul li{ background-image:url("images/left_menu_bg.gif"); height:24px; line-height:24px; padding-left:10px;}
.leftMenu ul li img{margin-right:10px;}
</style>
</head>
<body>
<form id="form1" runat="server">
<table cellspacing="0" cellpadding="0" width="158">
<tr>
<td class="menu_title2">
<span><a href="index.aspx"><b>系统首页</b></a>|<a href="loginout.aspx">注销登陆</a></span>
</td>
</tr>
</table>
<div class="leftMenu">
<%if (ECommon.QueryId == "")
{ %>
<h3><img src="images/nav_menu_dow.gif" />会员管理</h3>
<ul>
<li><img src="images/ico_01.gif" /><a href="member/memberinfo.aspx" target="frmmain">添加会员</a></li>
<li><img src="images/ico_01.gif" /><a href="member/memberlist.aspx" target="frmmain">管理会员</a></li>
<li><img src="images/ico_01.gif" /><a href="member/membergroupinfo.aspx" target="frmmain">添加会员组</a></li>
<li><img src="images/ico_01.gif" /><a href="member/membergrouplist.aspx" target="frmmain">管理会员组</a></li>
</ul>
<h3><img src="images/nav_menu_dow.gif" />工厂管理</h3>
<ul>
<li><img src="images/ico_01.gif" /><a href="company/companyinfo.aspx" target="frmmain">添加工厂</a></li>
<li><img src="images/ico_01.gif" /><a href="company/companylist.aspx" target="frmmain">管理工厂</a></li>
<li><img src="images/ico_01.gif" /><a href="company/companygroupinfo.aspx" target="frmmain">添加工厂级别</a></li>
<li><img src="images/ico_01.gif" /><a href="company/companygrouplist.aspx" target="frmmain">管理工厂级别</a></li>
</ul>
<h3><img src="images/nav_menu_dow.gif" />经 销 商</h3>
<ul>
<li><img src="images/ico_01.gif" /><a href="dealer/dealerinfo.aspx" target="frmmain">添加经销商</a></li>
<li><img src="images/ico_01.gif" /><a href="dealer/dealerlist.aspx" target="frmmain">管理经销商</a></li>
<li><img src="images/ico_01.gif" /><a href="dealer/dealergroupinfo.aspx" target="frmmain">添加经销商级别</a></li>
<li><img src="images/ico_01.gif" /><a href="dealer/dealergrouplist.aspx" target="frmmain">管理经销商级别</a></li>
</ul>
<h3><img src="images/nav_menu_dow.gif" />销售店铺</h3>
<ul>
<li><img src="images/ico_01.gif" /><a href="shop/shopinfo.aspx" target="frmmain">添加店铺</a></li>
<li><img src="images/ico_01.gif" /><a href="shop/shoplist.aspx" target="frmmain">管理店铺</a></li>
<li><img src="images/ico_01.gif" /><a href="shop/shopgroupinfo.aspx" target="frmmain">添加店铺级别</a></li>
<li><img src="images/ico_01.gif" /><a href="shop/shopgrouplist.aspx" target="frmmain">管理管理级别</a></li>
</ul>
<h3><img src="images/nav_menu_dow.gif" />卖场管理</h3>
<ul>
<li><img src="images/ico_01.gif" /><a href="market/marketinfo.aspx" target="frmmain">添加卖场</a></li>
<li><img src="images/ico_01.gif" /><a href="market/marketlist.aspx" target="frmmain">管理卖场</a></li>
<li><img src="images/ico_01.gif" /><a href="market/marketgroupinfo.aspx" target="frmmain">添加卖场级别</a></li>
<li><img src="images/ico_01.gif" /><a href="market/marketgrouplist.aspx" target="frmmain">管理卖场级别</a></li>
</ul>
<h3><img src="images/nav_menu_dow.gif" />系统管理</h3>
<ul>
<li><img src="images/ico_01.gif" /><a href="config/configlist.aspx" target="frmmain">配置管理</a></li>
<li><img src="images/ico_01.gif" /><a href="advertisement/advertisementcategorylist.aspx" target="frmmain">广告管理</a></li>
<li><img src="images/ico_01.gif" /><a href="administrator/administratorlist.aspx" target="frmmain">管理员管理</a></li>
</ul>
<%} %>
<%if (ECommon.QueryId != "")
{
int j = 0;%>
<%foreach (TREC.Entity.EnMenu m in ECMenu.GetMenuList("", " where module=" + ECommon.QueryId, ""))
{ %>
<%if (j != 0 && m.parent == 0)
{ %>
</ul>
<%} %>
<%if (m.lev == 1)
{ %>
<h3><img src="images/nav_menu_dow.gif" /><%=m.title%></h3>
<ul>
<%}
else if (m.lev == 2)
{ %>
<li><img src="images/ico_01.gif" /><a href="<%=ECommon.getMenuUrl(m.url) %>" target="frmmain"><%=m.title%></a></li>
<%} %>
<%j++;
} %>
<%} %>
</ul>
</div>
<%--
<table cellspacing="0" cellpadding="0" width="158">
<tr>
<td class="menu_title">
<span>权限管理</span>
</td>
</tr>
<tr>
<td class="submenu" style="display: block">
<div class="sec_menu" style="width: 156px">
<table cellpadding="0" cellspacing="0" width="135">
<tr>
<td style="width: 8px">
</td>
<td>
<a href="permission/rolelist.aspx" target="frmmain">角色管理</a> | <a href="permission/roleinfo.aspx" target="frmmain">增加</a>
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td>
<a href="permission/actionlist.aspx" target="frmmain">操作动作</a> | <a href="permission/actioninfo.aspx" target="frmmain">增加</a>
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td>
<a href="permission/modulelist.aspx" target="frmmain">模块管理</a> | <a href="permission/moduleinfo.aspx" target="frmmain">增加</a>
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td>
<a href="permission/setroleaction.aspx" target="frmmain">设置角色权限</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td class="menu_title">
<span>管理员管理</span>
</td>
</tr>
<tr>
<td class="submenu" style="display: block">
<div class="sec_menu" style="width: 156px">
<table cellpadding="0" cellspacing="0" width="135">
<tr>
<td style="width: 8px">
</td>
<td>
<a href="administrator/administratorlist.aspx" target="frmmain">管理员管理</a> | <a href="administrator/administratorinfo.aspx" target="frmmain">增加</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td class="menu_title">
<span>广告管理</span>
</td>
</tr>
<tr>
<td class="submenu" style="display: block">
<div class="sec_menu" style="width: 156px">
<table cellpadding="0" cellspacing="0" width="135">
<tr>
<td style="width: 8px">
</td>
<td>
<a href="advertisement/advertisementcategorylist.aspx" target="frmmain">广告位管理</a> | <a href="advertisement/advertisementcategoryinfo.aspx" target="frmmain">增加</a>
</td>
</tr>
<tr>
<td style="width: 8px">
</td>
<td>
<a href="advertisement/advertisementlist.aspx" target="frmmain">广告管理</a> | <a href="advertisement/advertisementinfo.aspx" target="frmmain">增加</a>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
--%>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/menu.aspx | ASP.NET | oos | 10,427 |
//==========================页面加载时JS函数开始===============================
$(document).ready(function () {
setWorkspace();
//分栏点击
$("#tableLeftMenuBar").click(function () {
if ($("#tableLeftMenu").css("display") == "block") {
$("#tableLeftMenu").hide();
$(this).find("span").html("4");
}
else {
$("#tableLeftMenu").show();
$(this).find("span").html("3");
}
})
//文本框焦点
$(".input,.login_input,.textarea,.input2").focus(function () {
if (!$(this).hasClass("tcal")) {
$(this).addClass("focus");
}
}).blur(function () {
$(this).removeClass("focus");
});
//输入框提示,获取拥有HintTitle,HintInfo属性的对象
$("[HintTitle],[HintInfo]").focus(function (event) {
$("*").stop(); //停止所有正在运行的动画
$("#HintMsg").remove(); //先清除,防止重复出错
var HintHtml = "<ul id=\"HintMsg\"><li class=\"HintTop\"></li><li class=\"HintInfo\"><b>" + $(this).attr("HintTitle") + "</b>" + $(this).attr("HintInfo") + "</li><li class=\"HintFooter\"></li></ul>"; //设置显示的内容
var offset = $(this).offset(); //取得事件对象的位置
$("body").append(HintHtml); //添加节点
$("#HintMsg").fadeTo(0, 0.85); //对象的透明度
var HintHeight = $("#HintMsg").height(); //取得容器高度
$("#HintMsg").css({ "top": offset.top - HintHeight + "px", "left": offset.left + "px" }).fadeIn(500);
}).blur(function (event) {
$("#HintMsg").remove(); //删除UL
});
//列表分组
$("div.navCur > span.t").click(function () {
$("div.navCur > span.t").removeClass("cur");
$(this).addClass("cur");
})
// //tabs
// $(".msgtable").find("a.cur").siblings().each(function (index) {
// var thisId = $(this).attr("href");
// $(thisId).css("display", "none");
// });
// $(".msgtable").find("a.t").click(function () {
// $($(this).attr("href")).css("display", "block");
// $(this).addClass("cur");
// $(this).siblings(".t").each(function (index) {
// var thisId = $(this).attr("href");
// $(thisId).css("display", "none");
// $(this).removeClass("cur");
// });
// //alert("123");
// })
//
$("#msgprint").live("click", function () {
$(this).hide();
})
//setWorkspace();
});
//==========================页面加载时JS函数结束===============================
/* 设置工作区 */
function setWorkspace(e) {
var wWidth = $(window).width();
var wHeight = $(window).height();
/*兼容性*/
if (navigator.appVersion.split("MSIE") && navigator.userAgent.indexOf('Opera') === -1 && parseFloat(navigator.appVersion.split("MSIE")[1]) < 7) wWidth = wWidth - 1; if (window.innerHeight) wHeight = window.innerHeight - 1;
//$('#workspace').width(wWidth - $('#left').width() - parseInt($('#left').css('margin-right')));
$('#sysMain').height(wHeight - 60); //alert(wWidth);
$("#tableConvertMain").width(wWidth - 170)
$("#frmmain").width($("#tableConvertMain").width());
$("#frmmain").height($("#tableConvertMain").height());
}
//===========================系统管理JS函数开始================================
//全选取消按钮函数,调用样式如:
function checkAll(chkobj) {
if ($(chkobj).text() == "全选") {
$(chkobj).text("取消");
$(".checkall input").attr("checked", true);
} else {
$(chkobj).text("全选");
$(".checkall input").attr("checked", false);
}
}
//遮罩提示窗口
function jsmsg(w, h, msgtitle, msgbox, url, msgcss) {
$("#msgdialog").remove();
var cssname = "";
switch (msgcss) {
case "Success":
cssname = "icon-01";
break;
case "Error":
cssname = "icon-02";
break;
default:
cssname = "icon-03";
break;
}
var str = "<div id='msgdialog' title='" + msgtitle + "'><p class='" + cssname + "'>" + msgbox + "</p></div>";
$("body").append(str);
$("#msgdialog").dialog({
//title: null,
//show: null,
bgiframe: true,
autoOpen: false,
width: w,
//height: h,
resizable: false,
closeOnEscape: true,
buttons: { "确定": function () { $(this).dialog("close"); } },
modal: true
});
$("#msgdialog").dialog("open");
if (url == "back") {
frmmain.history.back(-1);
} else if (url != "") {
frmmain.location.href = url;
}
}
function jsmsgCurPage(w, h, msgtitle, msgbox, url, msgcss) {
$("#msgdialog").remove();
var cssname = "";
switch (msgcss) {
case "Success":
cssname = "icon-01";
break;
case "Error":
cssname = "icon-02";
break;
default:
cssname = "icon-03";
break;
}
var str = "<div id='msgdialog' title='" + msgtitle + "'><p class='" + cssname + "'>" + msgbox + "</p></div>";
$("body").append(str);
$("#msgdialog").dialog({
//title: null,
//show: null,
bgiframe: true,
autoOpen: false,
width: w,
height: h,
resizable: false,
closeOnEscape: true,
buttons: { "确定": function () { $(this).dialog("close"); } },
modal: true
});
$("#msgdialog").dialog("open");
}
//可以自动关闭的提示
function jsprint(msgtitle, url, msgcss) {
$("#msgprint").remove();
var cssname = "";
switch (msgcss) {
case "Success":
cssname = "pcent correct";
break;
case "Error":
cssname = "pcent disable";
break;
default:
cssname = "pcent warning";
break;
}
var str = "<div id=\"msgprint\" class=\"" + cssname + "\">" + msgtitle + "</div>";
$("body").append(str);
$("#msgprint").show();
if (url == "back") {
frmmain.history.back(-1);
} else if (url != "") {
frmmain.location.href = url;
}
//3秒后清除提示
setTimeout(function () {
$("#msgprint").fadeOut(500);
//如果动画结束则删除节点
if (!$("#msgprint").is(":animated")) {
$("#msgprint").remove();
}
}, 3000);
}
//可以自动关闭的提示
function jsprintCurPage(msgtitle, url, msgcss) {
$("#msgprint").remove();
var cssname = "";
switch (msgcss) {
case "Success":
cssname = "pcent correct";
break;
case "Error":
cssname = "pcent disable";
break;
default:
cssname = "pcent warning";
break;
}
var str = "<div id=\"msgprint\" class=\"" + cssname + "\">" + msgtitle + "</div>";
$("body").append(str);
$("#msgprint").show();
var outT = 900;
var outT2 = 3000;
if (url == "thickbox") {
outT = 500;
outT2 = 1500;
}
//3秒后清除提示
setTimeout(function () {
$("#msgprint").fadeOut(outT);
//如果动画结束则删除节点
if (!$("#msgprint").is(":animated")) {
$("#msgprint").remove();
}
if (url == "back") {
this.history.back(-1);
} else if (url == "#") {
return;
} else if (url == "thickbox") {
TB_iframeContent.location.href = $("#TB_iframeContent").attr("src");
} else if (url != "") {
this.location.href = url;
}
}, outT2);
}
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/script/admin.js | JavaScript | oos | 8,004 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="advertisementcategorylist.aspx.cs" Inherits="TREC.Web.Admin.advertisement.advertisementcategorylist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="advertisementcategoryinfo.aspx">添加广告位</a></span><b>您当前的位置:首页 > 营销互动 > 广告位管理</b>
</div>
<div class="spClear"></div>
<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="120px">上级分类</th>
<th align="left">广告位名称</th>
<th align="center" width="80px">管理广告</th>
<th align="center" width="80px">调用代码</th>
<th align="center" width="80px">广告类型</th>
<th align="center" width="80px">所属模块</th>
<th align="center" width="120px">开始时间</th>
<th align="center" width="120px">结束时间</th>
<th align="center" width="120px">标识位置(预览)</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><%#Eval("parentid")%></td>
<td align="left"><%#Eval("parentid").ToString() == "0" ? "<strong>" : ""%><a href="advertisementcategoryinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("parentid").ToString() == "0" ? "" : "|----"%><%#Eval("title") %></a><%#Eval("parentid").ToString() == "0" ? "</strong>" : ""%></td>
<td align="center"><a href="advertisementinfo.aspx?cid=<%#Eval("id") %>">0 条广告</a></td>
<td align="center"><a href="javascript:GetCodeDialg(<%#Eval("id") %>);">点击查看</a></td>
<td align="center"><%#Eval("adtype")%></td>
<td align="center"><%#Eval("moduleid")%></td>
<td align="center"><%#Eval("starttime")%></td>
<td align="center"><%#Eval("endtime")%></td>
<td align="center"><%#Eval("img")%></td>
<td align="right" style="padding-left:5px;"><a href="advertisementcategoryinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="advertisementcategoryinfo.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
<div class="codeDialg" style="width:300px; height:30px; position:absolute; top:50%; left:50%; margin:-15px 0px 0px -150px; display:none;">
<textarea class="textarea" id="getcode" rows="2" style="width:450px"></textarea>
</div>
<script type="text/javascript">
function GetCodeDialg(i) {
$(".codeDialg").show();
$("#getcode").text("<script type=\"text/javascript\" src=\"http://192.168.1.141:16/ajaxtools/ajaxashow.ashx?id=" + i + "\"><\/script>");
}
</script>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/advertisement/advertisementcategorylist.aspx | ASP.NET | oos | 4,932 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="advertisementlist.aspx.cs" Inherits="TREC.Web.Admin.advertisement.advertisementlist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="advertisementinfo.aspx">添加广告</a></span><b>您当前的位置:首页 > 营销互动 > 广告管理</b>
</div>
<div class="spClear"></div>
<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="120px">广告位</th>
<th align="left">广告名称</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><%#Eval("categoryid")%></td>
<td align="left"><a href="advertisementinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="right" style="padding-left:5px;"><a href="advertisementinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="advertisementinfo.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/advertisement/advertisementlist.aspx | ASP.NET | oos | 3,308 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="advertisementcategoryinfo.aspx.cs" Inherits="TREC.Web.Admin.advertisement.advertisementcategoryinfo" %>
<%@ 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">
$(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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="advertisementcategorylist.aspx">返回列表</a></span><b>您当前的位置:首页 > 营销互动 > 广告位管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="2" align="left">广告位信息</th>
</tr>
<tr>
<td width="160px" align="right">
上级广告位
:</td>
<td align="left">
<asp:DropDownList ID="ddlParent" runat="server" CssClass="select w250"></asp:DropDownList>
</td></tr>
<tr>
<td width="160px" align="right">
所属模块
:</td>
<td align="left">
<asp:DropDownList ID="ddlModule" runat="server" CssClass="select selectNone w250"></asp:DropDownList>
</td></tr>
<tr>
<td width="160px" align="right">
广告位名称
:</td>
<td align="left">
<asp:TextBox id="txttitle" runat="server" CssClass="input required w250"></asp:TextBox>
</td></tr>
<tr>
<td width="160px" align="right">
位置展示
:</td>
<td align="left">
<asp:TextBox id="txtimg" runat="server" CssClass="input w250"></asp:TextBox>
</td></tr>
<tr>
<td width="160px" align="right">
广告位类型
:</td>
<td align="left">
<asp:DropDownList ID="ddlAdType" runat="server" CssClass="select selectNone w250"></asp:DropDownList>
</td></tr>
<tr>
<td width="160px" align="right">
开始时间
:</td>
<td align="left">
<asp:TextBox ID="txtstarttime" runat="server" CssClass="input w250" ></asp:TextBox><img onclick="WdatePicker({el:'txtstarttime'})" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/skin/datePicker.gif" width="16" height="22" style=" cursor:pointer" align="absmiddle">
</td></tr>
<tr>
<td width="160px" align="right">
结束时间
:</td>
<td align="left">
<asp:TextBox ID="txtendtime" runat="server" CssClass="input w250"></asp:TextBox><img onclick="WdatePicker({el:'txtendtime'})" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/skin/datePicker.gif" width="16" height="22" style=" cursor:pointer" align="absmiddle">
</td></tr>
<tr>
<td width="160px" align="right">
高
:</td>
<td align="left">
<asp:TextBox id="txtheight" runat="server" CssClass="input required number" Width="60"></asp:TextBox>(px)
</td></tr>
<tr>
<td width="160px" align="right">
宽
:</td>
<td align="left">
<asp:TextBox id="txtwidth" runat="server" CssClass="input required number" Width="60"></asp:TextBox>(px)
</td></tr>
<tr>
<td width="160px" align="right">
是否开启
:</td>
<td align="left">
<asp:RadioButtonList runat="server" ID="raOpen" RepeatDirection="Horizontal" RepeatLayout="Flow">
<asp:ListItem Text="是" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="否" Value="0"></asp:ListItem>
</asp:RadioButtonList>
</td></tr>
<tr>
<td width="160px" align="right">
广告位描述
:</td>
<td align="left">
<asp:TextBox id="txtdescript" runat="server" CssClass="textarea w380" TextMode="MultiLine" Rows="3"></asp:TextBox>
</td></tr>
<tr style="display:none">
<td width="160px" align="right">
模版
:</td>
<td align="left">
<asp:TextBox id="txttemplate" runat="server" CssClass="input"></asp:TextBox>
</td></tr>
<tr>
<td width="160px" align="right">
排序
:</td>
<td align="left">
<asp:TextBox id="txtsort" runat="server" CssClass="input required number" Width="45">0 </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/Admin/advertisement/advertisementcategoryinfo.aspx | ASP.NET | oos | 6,287 |
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.Admin.advertisement
{
public partial class advertisementinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddlCategory.Items.Clear();
List<EnAdvertisementCategory> list = ECAdvertisementCategory.GetAdvertisementCategoryList("");
foreach (EnAdvertisementCategory ac in list)
{
if (ac.parentid != 0)
{
ac.title = "|--" + ac.title;
}
}
ddlCategory.DataSource = list;
ddlCategory.DataTextField = "title";
ddlCategory.DataValueField = "id";
ddlCategory.DataBind();
ddlCategory.Items.Insert(0, new ListItem("请选择", "0"));
if (ECommon.QueryCId != "")
{
ddlCategory.SelectedValue = ECommon.QueryCId;
}
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnAdvertisement model = ECAdvertisement.GetAdvertisementInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.ddlCategory.SelectedValue = model.categoryid.ToString();
this.txttitle.Text = model.title;
this.txtlinkurl.Text = model.linkurl;
this.txtflashurl.Text = model.flashurl;
this.hfimgurl.Value = model.imgurl;
this.txtadtext.Text = model.adtext;
this.txtadcode.Text = model.adcode;
this.txtvideourl.Text = model.videourl;
this.raOpen.SelectedValue = model.isopen.ToString();
this.txtadlinkman.Text = model.adlinkman;
this.txtadlinkphone.Text = model.adlinkphone;
this.txtadlinkemail.Text = model.adlinkemail;
lbOther.Text = "最后修改时间:" + model.lastedittime.ToString() + " " + "最后修改人:" + model.lasteditaid.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnAdvertisement model = new EnAdvertisement();
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECAdvertisement.GetAdvertisementInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
}
else
{
model = new EnAdvertisement();
}
int categoryid = TypeConverter.StrToInt(ddlCategory.SelectedValue);
string title = this.txttitle.Text;
string linkurl = this.txtlinkurl.Text;
string flashurl = this.txtflashurl.Text;
string imgurl = this.hfimgurl.Value;
string adtext = this.txtadtext.Text;
string adcode = this.txtadcode.Text;
string videourl = this.txtvideourl.Text;
int isopen = TypeConverter.StrToInt(this.raOpen.SelectedValue);
string adlinkman = this.txtadlinkman.Text;
string adlinkphone = this.txtadlinkphone.Text;
string adlinkemail = this.txtadlinkemail.Text;
DateTime lastedittime = DateTime.Now;
int lasteditaid = 0;
model.categoryid = categoryid;
model.title = title;
model.videourl = videourl;
model.linkurl = linkurl;
model.flashurl = flashurl;
model.imgurl = imgurl;
model.adtext = adtext;
model.adcode = adcode;
model.isopen = isopen;
model.adlinkman = adlinkman;
model.adlinkphone = adlinkphone;
model.adlinkemail = adlinkemail;
model.lastedittime = lastedittime;
model.lasteditaid = lasteditaid;
int aid = ECAdvertisement.EditAdvertisement(model);
if (aid > 0)
{
ECUpLoad ecUpload = new ECUpLoad();
if (imgurl.Length > 0)
{
imgurl = imgurl.StartsWith(",") ? imgurl.Substring(1, imgurl.Length - 1) : imgurl;
imgurl = imgurl.EndsWith(",") ? imgurl.Substring(0, imgurl.Length - 1) : imgurl;
ecUpload.MoveFiles(imgurl.Split(','), string.Format(EnFilePath.Ad, aid, EnFilePath.Thumb));
}
Response.Redirect("advertisementlist.aspx");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/advertisement/advertisementinfo.aspx.cs | C# | oos | 5,351 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="advertisementinfo.aspx.cs" Inherits="TREC.Web.Admin.advertisement.advertisementinfo" %>
<%@ 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="<%=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");
}
});
});
</script>
<style type="text/css">
.adType{ display:none;}
</style>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="advertisementlist.aspx">返回列表</a></span><b>您当前的位置:首页 > 营销互动 > 广告管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="2" align="left">广告信息</th>
</tr>
<tr>
<td width="160px" align="right">
所属广告位
:</td>
<td align="left">
<asp:DropDownList ID="ddlCategory" runat="server" CssClass="select selectNone w250" onchange="SetAdType()"></asp:DropDownList>
</td></tr>
<tr>
<td width="160px" align="right">
广告名称
:</td>
<td align="left">
<asp:TextBox id="txttitle" runat="server" CssClass="input w250"></asp:TextBox>
</td></tr>
<tr>
<td width="160px" align="right">
连接地址
:</td>
<td align="left">
<asp:TextBox id="txtlinkurl" runat="server" CssClass="input w250"></asp:TextBox>
</td></tr>
<tr id="adFlash" class="adType">
<td width="160px" align="right" style="color:#f30">
Falsh地址
:</td>
<td align="left" >
<asp:TextBox id="txtflashurl" runat="server" CssClass="input" Width="380px"></asp:TextBox>
</td></tr>
<tr id="Tr1" class="adType">
<td width="160px" align="right" style="color:#f30">
视频地址:
:</td>
<td align="left" >
<asp:TextBox id="txtvideourl" runat="server" CssClass="input" Width="380px"></asp:TextBox>
</td></tr>
<tr id="adImage" class="adType">
<td width="160px" align="right" style="color:#f30">
图片地址(多个)
:</td>
<td align="left">
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Ad, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>">
<asp:HiddenField ID="hfimgurl" 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 id="adText" class="adType">
<td align="right" style="color:#f30">
文字广告
:</td>
<td align="left">
<asp:TextBox id="txtadtext" runat="server" CssClass="input" Width="380px"></asp:TextBox>
</td></tr>
<tr id="adCode" class="adType">
<td width="160px" align="right" style="color:#f30">
广告代码
:</td>
<td align="left">
<asp:TextBox id="txtadcode" runat="server" CssClass="textarea" TextMode="MultiLine" Rows="4" Width="380px"></asp:TextBox>
</td></tr>
<tr>
<td width="160px" align="right">
是否开启
:</td>
<td align="left">
<asp:RadioButtonList runat="server" ID="raOpen" RepeatDirection="Horizontal" RepeatLayout="Flow">
<asp:ListItem Text="是" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="否" Value="0"></asp:ListItem>
</asp:RadioButtonList>
</td></tr>
<tr>
<td width="160px" align="right">
联系人
:</td>
<td align="left">
<asp:TextBox id="txtadlinkman" runat="server" CssClass="input w250"></asp:TextBox>
</td></tr>
<tr>
<td width="160px" align="right">
联系电话
:</td>
<td align="left">
<asp:TextBox id="txtadlinkphone" runat="server" CssClass="input w250"></asp:TextBox>
</td></tr>
<tr>
<td width="160px" align="right">
Email
:</td>
<td align="left">
<asp:TextBox id="txtadlinkemail" runat="server" CssClass="input w250"></asp:TextBox>
</td></tr>
<%if (ECommon.QueryEdit != "")
{ %>
<tr>
<td width="160px" align="right">
其它信息
:</td>
<td align="left">
<asp:Label ID="lbOther" runat="server"></asp:Label>
</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>
<script type="text/javascript">
SetAdType();
function SetAdType() {
$(".adType").hide();
if ($("#ddlCategory").val() != "" && $("#ddlCategory").val() != "0") {
jQuery.ajax({
url: '<%=ECommon.WebUrl %>/ajax/ajaxuser.ashx',
data: 'type=getadcategoryadtype&v=' + $("#ddlCategory").val(),
success: function (data) {
if (data != "") {
if (data == "101") {
$("#adText").css("display", "table-row");
}
if (data == "102") {
$("#adImage").css("display", "table-row");
}
if (data == "103") {
$("#adFlash").css("display", "table-row");
}
if (data == "104") {
$("#adCode").css("display", "table-row");
}
}
else {
alert("数据错误!");
}
}
});
}
}
</script>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/advertisement/advertisementinfo.aspx | ASP.NET | oos | 7,555 |
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.Admin.advertisement
{
public partial class advertisementcategorylist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECAdvertisementCategory.DeletEnAdvertisementCategory(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECAdvertisementCategory.GetAdvertisementCategoryList(ECommon.QueryPageIndex, 1000, "", 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)
{
ECAdvertisementCategory.DeletEnAdvertisementCategoryByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "advertisementcategorylist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/advertisement/advertisementcategorylist.aspx.cs | C# | oos | 1,830 |
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.Admin.advertisement
{
public partial class advertisementlist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECAdvertisement.DeletEnAdvertisement(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECAdvertisement.GetAdvertisementList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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)
{
ECAdvertisement.DeletEnAdvertisementByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
Response.Redirect("Advertisementistratorlist.aspx");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/advertisement/advertisementlist.aspx.cs | C# | oos | 1,742 |
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.Admin.advertisement
{
public partial class advertisementcategoryinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddlParent.Items.Clear();
ddlParent.DataSource = ECAdvertisementCategory.GetAdvertisementCategoryList(" parentid=0");
ddlParent.DataTextField = "title";
ddlParent.DataValueField = "id";
ddlParent.DataBind();
ddlParent.Items.Insert(0, new ListItem("一级分类", "0"));
ddlModule.Items.Clear();
ddlModule.DataSource = ECModule.GetModuleList(" mark not like '%sys_%' ");
ddlModule.DataTextField = "title";
ddlModule.DataValueField = "id";
ddlModule.DataBind();
ddlModule.Items.Insert(0, new ListItem("所有模块", "0"));
ddlAdType.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAdvertisementinType), ddlAdType);
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnAdvertisementCategory model = ECAdvertisementCategory.GetAdvertisementCategoryInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
ddlParent.SelectedValue = model.parentid.ToString();
ddlModule.SelectedValue = model.moduleid.ToString();
this.txttitle.Text = model.title;
this.txtimg.Text = model.img;
this.txtheight.Text = model.height.ToString();
this.txtwidth.Text = model.width.ToString();
this.txtdescript.Text = model.descript;
this.txttemplate.Text = model.template;
this.txtsort.Text = model.sort.ToString();
this.txttitle.Text = model.title;
this.txtimg.Text = model.img;
this.txtheight.Text = model.height.ToString();
this.txtwidth.Text = model.width.ToString();
this.raOpen.SelectedValue = model.isopen.ToString();
this.ddlAdType.SelectedValue = model.adtype.ToString();
this.txtstarttime.Text = model.starttime.ToString();
this.txtendtime.Text = model.endtime.ToString();
this.txtdescript.Text = model.descript;
this.txttemplate.Text = model.template;
this.txtsort.Text = model.sort.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnAdvertisementCategory model = new EnAdvertisementCategory();
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECAdvertisementCategory.GetAdvertisementCategoryInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
}
else
{
model = new EnAdvertisementCategory();
}
int parentid = TypeConverter.StrToInt(ddlParent.SelectedValue);
int moduleid = TypeConverter.StrToInt(ddlModule.SelectedValue);
string modulevalue = "";
string title = this.txttitle.Text;
string img = this.txtimg.Text;
int height = TypeConverter.StrToInt(this.txtheight.Text);
int width = TypeConverter.StrToInt(this.txtwidth.Text);
int isopen = TypeConverter.StrToInt(raOpen.SelectedValue);
int adtype = TypeConverter.StrToInt(ddlAdType.SelectedValue);
string descript = this.txtdescript.Text;
string template = this.txttemplate.Text;
int sort = TypeConverter.StrToInt(this.txtsort.Text);
model.parentid = parentid;
model.moduleid = moduleid;
model.modulevalue = modulevalue;
model.title = title;
model.img = img;
model.height = height;
model.width = width;
model.isopen = isopen;
model.adtype = adtype;
if (this.txtstarttime.Text != "" && this.txtendtime.Text != "")
{
model.starttime = DateTime.Parse(this.txtstarttime.Text);
model.endtime = DateTime.Parse(this.txtendtime.Text);
}
else
{
model.starttime = DateTime.Parse("1900-1-1 00:00:00");
model.endtime = DateTime.Parse("1900-1-1 00:00:00");
}
model.descript = descript;
model.template = template;
model.sort = sort;
int aid = ECAdvertisementCategory.EditAdvertisementCategory(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "advertisementcategorylist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/advertisement/advertisementcategoryinfo.aspx.cs | C# | oos | 5,709 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="arealist.aspx.cs" Inherits="TREC.Web.Admin.area.arealist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="areainfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 系统管理 > 配置管理</b>
</div>
<div class="spClear"></div>
<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="60px">所属模块</th>
<th align="center" width="60px">配置类型</th>
<th align="left">配置名称</th>
<th align="center" width="120px">配置值</th>
<th align="center" width="60px">排序</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><%#Eval("module")%></td>
<td align="center"><%#Eval("type")%></td>
<td align="left"><a href="areainfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><%#Eval("value")%></td>
<td align="center"><asp:TextBox ID="txtSort" runat="server" Text='<%#Eval("sort") %>' Width="40" style="margin-left:10px;"></asp:TextBox></td>
<td align="right" style="padding-left:5px;"><a href="areainfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="arealist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
<asp:LinkButton ID="lbUpSort" runat="server" OnClick="lbUpSort_Click" >排 序</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/area/arealist.aspx | ASP.NET | oos | 3,773 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="areainfo.aspx.cs" Inherits="TREC.Web.Admin.area.areainfo" %>
<%@ 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">
$(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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="arealist.aspx">返回列表</a></span><b>您当前的位置:首页 > 系统管理 > 地区管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="2" align="left">地区信息</th>
</tr>
<tr>
<td height="25" width="30%" align="right">
地区代码 :
</td>
<td height="25" width="*" align="left">
<asp:TextBox ID="txtareacode" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td height="25" width="30%" align="right">
上级地区 :
</td>
<td height="25" width="*" align="left">
<asp:TextBox ID="txtparentcode" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td height="25" width="30%" align="right">
地区名称 :
</td>
<td height="25" width="*" align="left">
<asp:TextBox ID="txtareaname" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td height="25" width="30%" align="right">
地区邮编 :
</td>
<td height="25" width="*" align="left">
<asp:TextBox ID="txtareazipcode" runat="server" Width="200px"></asp:TextBox>
</td>
</tr>
<tr>
<td height="25" width="30%" align="right">
地区组 :
</td>
<td height="25" width="*" align="left">
<asp:TextBox ID="txtgrouparea" runat="server" Width="200px"></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/Admin/area/areainfo.aspx | ASP.NET | oos | 4,067 |
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.Admin.area
{
public partial class arealist :AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECArea.DeleteArea(ECommon.QueryId);
}
rptList.DataSource = ECArea.GetAreaList(" parentcode=0");
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)
{
ECArea.DeleteAreaByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "arealist.aspx", "Success");
}
}
protected void lbUpSort_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 txtSort = (TextBox)rptList.Items[i].FindControl("txtSort");
if (cb.Checked)
{
//ECArea.UpAreaSort(TypeConverter.StrToInt(id), txtSort.Text == "" ? "0" : txtSort.Text);
}
}
UiCommon.JscriptPrint(this.Page, "排序更新成功!", "arealist.aspx", "Success");
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/area/arealist.aspx.cs | C# | oos | 2,332 |
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.Admin.area
{
public partial class areainfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnArea model = ECArea.GetAreaInfo(" where areacode=" + ECommon.QueryId);
if (model != null)
{
this.txtareacode.Text = model.areacode;
this.txtparentcode.Text = model.parentcode;
this.txtareaname.Text = model.areaname;
this.txtareazipcode.Text = model.areazipcode;
this.txtgrouparea.Text = model.grouparea;
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
TREC.Entity.EnArea model = new TREC.Entity.EnArea();
string strErr = "";
if (this.txtareacode.Text.Trim().Length == 0)
{
strErr += "title不能为空!\\n";
}
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECArea.GetAreaInfo(" where areacode=" + ECommon.QueryId);
}
else
{
model = new EnArea();
}
string areacode = this.txtareacode.Text;
string parentcode = this.txtparentcode.Text;
string areaname = this.txtareaname.Text;
string areazipcode = this.txtareazipcode.Text;
string grouparea = this.txtgrouparea.Text;
model.areacode = areacode;
model.parentcode = parentcode;
model.areaname = areaname;
model.areazipcode = areazipcode;
model.grouparea = grouparea;
int aid = ECArea.EditArea(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "arealist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/area/areainfo.aspx.cs | C# | oos | 2,583 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="main.aspx.cs" Inherits="TREC.Web.Admin.main" %>
<%@ 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>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/main.aspx | ASP.NET | oos | 483 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="loginout.aspx.cs" Inherits="TREC.Web.Admin.loginout" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/loginout.aspx | ASP.NET | oos | 449 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productinfo.aspx.cs" Inherits="TREC.Web.Admin.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=<%="\""+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.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 %>/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>
<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;}
#productattributelist ul{margin-left:36px; }
#productattributelist ul li{background:#f3f3f3; display:block; float:left; height:30px; line-height:30px; border-bottom:dotted 1px #bbbbbb; margin-bottom:2px; width:100%;}
#productattributelist ul li span{display:block; float:left; padding:0px 5px; line-height:30px; height:30px; width:110px; overflow:hidden;}
</style>
<script type="text/javascript">
$(function () {
//分类下拉绑定产品类型
$("#ddlproductcategory").live("change",function(){
if($("#ddlproductcategory").val()!="")
{
$.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>");
});
}
});
}
});
//品牌下拉。获得系列及绑定品牌数据
$("#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);
}
});
})
//表单验证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 editor1,editor2,editor3,editor4,editor5;
KindEditor.ready(function (K) {
editor1 = K.create('#txt101', {
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=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,
allowFileManager: true,
<%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "")
{ %>
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,
allowFileManager: true,
<%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "")
{ %>
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,
allowFileManager: true,
<%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "")
{ %>
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,
allowFileManager: true,
<%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "")
{ %>
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").css("display","block");
$(this).text("关闭添加").css("color","#f60");
$("#ddltype").val("0");
$("#ddltype").val("");
},function(){
$("#txtatypename").css("display","none");
$(this).text("添加其它").css("color","#282828");
});
//属性添加按钮
$("#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>"+$("#ddltype").find("option:selected").text()+"<strong>[类型]</strong></span>";
}
else
{
productType="\"typeid\":\"0\",";
productTypeName="\"typename\":\""+$("#txtatypename").val()+"\",";
listHtml+="<span>"+$("#txtatypename").val()+"<strong>[类型]</strong></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+="<span>"+$("#txtamaterial").val()+"<strong>[材质]</strong></span>";
listHtml+="<div style=\"float:left; background:#ccc; width:140px; margin-right:20px; height:30px; line-height:30px;\">";
listHtml+="<img src=\"<%=ECommon.WebUploadTempUrl %>/"+$("#hfacolorimg").val().substring(0,$("#hfacolorimg").val().length-1)+"\" width='24' line-height:24px; height='24' style='display:block; float:left' />";
listHtml+="<span style='display:block; float:left; width:60px; color:"+$("#hfacolor").val()+"; margin-left:3px;'>"+$("#hfacolortitle").val()+"</span>";
listHtml+="<strong>[颜色]</strong></div>";
listHtml+="<span>"+$("#txtalength").val()+"<strong>[长]</strong></span>";
listHtml+="<span>"+$("#txtawidth").val()+"<strong>[宽]</strong></span>";
listHtml+="<span>"+$("#txtaheight").val()+"<strong>[高]</strong></span>";
listHtml+="<span>"+$("#txtacbm").val()+"<strong>[体积]</strong></span>";
listHtml+="<span>"+$("#txtmarketprice").val()+"<strong>[市场价]</strong></span>";
$("#productattributelist >ul").append("<li title='"+htmlJson+"'>"+listHtml+"<span style='width:20px; color:#f60; text-decoration:underline; cursor:pointer' class='del' onclick='delattribute(this)' >删</span><span style='width:20px; color:#f60; text-decoration:underline; cursor:pointer'></span></li>");
//alert($("#hfproductattribute").attr("value"));
});
});
//设置图片信息
function openImg(i)
{
art.dialog.open('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});
}
</script>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="productlist.aspx">返回列表</a></span><b>您当前的位置:首页 > 产品管理 > 产品管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">产品信息</th>
</tr>
<tr>
<td width="770px" valign="top">
<table class="formTable" width="770px">
<tr>
<th colspan="2">基本信息:</th>
</tr>
<tr>
<td align="right" width="70">产品名称:</td>
<td>
<asp:TextBox ID="txttitle" runat="server" CssClass="input"></asp:TextBox>
<label> 产品编号:</label>
<asp:TextBox ID="txtsku" runat="server" CssClass="input required"></asp:TextBox>
<label> 定制:</label>
<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">推荐属性:</td>
<td>
<asp:CheckBoxList ID="chkattribute" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList>
</td>
</tr>
<tr>
<td align="right">产品分类:</td>
<td>
<asp:DropDownList ID="ddlproductcategory" runat="server" CssClass="select selectNone"></asp:DropDownList>
</td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="770px">
<tr>
<th colspan="2">品牌信息:</th>
</tr>
<tr>
<td width="70" align="right">选择品牌:</td>
<td>
<asp:DropDownList ID="ddlbrand" runat="server" CssClass="select selectNone"></asp:DropDownList>
<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="ddlcolor" runat="server" CssClass="select selectNone"></asp:DropDownList>
</td>
</tr>
<tr>
<td width="70" align="right">系列:</td>
<td>
<asp:DropDownList ID="ddlbrands" runat="server" CssClass="select selectNone"></asp:DropDownList>
</td>
</tr>
</table>
</td>
<td valign="top">
<table class="formTable" width="380">
<tr>
<th colspan="2">图片信息:</th>
</tr>
<tr>
<td align="right" valign="top">形 象 图:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Product, 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>
<td width="70px" align="right">企业标志:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Product, 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">缩 略 图:</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">广告幻灯:</td>
<td>
<div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Product, 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>
<td align="right">企业展示:</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>
</table>
<div class="spClear"></div>
</td>
</tr>
<tr>
<td colspan="2">
<div class="spClear"></div>
<table class="formTable" width="1150px">
<tr>
<th>规格信息:<asp:HiddenField ID="hfproductattribute" runat="server" /></th>
</tr>
<tr>
<td align="right" style="position:relative; display:block; height:30px;" >
<label>类型:</label><asp:DropDownList ID="ddltype" runat="server" Width="100" CssClass="select"></asp:DropDownList></select>
<a href="javascript:;" id="selecttypename" style="display:block; float:left; width:48px; line-height:24px;">添加其它</a>
<input type="text" class="input" id="txtatypename" style="width:94px; display:none; border-color:#f60; position:absolute;left:39px; top:8px;" />
<label style=" margin-left:10px;"> 选材:</label><input type="text" class="input" id="txtamaterial" />
<label style=" margin-left:10px;"> 颜色:</label>
<div class="colorSee" style="float:left; background:#ccc; width:100px; height:24px; line-height:24px;"></div>
<a href="javascript:;" style="display:block; float:left; width:30px; line-height:24px; " onclick="openImg(this)">设置</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;" />
<label style=" margin-left:10px;"> 长:</label><input type="text" class="input" id="txtalength" value="0" style="width:45px; " />
<label> 宽:</label><input type="text" class="input" id="txtawidth" value="0" style="width:45px" />
<label> 高:</label><input type="text" class="input" id="txtaheight" value="0" style="width:45px" />
<label> 体积:</label><input type="text" class="input" id="txtacbm" value="0" style="width:45px" />
<label> 市场价:</label><input type="text" class="input" id="txtmarketprice" value="0" style="width:45px" />
<input type="button" class="submit" value="增加" id="btnAddAttribute" />
</td>
</tr>
<tr>
<td id="productattributelist">
<ul>
<%if (listproductattribute != null)
{ %>
<%foreach (EnProductAttribute pa in listproductattribute)
{ %>
<li>
<span><%=pa.typename%><strong>[类型]</strong></span>
<span><%=pa.productmaterial %><strong>[材质]</strong></span>
<div style="float:left; background:#ccc; width:140px; margin-right:20px; height:30px; line-height:30px;">
<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>
<strong>[颜色]</strong></div>
<span><%=pa.productlength %><strong>[长]</strong></span>
<span><%=pa.productwidth %><strong>[宽]</strong></span>
<span><%=pa.productheight %><strong>[高]</strong></span>
<span><%=pa.productcbm %><strong>[体积]</strong></span>
<span><%=pa.markprice %><strong>[市场价]</strong></span>
<span style='width:20px; color:#f60; text-decoration:underline; cursor:pointer' 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>
</table>
</td>
</tr>
<tr>
<td colspan="2">
<table class="formTable" >
<tr>
<th colspan="3">产品描述:</th>
</tr>
<tr>
<td width="382" align="left">风格特点:</td>
<td width="382" align="left">产品细节:</td>
<td align="left">材质工艺:</td>
</tr>
<tr>
<td><asp:TextBox id="txt101" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
<td><asp:TextBox id="txt102" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
<td><asp:TextBox id="txt103" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
</tr>
<tr>
<td align="left">保养说明:</td>
<td align="left">配送周期:</td>
<td></td>
</tr>
<tr>
<td><asp:TextBox id="txt104" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
<td><asp:TextBox id="txt105" runat="server" CssClass="textarea required kinkeditor" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
<td>
<table class="formTable" width="380">
<tr>
<th colspan="2">产品分类状态:</th>
</tr>
<tr>
<td align="right">审核状态:</td>
<td><asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">上/下线:</td>
<td><asp:DropDownList ID="ddllinestatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td>
<asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
<tr>
<td align="right">
点击量 :
</td>
<td>
<asp:TextBox ID="txthits" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
最后修改 :
</td>
<td>
<asp:TextBox ID="txtlastedittime" runat="server" CssClass="input Wdate w160 required" onfocus="WdatePicker()"></asp:TextBox>
</td>
</tr>
<%} %>
</table>
</td>
</tr>
</table>
</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/Admin/product/productinfo.aspx | ASP.NET | oos | 38,161 |
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.Admin.product
{
public partial class productattributeedit : System.Web.UI.Page
{
public EnProductAttribute model = new EnProductAttribute();
protected void Page_Load(object sender, EventArgs e)
{
model = ECProductAttribute.GetProductAttributeInfo(" where id=" + Request.QueryString["id"]);
hfcimg.Value=model.productcolorimg;
if(model.typevalue=="0")
{
}
else
{
ddltype.Items.Clear();
ddltype.DataSource = ECConfig.GetConfigList(" type=" + (int)EnumConfigByProduct.产品类型 + " and value in(" + ECPCategoryPTyp.GetProductCategoryTypeValueList(TypeConverter.StrToInt(Request.QueryString["c"])) + ")");
ddltype.DataTextField = "title";
ddltype.DataValueField = "value";
ddltype.DataBind();
ddltype.Items.Insert(0, new ListItem("请选择", ""));
ddltype.SelectedValue=model.typevalue;
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/productattributeedit.aspx.cs | C# | oos | 1,406 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productattribute.aspx.cs" Inherits="TREC.Web.Admin.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>
<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/Admin/product/productattribute.aspx | ASP.NET | oos | 2,439 |
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.Admin.product
{
public partial class productinfo : AdminPageBase
{
public List<EnProductCon> conlist = new List<EnProductCon>();
public List<EnProductAttribute> listproductattribute = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddlauditstatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAuditStatus), ddlauditstatus);
ddlauditstatus.Items.Insert(0, new ListItem("请选择", ""));
ddllinestatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumLineStatus), ddllinestatus);
ddllinestatus.Items.Insert(0, new ListItem("请选择", ""));
chkattribute.Items.Clear();
WebControlBind.CheckBoxListBind(typeof(EnumAttribute), chkattribute);
ddlproductcategory.Items.Clear();
ddlproductcategory.DataSource = ECProductCategory.GetProductCategoryListToDDL("");
ddlproductcategory.DataTextField = "title";
ddlproductcategory.DataValueField = "id";
ddlproductcategory.DataBind();
ddlbrand.DataSource = ECBrand.GetBrandList("");
ddlbrand.DataTextField = "title";
ddlbrand.DataValueField = "id";
ddlbrand.DataBind();
ddlbrand.Items.Insert(0, new ListItem("请选择品牌", ""));
ddlbrands.DataSource = ECBrand.GetBrandList("");
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)
{
WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute);
this.txttitle.Text = model.title;
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;
this.txtlastedittime.Text = model.lastedittime.ToString();
ddlauditstatus.SelectedValue = model.auditstatus.ToString();
ddllinestatus.SelectedValue = model.linestatus.ToString();
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 + "'");
}
}
}
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.createmid = 0;
model.no = "";
model.hits = 0;
model.sort = 0;
}
string attribute = WebControlBind.CheckBoxListSelected(chkattribute);
string title = this.txttitle.Text;
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;
int auditstatus = int.Parse(ddlauditstatus.SelectedValue);
int linestatus = int.Parse(ddllinestatus.SelectedValue);
model.attribute = attribute;
model.title = title;
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;
model.auditstatus = auditstatus;
model.linestatus = linestatus;
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 (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.Product, aid, EnFilePath.Surface));
}
if (thumb.Length > 0)
{
ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Product, aid, EnFilePath.Thumb));
}
if (bannel.Length > 0)
{
ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Product, aid, EnFilePath.Banner));
}
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));
}
}
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/Admin/product/productinfo.aspx.cs | C# | oos | 19,922 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TREC.Web.Admin.product
{
public partial class productattribute : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/productattribute.aspx.cs | C# | oos | 352 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productlist.aspx.cs" Inherits="TREC.Web.Admin.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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="productinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 产品管理 > 产品管理</b>
</div>
<div class="spClear"></div>
<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>
</span></td>
</tr>
</table>
<div class="spClear"></div>
<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="80">分类名称</th>
<th align="left" >产品名称</th>
<th align="center" width="80">品牌</th>
<th align="center" width="80">系列</th>
<th align="center" width="80">风格</th>
<th align="center" width="160">选材</th>
<th align="center" width="80">色系</th>
<th align="center" width="160px">最后活动时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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="left"><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("materialname")%></td>
<td align="center"><%#Eval("colorname")%></td>
<td align="center"><%#Eval("lastedittime")%></td>
<td align="right" style="padding-left:5px;"><a href="productinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="productlist.aspx?edit=2&id=<%#Eval("id") %>" onclick="confirm(是否确认删除该产品)">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/productlist.aspx | ASP.NET | oos | 4,587 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productattributeedit.aspx.cs" Inherits="TREC.Web.Admin.product.productattributeedit" %>
<%@ 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>
<script type="text/javascript">
$(function () {
$("#chosetype").toggle(function () {
$("#txttypename").css("display", "block");
$(this).text("关闭添加").css("color", "#f60");
$("#ddltype").val("0");
$("#ddltype").val("");
$("#ddltype").attr("disabled", "disabled");
}, function () {
$("#txttypename").css("display", "none");
$(this).text("添加其它").css("color", "#282828");
$("#ddltype").removeAttr("disabled");
});
$("#ddltype").live("change", function () {
$("#txttypename").val($("#ddltype").find("option:selected").text());
})
if ('<%=model.typevalue %>' == '0') {
$("#ddltype").attr("disabled", "disabled");
$("#txttypename").css("display", "block");
$(this).text("关闭添加").css("color", "#f60");
}
})
</script>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td width="70px" align="right">类型:</td>
<td><asp:DropDownList ID="ddltype" runat="server"></asp:DropDownList><input type="text" id="txttypename" class="input" style="display:none" value='<%=model.typename %>' /><label id="chosetype" style="cursor:pointer">添加其它</label>
</td>
</tr>
<tr>
<td width="70px" align="right">选材:</td>
<td><input type="text" class="input" id="txtm" value='<%=model.productmaterial %>' /></td>
</tr>
<tr>
<td width="70px" align="right">颜色名称:</td>
<td><input type="text" class="input" id="ctitle" value='<%=model.productcolortitle %>' /></td>
</tr>
<tr>
<td align="right">颜色色值:</td>
<td><input type="text" class="input" id="cvalue" value='<%=model.productcolorvalue %>' /></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="hfcimg" 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>
<td align="right">大小:</td>
<td><input type="text" class="input" id="txtlength" style="width:48px" value='<%=model.productlength %>' /><label>(长)</label>
<input type="text" class="input" id="txtwidth" style="width:48px" value='<%=model.productwidth %>' /><label>(宽)</label>
<input type="text" class="input" id="txtheight" style="width:48px" value='<%=model.productheight %>' /><label>(高)</label>
<input type="text" class="input" id="txtcbm" style="width:48px" value='<%=model.productcbm %>' /><label>(体积)</label>
</td>
</tr>
<tr>
<td align="right">市场价:</td>
<td><input type="text" class="input" id="txtmarkprice" style="width:80px" value='<%=model.markprice %>' /></td>
</tr>
</table>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/productattributeedit.aspx | ASP.NET | oos | 4,964 |
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.Admin.product
{
public partial class productlist : AdminPageBase
{
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 = ECBrand.GetBrandList("");
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="";
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, "批量删除成功!", "productlist.aspx", "Success");
}
}
protected void lkBtnSearch_Click(object sender, EventArgs e)
{
ShowData();
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/productlist.aspx.cs | C# | oos | 3,325 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productcategoryinfo.aspx.cs" Inherits="TREC.Web.Admin.product.productcategoryinfo" 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" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/listbox/jquery.dualListBox-1.3.min.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=productcategory&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']
});
});
$.configureBoxes();
});
</script>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="productcategorylist.aspx">返回列表</a></span><b>您当前的位置:首页 > 产品管理 > 产品分类</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">产品分类</th>
</tr>
<tr>
<td width="770px" valign="top">
<table class="formTable" width="770px">
<tr>
<th colspan="2">分类信息:</th>
</tr>
<tr>
<td align="right" width="80">分类名称:</td>
<td><asp:TextBox ID="txttitle" runat="server" CssClass="input required"></asp:TextBox></td>
</tr>
<tr>
<td align="right">
字母索引 :
</td>
<td align="left">
<asp:TextBox ID="txtletter" runat="server" CssClass="input required"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
重写路径 :
</td>
<td align="left">
<asp:TextBox ID="txtrewritetitle" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
上级分类 :
</td>
<td align="left">
<asp:DropDownList ID="ddlparent" runat="server" CssClass="select required"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
关键字 :
</td>
<td align="left">
<asp:TextBox ID="txtkeywords" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
模版路径:
</td>
<td align="left">
<asp:TextBox ID="txttemplate" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="770px">
<tr>
<th colspan="2">类型绑定:</th>
</tr>
<tr>
<td colspan="2" class="typelist">
<table>
<tr>
<td><asp:ListBox ID="box1View" SelectionMode="Multiple" runat="server" Width="220" Height="280" ></asp:ListBox></td>
<td>
<button id="to2" type="button"> > </button>
<button id="allTo2" type="button"> >> </button>
<button id="allTo1" type="button"> << </button>
<button id="to1" type="button"> < </button>
</td>
<td>
<asp:ListBox ID="box2View" SelectionMode="Multiple" runat="server" Width="220" Height="280" ></asp:ListBox>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td valign="top">
<table class="formTable" width="380">
<tr>
<th colspan="2">图片信息:</th>
</tr>
<tr>
<td align="right" valign="top">形 象 图:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.ProductCategory, 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>
<td align="right">缩 略 图:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.ProductCategory, 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.ProductCategory, 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>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">产品分类介绍:</th>
</tr>
<tr>
<td colspan="2"><asp:TextBox id="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">产品分类状态:</th>
</tr>
<tr>
<td align="right">上/下线:</td>
<td><asp:DropDownList ID="ddllinestatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td>
<asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
<tr>
<td align="right">
点击量 :
</td>
<td>
<asp:TextBox ID="txthits" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
最后修改 :
</td>
<td>
<asp:TextBox ID="txtlastedittime" runat="server" CssClass="input Wdate w160 required" onfocus="WdatePicker()"></asp:TextBox>
</td>
</tr>
<%} %>
</table>
</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/Admin/product/productcategoryinfo.aspx | ASP.NET | oos | 13,572 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="productcategorylist.aspx.cs" Inherits="TREC.Web.Admin.product.productcategorylist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="productcategoryinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 产品管理 > 产品分类</b>
</div>
<div class="spClear"></div>
<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">分类名称</th>
<th align="center" width="160px">最后活动时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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">
<a href="productcategoryinfo.aspx?edit=1&id=<%#Eval("id") %>">
<%#TRECommon.HTMLUtils.GetSpacesString(TRECommon.TypeConverter.StrToInt(Eval("lev").ToString())*2) %>
<img align="absmiddle" src="../images/folder_open.gif"><img align="absmiddle" src="../images/t.gif">
<%#Eval("title") %>
</a>
</td>
<td align="center"><%#Eval("lastedittime")%></td>
<td align="right" style="padding-left:5px;"><a href="productcategoryinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="productcategorylist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/productcategorylist.aspx | ASP.NET | oos | 3,618 |
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.Admin.product
{
public partial class productcategoryinfo : AdminPageBase
{
public string areaCode = "";
public EnCompany _companyInfo = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddllinestatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAuditStatus), ddllinestatus);
ddllinestatus.Items.Insert(0, new ListItem("请选择", ""));
ddlparent.DataSource = ECProductCategory.GetProductCategoryListToDDL("");
ddlparent.DataTextField="title";
ddlparent.DataValueField = "id";
ddlparent.DataBind();
ddlparent.DataBind();
ddlparent.Items.Insert(0, new ListItem("根级", "0"));
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnProductCategory model = ECProductCategory.GetProductCategoryInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.txttitle.Text = model.title;
this.txtletter.Text = model.letter;
this.txtrewritetitle.Text = model.rewritetitle;
this.ddlparent.SelectedValue = model.parentid.ToString();
this.hfsurface.Value = model.surface;
this.hfthumb.Value = model.thumb;
this.hfbannel.Value = model.bannel;
this.txtdescript.Text = model.descript;
this.txtkeywords.Text = model.keywords;
this.txttemplate.Text = model.template;
this.txthits.Text = model.hits.ToString();
this.txtsort.Text = model.sort.ToString();
this.txtlastedittime.Text = model.lastedittime.ToString();
this.ddllinestatus.SelectedValue = model.linestatus.ToString();
string producttypelist = ECPCategoryPTyp.GetProductCategoryTypeValueList(model.id);
if (producttypelist.Length > 0)
{
ECommon.ListBoxBindToProductType(box1View, " and value not in(" + producttypelist + ")");
ECommon.ListBoxBindToProductType(box2View, " and value in(" + producttypelist + ")");
}
ddlparent.Enabled = false;
}
}
else
{
ECommon.ListBoxBindToProductType(box1View, "");
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnProductCategory model = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
int? lft = 0;
int? rgt = 0;
int? lev = 1;
string depth = "";
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECProductCategory.GetProductCategoryInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
lft = model.lft;
rgt = model.rgt;
lev = model.lev;
depth = model.depth;
}
if (model == null)
{
model = new EnProductCategory();
model.createmid = 0;
}
string title = this.txttitle.Text;
string letter = this.txtletter.Text;
string rewritetitle = this.txtrewritetitle.Text;
int parentid = int.Parse(this.ddlparent.SelectedValue);
string surface = this.hfsurface.Value;
string thumb = this.hfthumb.Value;
string bannel = this.hfbannel.Value;
string descript = this.txtdescript.Text;
string keywords = this.txtkeywords.Text;
string template = this.txttemplate.Text;
int hits = int.Parse(this.txthits.Text);
int sort = int.Parse(this.txtsort.Text);
int lastedid = adminId;
DateTime lastedittime = DateTime.Now;
int linestatus = TypeConverter.StrToInt(ddllinestatus.SelectedValue);
model.title = title;
model.letter = letter;
model.rewritetitle = rewritetitle;
model.parentid = parentid;
model.lft = lft;
model.rgt = rgt;
model.lev = lev;
model.depth = depth;
model.surface = surface;
model.thumb = thumb;
model.bannel = bannel;
model.descript = descript;
model.keywords = keywords;
model.template = template;
model.hits = hits;
model.sort = sort;
model.lastedid = lastedid;
model.lastedittime = lastedittime;
model.linestatus = linestatus;
int aid = ECProductCategory.EditProductCategory(model);
if (aid > 0)
{
string typelist = Request.Params["box2View"];
if (typelist != null && typelist.Length > 0)
{
List<EnPCategoryPTyp> list = new List<EnPCategoryPTyp>();
foreach (string s in typelist.Split(','))
{
if (!string.IsNullOrEmpty(s))
{
EnPCategoryPTyp m = new EnPCategoryPTyp();
m.productcategoryid = aid;
m.producttypeid = TypeConverter.StrToInt(s);
list.Add(m);
}
}
ECPCategoryPTyp.EditPCategoryPTyp(list);
}
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.ProductCategory, aid, EnFilePath.Surface));
}
if (thumb.Length > 0)
{
ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.ProductCategory, aid, EnFilePath.Thumb));
}
if (bannel.Length > 0)
{
ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.ProductCategory, 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) {
ECProductCategory.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.ProductCategory, aid, EnFilePath.ConImage)), aid);
ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.ProductCategory, aid, EnFilePath.ConImage));
}
}
UiCommon.JscriptPrint(this.Page, "编辑成功!", "productcategorylist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/productcategoryinfo.aspx.cs | C# | oos | 8,474 |
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.Admin.product
{
public partial class productcategorylist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECProductCategory.DeleteProductCategory(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECProductCategory.GetProductCategoryList("", "");
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)
{
ECProductCategory.DeleteProductCategoryByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "productcategorylist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/productcategorylist.aspx.cs | C# | oos | 1,730 |
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.Admin.product
{
public partial class producttype : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECConfig.DeleteConfig(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECConfig.GetConfigList(ECommon.QueryPageIndex, AspNetPager1.PageSize, " type="+(int)EnumConfigByProduct.产品类型, 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)
{
ECConfig.DeleteConfigByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "configlist.aspx", "Success");
}
}
protected void lbUpSort_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 txtSort = (TextBox)rptList.Items[i].FindControl("txtSort");
if (cb.Checked)
{
ECConfig.UpConfigSort(txtSort.Text == "" ? "0" : txtSort.Text,TypeConverter.StrToInt(id));
}
}
UiCommon.JscriptPrint(this.Page, "排序更新成功!", "producttype.aspx", "Success");
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/producttype.aspx.cs | C# | oos | 2,511 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="producttype.aspx.cs" Inherits="TREC.Web.Admin.product.producttype" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="../config/configinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 产品管理 > 产品类型</b>
</div>
<div class="spClear"></div>
<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="60px">所属模块</th>
<th align="center" width="60px">配置类型</th>
<th align="center" width="120px">配置值</th>
<th align="left">配置名称</th>
<th align="center" width="60px">排序</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><%# Enum.GetName(typeof(TREC.Entity.EnumConfigModule),Eval("module"))%></td>
<td align="center"><%# ECConfig.GetTypeName(Eval("module").ToString(), Eval("type").ToString())%></td>
<td align="center"><%#Eval("value")%></td>
<td align="left"><a href="configinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><asp:TextBox ID="txtSort" runat="server" Text='<%#Eval("sort") %>' Width="40" style="margin-left:10px;"></asp:TextBox></td>
<td align="right" style="padding-left:5px;"><a href="configinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="configlist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
<asp:LinkButton ID="lbUpSort" runat="server" OnClick="lbUpSort_Click" >排 序</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/product/producttype.aspx | ASP.NET | oos | 3,913 |
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.Admin.market
{
public partial class marketgrouplist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECMarket.DeletEnMarketGroup(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECMarket.GetMarketGroupList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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)
{
ECMarket.DeletEnMarketGroupByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "marketgrouplist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/market/marketgrouplist.aspx.cs | C# | oos | 1,745 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="marketinfo.aspx.cs" Inherits="TREC.Web.Admin.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.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', '|', '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>
<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>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="marketlist.aspx">返回列表</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">登陆账号信息</th>
</tr>
<tr>
<td width="390px" valign="top">
<table class="formTable" width="380px">
<tr>
<th colspan="2">账号信息:</th>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "" && _memberInfo!=null)
{ %>
<tr>
<td align="right" width="70">通 行 证:</td>
<td><%=_memberInfo.passport %></td>
</tr>
<%}
else
{ %>
<tr>
<td align="right" width="70">会员查找:</td>
<td><asp:TextBox ID="txtSearch" runat="server" CssClass="w160 input"></asp:TextBox> <input type="button" class="submit" value="查找" id="btnSearch" /></td>
</tr>
<%} %>
<tr>
<td align="right">登陆账号:</td>
<td><asp:DropDownList ID="ddlmember" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380px">
<tr>
<th colspan="2">企业信息:</th>
</tr>
<tr>
<td width="70px" align="right">
推荐属性:
</td>
<td >
<asp:CheckBoxList runat="server" ID="chkattribute" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList>
</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">
企业组 :
</td>
<td>
<asp:DropDownList ID="ddlmarketgroup" runat="server" CssClass="select selectNone" Width="160px"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
名称索引:
</td>
<td>
<asp:TextBox ID="txtletter" runat="server" CssClass="input required w160"></asp:TextBox>
</td>
</tr>
<tr>
<td width="76px" align="right">
是否vip :
</td>
<td>
<asp:TextBox ID="txtvip" runat="server" Width="45" CssClass="input required">0</asp:TextBox><label>(1-10值越大级别越高,0为不是vip)</label>
</td>
</tr>
<tr>
<td align="right">
人员规格 :
</td>
<td>
<asp:DropDownList ID="ddlstaffsize" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
注册年份:
</td>
<td>
<asp:TextBox ID="txtregyear" runat="server" CssClass="input w160 required digits"></asp:TextBox>
</td>
</tr>
<tr>
<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 w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
招商电话:
</td>
<td>
<asp:TextBox ID="txtzphone" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
乘车路线:
</td>
<td>
<asp:TextBox ID="txtbusroute" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
营业时间:
</td>
<td>
<asp:TextBox ID="txthours" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<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>
</table>
</td>
<td width="380px" valign="top">
<table class="formTable" width="380px">
<tr>
<th colspan="2">联系信息:</th>
</tr>
<tr>
<td align="right" width="70px" >地区:</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 w250 required"></asp:TextBox></td>
</tr>
<tr>
<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"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
电话 :
</td>
<td>
<asp:TextBox ID="txtphone" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
传真 :
</td>
<td>
<asp:TextBox ID="txtfax" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
邮箱 :
</td>
<td>
<asp:TextBox ID="txtemail" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
邮编 :
</td>
<td>
<asp:TextBox ID="txtpostcode" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
主页 :
</td>
<td>
<asp:TextBox ID="txthomepage" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">图片信息:</th>
</tr>
<tr>
<td align="right" valign="top">形 象 图:</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 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>
<td width="70px" align="right">企业标志:</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 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>
<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 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.Market, 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>
<td align="right">企业展示:</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 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>
</table>
</td>
<td valign="top">
<table class="formTable" width="380">
<tr>
<th colspan="2">优化及配置:</th>
</tr>
<tr>
<td width="70px" align="right">关 键 字:</td>
<td><asp:TextBox id="txtkeywords" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">配置域名:</td>
<td><asp:TextBox id="txtdomain" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">配置IP:</td>
<td><asp:TextBox id="txtdomainip" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">ICP备案:</td>
<td><asp:TextBox id="txticp" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">企业风格:</td>
<td><asp:DropDownList ID="ddltemplate" runat="server"></asp:DropDownList></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">企业描述:</th>
</tr>
<tr>
<td colspan="2"><asp:TextBox id="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">企业状态:</th>
</tr>
<tr>
<td width="90px" align="right">审核:</td>
<td><asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">上/下线:</td>
<td><asp:DropDownList ID="ddllinestatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td>
<asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
<tr>
<td align="right">
点击量 :
</td>
<td>
<asp:TextBox ID="txthits" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
最后修改 :
</td>
<td>
<asp:TextBox ID="txtlastedittime" runat="server" CssClass="input Wdate w160 required" onfocus="WdatePicker()"></asp:TextBox>
</td>
</tr>
<%} %>
</table>
</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/Admin/market/marketinfo.aspx | ASP.NET | oos | 24,468 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="marketgroupinfo.aspx.cs" Inherits="TREC.Web.Admin.market.marketgroupinfo" %>
<%@ 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">
$(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>
<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>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="marketgrouplist.aspx">返回列表</a></span><b>您当前的位置:首页 > 卖场管理 > 卖场组管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">卖场组信息</th>
</tr>
<tr>
<td width="120" align="right">
名称 :
</td>
<td align="left">
<asp:TextBox ID="txttitle" runat="server" CssClass="w160 input required"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
颜色 :
</td>
<td align="left">
<asp:TextBox ID="txtcolor" runat="server" CssClass="w160 input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
组图标 :
</td>
<td align="left">
<asp:TextBox ID="txtavatar" runat="server" CssClass="w160 input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
积分 :
</td>
<td align="left">
<asp:TextBox ID="txtintegral" runat="server" CssClass="w160 input required number">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
金钱 :
</td>
<td align="left">
<asp:TextBox ID="txtmoney" runat="server" CssClass="w160 input required number">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
广告数量 :
</td>
<td align="left">
<asp:TextBox ID="txtadcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
店铺数量 :
</td>
<td align="left">
<asp:TextBox ID="txtshopcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
品牌数量 :
</td>
<td align="left">
<asp:TextBox ID="txtbrandcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
促销数量 :
</td>
<td align="left">
<asp:TextBox ID="txtpromotioncount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
广告推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtadrecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
店铺推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtshoprecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
品牌推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtbrandrecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
促销推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtpromotionrecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
楼层数量 :
</td>
<td align="left">
<asp:TextBox ID="txtstoreycount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
楼层店铺数量 :
</td>
<td align="left">
<asp:TextBox ID="txtstoreyshopcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
权限 :
</td>
<td align="left">
<asp:TextBox ID="txtpermissions" runat="server" CssClass="w160 input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
级别 :
</td>
<td align="left">
<asp:TextBox ID="txtlev" runat="server" CssClass="w160 input required digits">1</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
描述 :
</td>
<td align="left">
<asp:TextBox ID="txtdescript" runat="server" CssClass=" w380 textarea" TextMode="MultiLine" Rows="3"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td align="left">
<asp:TextBox ID="txtsort" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
</table>
<div style="margin-top:10px; margin-left:140px">
<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/Admin/market/marketgroupinfo.aspx | ASP.NET | oos | 8,246 |
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.Admin.market
{
public partial class marketinfo : AdminPageBase
{
public string areaCode = "";
public EnMember _memberInfo = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddlmember.Items.Clear();
ddlmember.DataSource = ECMember.GetTop20MemberList();
ddlmember.DataTextField = "username";
ddlmember.DataValueField = "id";
ddlmember.DataBind();
ddlmember.Items.Insert(0, new ListItem("请选择", ""));
ddlmember.Items.Insert(1, new ListItem("无联联账号", "0"));
ddlmarketgroup.Items.Clear();
ddlmarketgroup.DataSource = ECMarket.GetMarketGroupList("");
ddlmarketgroup.DataTextField = "title";
ddlmarketgroup.DataValueField = "id";
ddlmarketgroup.DataBind();
ddlmarketgroup.Items.Insert(0, new ListItem("请选择", ""));
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("请选择", ""));
ddllinestatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAuditStatus), ddllinestatus);
ddllinestatus.Items.Insert(0, new ListItem("请选择", ""));
chkattribute.Items.Clear();
WebControlBind.CheckBoxListBind(typeof(EnumAttribute), chkattribute);
WebControlBind.DrpBind(typeof(EnumTemplate), ddltemplate);
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnMarket model = ECMarket.GetMarketInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
if (model != null && model.mid != 0)
{
_memberInfo = ECMember.GetMemberInfo(" where id=" + model.mid);
if (_memberInfo != null && _memberInfo.id != 0)
{
this.ddlmember.Items.Clear();
this.ddlmember.Items.Insert(0, new ListItem(_memberInfo.username, model.mid.ToString()));
this.ddlmember.Enabled = false;
}
}
txttitle.Text = model.title;
this.txtletter.Text = model.letter;
this.ddlmarketgroup.SelectedValue = model.groupid.ToString();
WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute);
this.txtvip.Text = model.vip.ToString();
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.txtdomain.Text = model.domain;
this.txtdomainip.Text = model.domainip;
this.txticp.Text = model.icp;
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.txtkeywords.Text = model.keywords;
this.ddltemplate.SelectedValue = model.template;
this.txthits.Text = model.hits.ToString();
this.txtsort.Text = model.sort.ToString();
this.txtlastedittime.Text = model.lastedittime.ToString();
this.ddlauditstatus.SelectedValue = model.auditstatus.ToString();
this.ddllinestatus.SelectedValue = model.linestatus.ToString();
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 = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECMarket.GetMarketInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
}
if (model == null)
{
model = new EnMarket();
model.mapapi = "";
model.createmid = 0;
}
int mid = TypeConverter.StrToInt(ddlmember.SelectedValue);
string title = txttitle.Text;
string letter = this.txtletter.Text;
int groupid = TypeConverter.StrToInt(ddlmarketgroup.SelectedValue);
string attribute = WebControlBind.CheckBoxListSelected(chkattribute);
string industry = "";
string productcategory = "";
int vip = TypeConverter.StrToInt(this.txtvip.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(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 domain = this.txtdomain.Text;
string domainip = this.txtdomainip.Text;
string icp = this.txticp.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;
string keywords = this.txtkeywords.Text;
string template = ddltemplate.SelectedValue;
int hits = TypeConverter.StrToInt(this.txthits.Text);
int sort = TypeConverter.StrToInt(this.txtsort.Text);
DateTime lastedittime = DateTime.Now;
int auditstatus = TypeConverter.StrToInt(ddlauditstatus.SelectedValue);
int linestatus = TypeConverter.StrToInt(ddllinestatus.SelectedValue);
model.mid = mid;
model.title = title;
model.letter = letter;
model.groupid = groupid;
model.attribute = attribute;
model.industry = industry;
model.productcategory = productcategory;
model.vip = vip;
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.domain = domain;
model.domainip = domainip;
model.icp = icp;
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.lastedittime = lastedittime;
model.auditstatus = auditstatus;
model.linestatus = linestatus;
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 = adminId;
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, "编辑成功!", "marketlist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/market/marketinfo.aspx.cs | C# | oos | 15,117 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="marketgrouplist.aspx.cs" Inherits="TREC.Web.Admin.market.marketgrouplist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="marketgroupinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 卖场管理 > 卖场组管理</b>
</div>
<div class="spClear"></div>
<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">名称</th>
<th width="60px" align="center">积分</th>
<th width="60px" align="center">金钱</th>
<th width="60px" align="center">级别</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="membergroupinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><%#Eval("integral")%></td>
<td align="center"><%#Eval("money")%></td>
<td align="center"><%#Eval("lev")%></td>
<td align="right" style="padding-left:5px;"><a href="membergroupinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="membergroupinfo.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/market/marketgrouplist.aspx | ASP.NET | oos | 3,476 |
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.Admin.market
{
public partial class marketlist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECMarket.DeletEnMarket(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECMarket.GetMarketList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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)
{
ECMarket.DeletEnMarketByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "marketlist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/market/marketlist.aspx.cs | C# | oos | 1,720 |
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.Admin.market
{
public partial class marketgroupinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnMarketGroup model = ECMarket.GetMarketGroupInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.txttitle.Text = model.title;
this.txtcolor.Text = model.color;
this.txtavatar.Text = model.avatar;
this.txtintegral.Text = model.integral.ToString();
this.txtmoney.Text = model.money.ToString();
this.txtadcount.Text = model.adcount.ToString();
this.txtshopcount.Text = model.shopcount.ToString();
this.txtbrandcount.Text = model.brandcount.ToString();
this.txtpromotioncount.Text = model.promotioncount.ToString();
this.txtadrecommend.Text = model.adrecommend.ToString();
this.txtshoprecommend.Text = model.shoprecommend.ToString();
this.txtbrandrecommend.Text = model.brandrecommend.ToString();
this.txtpromotionrecommend.Text = model.promotionrecommend.ToString();
this.txtshopcount.Text = model.storeycount.ToString();
this.txtshoprecommend.Text = model.storeyshopcount.ToString();
this.txtpermissions.Text = model.permissions;
this.txtlev.Text = model.lev.ToString();
this.txtdescript.Text = model.descript;
this.txtsort.Text = model.sort.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnMarketGroup model = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
string title = this.txttitle.Text;
string color = this.txtcolor.Text;
string avatar = this.txtavatar.Text;
decimal integral = TypeConverter.StrToDeimal(this.txtintegral.Text);
decimal money = TypeConverter.StrToDeimal(this.txtmoney.Text);
int adcount = TypeConverter.StrToInt(this.txtadcount.Text);
int shopcount = TypeConverter.StrToInt(this.txtshopcount.Text);
int brandcount = TypeConverter.StrToInt(this.txtbrandcount.Text);
int promotioncount = TypeConverter.StrToInt(this.txtpromotioncount.Text);
int adrecommend = TypeConverter.StrToInt(this.txtadrecommend.Text);
int shoprecommend = TypeConverter.StrToInt(this.txtshoprecommend.Text);
int brandrecommend = TypeConverter.StrToInt(this.txtbrandrecommend.Text);
int promotionrecommend = TypeConverter.StrToInt(this.txtpromotionrecommend.Text);
int storeycount = TypeConverter.StrToInt(this.txtstoreycount.Text);
int storeyshopcount = TypeConverter.StrToInt(this.txtstoreyshopcount.Text);
string permissions = this.txtpermissions.Text;
int lev = TypeConverter.StrToInt(this.txtlev.Text);
string descript = this.txtdescript.Text;
int sort = TypeConverter.StrToInt(this.txtsort.Text);
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECMarket.GetMarketGroupInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
}
if (model == null)
{
model = new EnMarketGroup();
}
model.title = title;
model.color = color;
model.avatar = avatar;
model.integral = integral;
model.money = money;
model.adcount = adcount;
model.shopcount = shopcount;
model.brandcount = brandcount;
model.promotioncount = promotioncount;
model.adrecommend = adrecommend;
model.shoprecommend = shoprecommend;
model.brandrecommend = brandrecommend;
model.promotionrecommend = promotionrecommend;
model.permissions = permissions;
model.storeycount = storeycount;
model.storeyshopcount = storeyshopcount;
model.lev = lev;
model.descript = descript;
model.sort = sort;
int aid = ECMarket.EditMarketGroup(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "MarketGrouplist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/market/marketgroupinfo.aspx.cs | C# | oos | 5,350 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="marketlist.aspx.cs" Inherits="TREC.Web.Admin.market.marketlist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="marketinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<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">登陆名</th>
<th align="center" width="160px">Email</th>
<th align="center" width="160px">最后活动时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="marketinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><%#Eval("email") %></td>
<td align="center"><%#Eval("lastedittime")%></td>
<td align="right" style="padding-left:5px;"><a href="marketinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="marketlist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/market/marketlist.aspx | ASP.NET | oos | 3,367 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TREC.Web.Admin
{
using TREC.ECommerce;
public partial class index : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/index.aspx.cs | C# | oos | 355 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="top.aspx.cs" Inherits="TREC.Web.Admin.top" %>
<%@ 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">
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
jQuery(function () {
$("#topnav > li").click(function () {
$("#topnav > li").removeClass("cur");
$(this).addClass("cur");
});
})
</script>
<style>
*{margin:0px; padding:0px; font-size:12px;}
td{height:60px; padding:0px; margin:0px;}
#users{margin-left:20px;color:#FFF;}
#users a{ font-weight:bold; color:#333; }
#topnav{float:left; display:block; height:29px; width:100%; margin-top:31px;}
li{ list-style:none; float:left; width:112px; height:29px; background:url(images/top_nav.jpg); margin:0 5px; text-align:center; cursor:pointer;}
li a{line-height:29px; display:block;}
li.cur{background:url(images/top_nav_cur.jpg);}
li.cur a{ font-weight:bold; color:#282828;}
</style>
</head>
<body style="margin:0 0 0 0">
<table style="background-image:url(images/bg.jpg); height:60px; width:100%" cellpadding="0" cellspacing="0">
<tr>
<td style="width:180px">
<span id="users"><a href="#">孙先生(管理员)</a>:<%--<a href="menu/menulist.aspx" target="frmmain">菜单管理</a>--%></span>
</td>
<td valign="top" align="left">
<ul id="topnav">
<li class="cur"><a href="menu.aspx" target="frmLeft" onclick="parent.frames['frmmain'].src='login.aspx'">系统首页</a></li>
<%foreach (EnModule m in list)
{ %>
<li><a href="menu.aspx?id=<%=m.id %>" target="frmLeft"><%=m.title %></a></li>
<%} %>
</ul>
</td>
<td style="width:250px"></td>
</tr>
</table>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/top.aspx | ASP.NET | oos | 2,419 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下特性集
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("TREC.Web.Admin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("FORDIO")]
[assembly: AssemblyProduct("TREC.Web.Admin")]
[assembly: AssemblyCopyright("Copyright © FORDIO 2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("e3794e05-3033-4b36-9b38-5d81bd8fbdfe")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 内部版本号
// 修订号
//
// 您可以指定所有这些值,也可以使用“修订号”和“内部版本号”的默认值,
// 方法是按如下所示使用“*”:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/Properties/AssemblyInfo.cs | C# | oos | 1,341 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TREC.Web.Admin
{
public partial class menu : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/menu.aspx.cs | C# | oos | 332 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="grouporderlist.aspx.cs" Inherits="TREC.Web.Admin.grouporder.grouporderlist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="grouporderinfo.aspx">添加菜单</a></span><b>您当前的位置:首页 > 订单管理 > 团购订单</b>
</div>
<div class="spClear"></div>
<table>
<tr>
<td>
<label>订单搜索:</label>
<asp:DropDownList ID="ddlstype" runat="server">
<asp:ListItem Text="搜索条件" Value=""></asp:ListItem>
<asp:ListItem Text="收货人" Value="name"></asp:ListItem>
<asp:ListItem Text="订单编号" Value="grouporderno"></asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txtsearch" runat="server" CssClass="input w380"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" CssClass="submit" Text="搜索"
onclick="btnSearch_Click" />
</td>
</tr>
</table>
<div class="spClear"></div>
<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" width="240">订单编号</th>
<th width="60px" align="center">客户名称</th>
<th width="100px" align="center">客户电话</th>
<th width="120px" align="center">订单原总额</th>
<th width="120px" align="center">订单总额(活动)</th>
<th align="left">客户地址</th>
<th width="60px" align="center">状态</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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">
<a href="grouporderinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("grouporderno") %></a>
<a href="grouporderpaylist.aspx?pid=<%#Eval("id") %>">[支付]</a>
<a href="grouporderproductlist.aspx?pid=<%#Eval("id") %>">[产品]</a>
</td>
<td align="center"><%#Eval("name") %></td>
<td align="center"><%#Eval("phone") %></td>
<td align="center"><%#Eval("totalmoney")%></td>
<td align="center"><%#Eval("totlepromoney")%></td>
<td align="left"><%#Eval("address") %></td>
<td align="center"><%# Enum.GetName(typeof(EnumGroupOrderStatus),Eval("status"))%></td>
<td align="right" style="padding-left:5px;"><a href="grouporderinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="grouporderinfo.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true"
UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页"
onpagechanged="AspNetPager1_PageChanged">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/grouporder/grouporderlist.aspx | ASP.NET | oos | 4,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.Admin.grouporder
{
public partial class grouporderpayinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
WebControlBind.DrpBind(typeof(EnumGroupOrderPayType), ddlpaytype);
ddlpaytype.Items.Insert(0, new ListItem("请选择类型", ""));
WebControlBind.DrpBind(typeof(EnumGroupOrderPayStatus), ddlpaystatus);
ddlpaystatus.Items.Insert(0, new ListItem("请选择状态", ""));
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnGroupOrderPay model = ECGroupOrderPay.GetGroupOrderPayInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.txtgrouporderno.Text = model.grouporderno;
this.txtpaycode.Text = model.paycode;
this.ddlpaytype.SelectedValue = model.paytype.ToString();
this.txtpaymoney.Text = model.paymoney.ToString();
this.txtdescript.Text = model.descript;
this.ddlpaystatus.SelectedValue = model.paystatus.ToString();
this.txtpaydatetime.Text = model.paydatetime.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnGroupOrderPay model = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
int grouporderid = int.Parse(ECommon.QueryOId);
string grouporderno = this.txtgrouporderno.Text;
string paycode = this.txtpaycode.Text;
int paytype = int.Parse(this.ddlpaytype.SelectedValue);
decimal paymoney = decimal.Parse(this.txtpaymoney.Text);
string descript = this.txtdescript.Text;
int paystatus = int.Parse(this.ddlpaystatus.SelectedValue);
DateTime paydatetime = DateTime.Parse(this.txtpaydatetime.Text);
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECGroupOrderPay.GetGroupOrderPayInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
}
if (model == null)
{
model = new EnGroupOrderPay();
}
model.grouporderid = grouporderid;
model.grouporderno = grouporderno;
model.paycode = paycode;
model.paytype = paytype;
model.paymoney = paymoney;
model.descript = descript;
model.paystatus = paystatus;
model.paydatetime = paydatetime;
int aid = ECGroupOrderPay.EditGroupOrderPay(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "grouporderpaylist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/grouporder/grouporderpayinfo.aspx.cs | C# | oos | 3,483 |
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.Admin.grouporder
{
public partial class grouporderpaylist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECGroupOrderPay.DeleteGroupOrderPay(TypeConverter.StrToInt(ECommon.QueryId));
}
//if (Request.QueryString["mid"] != null && Request.QueryString["mid"].ToString() != "")
//{
// rptList.DataSource = ECGroupOrderPay.GetGroupOrderPayList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", out tmpPageCount);
// rptList.DataBind();
// AspNetPager1.RecordCount = tmpPageCount;
//}
//else
//{
// rptList.Visible = false;
// AspNetPager1.Visible = false;
//}
string strWhere = "";
if (ECommon.QueryPId != "")
{
strWhere += " and grouporderid=" + ECommon.QueryPId;
}
strWhere = strWhere != "" ? strWhere.Substring(4, strWhere.Length - 4) : strWhere;
rptList.DataSource = ECGroupOrderPay.GetGroupOrderPayList(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)
{
ECGroupOrderPay.DeleteGroupOrderPayByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "grouporderpaylist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/grouporder/grouporderpaylist.aspx.cs | C# | oos | 2,589 |
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.Admin.grouporder
{
public partial class grouporderproductlist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECGroupOrderProduct.DeleteGroupOrderProduct(TypeConverter.StrToInt(ECommon.QueryId));
}
//if (Request.QueryString["mid"] != null && Request.QueryString["mid"].ToString() != "")
//{
// rptList.DataSource = ECGroupOrderProduct.GetGroupOrderProductList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", out tmpPageCount);
// rptList.DataBind();
// AspNetPager1.RecordCount = tmpPageCount;
//}
//else
//{
// rptList.Visible = false;
// AspNetPager1.Visible = false;
//}
string strWhere = "";
if (ECommon.QueryPId != "")
{
strWhere += " and grouporderid=" + ECommon.QueryPId;
}
strWhere = strWhere != "" ? strWhere.Substring(4, strWhere.Length - 4) : strWhere;
rptList.DataSource = ECGroupOrderProduct.GetGroupOrderProductList(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)
{
ECGroupOrderProduct.DeleteGroupOrderProductByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "grouporderproductlist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/grouporder/grouporderproductlist.aspx.cs | C# | oos | 2,629 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="grouporderpaylist.aspx.cs" Inherits="TREC.Web.Admin.grouporder.grouporderpaylist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="grouporderpayinfo.aspx">添加支付记录</a></span><b>您当前的位置:首页 > 订单管理 > 订单支付信息</b>
</div>
<div class="spClear"></div>
<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="160">订单编号</th>
<th width="160px" align="center">支付编号</th>
<th width="140px" align="center">支付时间</th>
<th align="left">支付金客总额</th>
<th width="80px" align="center">支付状态</th>
<th width="80px" align="center">支付类型</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><%#Eval("grouporderno") %></td>
<td align="center"><%#Eval("paycode")%></td>
<td align="center"><%#Eval("paydatetime")%></td>
<td align="left"> <%#Eval("paymoney")%></td>
<td align="center"><%# Enum.GetName(typeof(EnumGroupOrderPayStatus), Eval("paystatus"))%></td>
<td align="center"><%# Enum.GetName(typeof(EnumGroupOrderPayType), Eval("paytype"))%></td>
<td align="right" style="padding-left:5px;"><a href="grouporderpayinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="grouporderpayinfo.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/grouporder/grouporderpaylist.aspx | ASP.NET | oos | 3,860 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="grouporderpayinfo.aspx.cs" Inherits="TREC.Web.Admin.grouporder.grouporderpayinfo" %>
<%@ 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">
$(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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="grouporderpaylist.aspx">返回列表</a></span><b>您当前的位置:首页 > 订单管理 > 订单支付信息</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="2" align="left">订单支付信息</th>
</tr>
<tr>
<td align="right" width="160">
订单编号 :
</td>
<td align="left">
<asp:TextBox ID="txtgrouporderno" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
支付编号 :
</td>
<td align="left">
<asp:TextBox ID="txtpaycode" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
支付类型 :
</td>
<td align="left">
<asp:DropDownList ID="ddlpaytype" runat="server" CssClass="select selectNone"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
支付金额 :
</td>
<td align="left">
<asp:TextBox ID="txtpaymoney" runat="server" CssClass="input">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
描述 :
</td>
<td align="left">
<asp:TextBox ID="txtdescript" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
支付状态 :
</td>
<td align="left">
<asp:DropDownList ID="ddlpaystatus" runat="server" CssClass="select selectNone"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
支付时间 :
</td>
<td align="left">
<asp:TextBox ID="txtpaydatetime" runat="server" CssClass="input" Enabled="false"></asp:TextBox>
</td>
</tr>
</table>
<div style="margin-top:10px; margin-left:140px">
<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/Admin/grouporder/grouporderpayinfo.aspx | ASP.NET | oos | 4,608 |
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.Admin.grouporder
{
public partial class grouporderinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
WebControlBind.DrpBind(typeof(EnumGroupOrderStatus), ddlstatus);
ddlstatus.Items.Insert(0, new ListItem("请选择状态", ""));
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnGroupOrder model = ECGroupOrder.GetGroupOrderInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.txtgrouporderno.Text = model.grouporderno;
this.txtname.Text = model.name;
this.txtemail.Text = model.email;
this.txtphone.Text = model.phone;
this.txtfax.Text = model.fax;
this.txtmphone.Text = model.mphone;
this.txtzip.Text = model.zip;
this.txtareacode.Text = model.areacode;
this.txtaddress.Text = model.address;
this.txttotalmoney.Text = model.totalmoney.ToString();
this.txttotlepromoney.Text = model.totlepromoney.ToString();
this.txtinvoicemoney.Text = model.invoicemoney.ToString();
this.txtinstallationmeney.Text = model.installationmeney.ToString();
this.ddlstatus.SelectedValue = model.status.ToString();
this.txtcreatetime.Text = model.createtime.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnGroupOrder model = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
string grouporderno = this.txtgrouporderno.Text;
string name = this.txtname.Text;
string email = this.txtemail.Text;
string phone = this.txtphone.Text;
string fax = this.txtfax.Text;
string mphone = this.txtmphone.Text;
string zip = this.txtzip.Text;
string areacode = this.txtareacode.Text;
string address = this.txtaddress.Text;
decimal totlepromoney = decimal.Parse(this.txttotlepromoney.Text);
decimal totalmoney = decimal.Parse(this.txttotalmoney.Text);
decimal invoicemoney = decimal.Parse(this.txtinvoicemoney.Text);
decimal installationmeney = decimal.Parse(this.txtinstallationmeney.Text);
int status = int.Parse(this.ddlstatus.SelectedValue);
DateTime createtime = DateTime.Parse(this.txtcreatetime.Text);
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECGroupOrder.GetGroupOrderInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
}
if (model == null)
{
model = new EnGroupOrder();
model.grouporderno = "";
model.createtime = DateTime.Now;
model.mid = 0;
model.fjmid = 0;
}
model.name = name;
model.email = email;
model.phone = phone;
model.fax = fax;
model.mphone = mphone;
model.zip = zip;
model.areacode = areacode;
model.address = address;
model.totalmoney = totalmoney;
model.totlepromoney = totlepromoney;
model.invoicemoney = invoicemoney;
model.installationmeney = installationmeney;
model.status = status;
int aid = ECGroupOrder.EditGroupOrder(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "grouporderlist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/grouporder/grouporderinfo.aspx.cs | C# | oos | 4,484 |
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.Admin.grouporder
{
public partial class grouporderlist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECGroupOrder.DeleteGroupOrder(TypeConverter.StrToInt(ECommon.QueryId));
}
//if (Request.QueryString["mid"] != null && Request.QueryString["mid"].ToString() != "")
//{
// rptList.DataSource = ECGroupOrder.GetGroupOrderList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", out tmpPageCount);
// rptList.DataBind();
// AspNetPager1.RecordCount = tmpPageCount;
//}
//else
//{
// rptList.Visible = false;
// AspNetPager1.Visible = false;
//}
string strWhere = "";
if (ddlstype.SelectedValue != "")
{
switch (ddlstype.SelectedValue)
{
case "name":
strWhere += " and name like '%" + txtsearch.Text + "%' ";
break;
case "grouporderno":
strWhere += " and name grouporderno '%" + txtsearch.Text + "%' ";
break;
}
}
strWhere = strWhere != "" ? strWhere.Substring(4, strWhere.Length-4) : strWhere;
rptList.DataSource = ECGroupOrder.GetGroupOrderList(AspNetPager1.CurrentPageIndex, 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)
{
ECGroupOrder.DeleteGroupOrderByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "grouporderlist.aspx", "Success");
}
}
protected void AspNetPager1_PageChanged(object sender, EventArgs e)
{
ShowData();
}
protected void btnSearch_Click(object sender, EventArgs e)
{
ShowData();
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/grouporder/grouporderlist.aspx.cs | C# | oos | 3,138 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="grouporderproductinfo.aspx.cs" Inherits="TREC.Web.Admin.grouporder.grouporderproductinfo" %>
<%@ 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">
$(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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="grouporderproductlist.aspx">返回列表</a></span><b>您当前的位置:首页 > 订单管理 > 团购订单</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">订单信息</th>
</tr>
<tr>
<td width="120" align="right">
订单编号 :
</td>
<td align="left">
<asp:TextBox ID="txtgrouporderno" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
活动介绍ID :
</td>
<td align="left">
<asp:TextBox ID="txtpromotionid" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
活动内容ID:
</td>
<td align="left">
<asp:TextBox ID="txtpromotiondefid" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
优惠规则ID :
</td>
<td align="left">
<asp:TextBox ID="txtpromoteionstageid" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品ID :
</td>
<td align="left">
<asp:TextBox ID="txtproductid" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品属性ID:
</td>
<td align="left">
<asp:TextBox ID="txtproductattributeid" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品code :
</td>
<td align="left">
<asp:TextBox ID="txtproductcode" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品名称 :
</td>
<td align="left">
<asp:TextBox ID="txtproductname" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品颜色 :
</td>
<td align="left">
<asp:TextBox ID="txtcolor" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品选材 :
</td>
<td align="left">
<asp:TextBox ID="txtmaterial" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品大小 :
</td>
<td align="left">
<asp:TextBox ID="txtsize" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品体积 :
</td>
<td align="left">
<asp:TextBox ID="txtcbm" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品数量 :
</td>
<td align="left">
<asp:TextBox ID="txtnum" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品单价(原) :
</td>
<td align="left">
<asp:TextBox ID="txtprice" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
总价(原) :
</td>
<td align="left">
<asp:TextBox ID="txttotalmoney" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
产品单价(活动) :
</td>
<td align="left">
<asp:TextBox ID="txtproprice" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
总价 (活动):
</td>
<td align="left">
<asp:TextBox ID="txtprototalmoney" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
</table>
<div style="margin-top:10px; margin-left:140px">
<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/Admin/grouporder/grouporderproductinfo.aspx | ASP.NET | oos | 7,180 |
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.Admin.grouporder
{
public partial class grouporderproductinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnGroupOrderProduct model = ECGroupOrderProduct.GetGroupOrderProductInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.txtgrouporderno.Text = model.grouporderno;
this.txtpromotionid.Text = model.promotionid.ToString();
this.txtpromotiondefid.Text = model.promotiondefid.ToString();
this.txtpromoteionstageid.Text = model.promoteionstageid.ToString();
this.txtproductid.Text = model.productid.ToString();
this.txtproductattributeid.Text = model.productattributeid.ToString();
this.txtproductcode.Text = model.productcode;
this.txtproductname.Text = model.productname;
this.txtcolor.Text = model.color;
this.txtmaterial.Text = model.material;
this.txtsize.Text = model.size;
this.txtcbm.Text = model.cbm.ToString();
this.txtnum.Text = model.num.ToString();
this.txtprice.Text = model.price.ToString();
this.txttotalmoney.Text = model.totalmoney.ToString();
this.txtprice.Text = model.proprice.ToString();
this.txtproprice.Text = model.prototalmoney.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnGroupOrderProduct model = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
int productid = int.Parse(this.txtproductid.Text);
int productattributeid = int.Parse(this.txtproductattributeid.Text);
string productcode = this.txtproductcode.Text;
string productname = this.txtproductname.Text;
string color = this.txtcolor.Text;
string material = this.txtmaterial.Text;
string size = this.txtsize.Text;
decimal cbm = decimal.Parse(this.txtcbm.Text);
int num = int.Parse(this.txtnum.Text);
decimal price = decimal.Parse(this.txtprice.Text);
decimal totalmoney = decimal.Parse(this.txttotalmoney.Text);
decimal proprice =decimal.Parse(this.txtproprice.Text);
decimal prototalmoney = decimal.Parse(this.txtprototalmoney.Text);
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECGroupOrderProduct.GetGroupOrderProductInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
}
if (model == null)
{
model = new EnGroupOrderProduct();
model.grouporderid = 0;
model.grouporderno = "";
model.promotionid = 0;
model.promotiondefid = 0;
model.promoteionstageid = 0;
}
model.productid = productid;
model.productattributeid = productattributeid;
model.productcode = productcode;
model.productname = productname;
model.color = color;
model.material = material;
model.size = size;
model.cbm = cbm;
model.num = num;
model.price = price;
model.totalmoney = totalmoney;
model.proprice = proprice;
model.prototalmoney = prototalmoney;
int aid = ECGroupOrderProduct.EditGroupOrderProduct(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "grouporderproductlist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/grouporder/grouporderproductinfo.aspx.cs | C# | oos | 4,578 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="grouporderproductlist.aspx.cs" Inherits="TREC.Web.Admin.grouporder.grouporderproductlist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="grouporderproductinfo.aspx">添加菜单</a></span><b>您当前的位置:首页 > 订单管理 > 团购订单</b>
</div>
<div class="spClear"></div>
<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="120">订单编号</th>
<th align="center" width="120">产品编号</th>
<th align="left">产品名称</th>
<th width="60px" align="center">产品数量</th>
<th width="80px" align="center">产品价格(原)</th>
<th width="100px" align="center">产品总额(原)</th>
<th width="100px" align="center">产品价格(活动)</th>
<th width="100px" align="center">产品总额(活动)</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><%#Eval("grouporderno") %></td>
<td align="center"><%#Eval("productcode")%></td>
<td align="left"><%#Eval("productname")%></td>
<td align="center"><%#Eval("num")%></td>
<td align="center"><%#Eval("price")%></td>
<td align="center"><%#Eval("totalmoney")%></td>
<td align="center"><%#Eval("proprice")%></td>
<td align="center"><%#Eval("prototalmoney")%></td>
<td align="right" style="padding-left:5px;"><a href="grouporderproductinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="grouporderproductinfo.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/grouporder/grouporderproductlist.aspx | ASP.NET | oos | 3,974 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="grouporderinfo.aspx.cs" Inherits="TREC.Web.Admin.grouporder.grouporderinfo" %>
<%@ 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">
$(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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="grouporderlist.aspx">返回列表</a></span><b>您当前的位置:首页 > 订单管理 > 团购订单</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">订单信息</th>
</tr>
<tr>
<td width="120" align="right">
订单编号 :
</td>
<td align="left">
<asp:TextBox ID="txtgrouporderno" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
客户名称 :
</td>
<td align="left">
<asp:TextBox ID="txtname" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
客户邮箱 :
</td>
<td align="left">
<asp:TextBox ID="txtemail" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
客户电话 :
</td>
<td align="left">
<asp:TextBox ID="txtphone" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
客户传真 :
</td>
<td align="left">
<asp:TextBox ID="txtfax" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
客户手机 :
</td>
<td align="left">
<asp:TextBox ID="txtmphone" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
客户邮箱 :
</td>
<td align="left">
<asp:TextBox ID="txtzip" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
所在地区 :
</td>
<td align="left">
<asp:TextBox ID="txtareacode" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
客户地址 :
</td>
<td align="left">
<asp:TextBox ID="txtaddress" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
订单总额(原) :
</td>
<td align="left">
<asp:TextBox ID="txttotalmoney" runat="server" CssClass="input">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
订单总额(活动) :
</td>
<td align="left">
<asp:TextBox ID="txttotlepromoney" runat="server" CssClass="input">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
发票总额 :
</td>
<td align="left">
<asp:TextBox ID="txtinvoicemoney" runat="server" CssClass="input">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
安装费 :
</td>
<td align="left">
<asp:TextBox ID="txtinstallationmeney" runat="server" CssClass="input">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
订单状态 :
</td>
<td align="left">
<asp:DropDownList ID="ddlstatus" runat="server" CssClass="select selectNone"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
下单时间 :
</td>
<td align="left">
<asp:TextBox ID="txtcreatetime" runat="server" CssClass="input" Enabled="false"></asp:TextBox>
</td>
</tr>
</table>
<div style="margin-top:10px; margin-left:140px">
<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/Admin/grouporder/grouporderinfo.aspx | ASP.NET | oos | 6,650 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dealerlist.aspx.cs" Inherits="TREC.Web.Admin.dealer.dealerlist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="dealerinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<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">登陆名</th>
<th align="center" width="160px">Email</th>
<th align="center" width="160px">最后活动时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="dealerinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><%#Eval("email") %></td>
<td align="center"><%#Eval("lastedittime")%></td>
<td align="right" style="padding-left:5px;"><a href="dealerinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="dealerlist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/dealer/dealerlist.aspx | ASP.NET | oos | 3,367 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dealerinfo.aspx.cs" Inherits="TREC.Web.Admin.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>
<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=dealer&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>
<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>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="dealerlist.aspx">返回列表</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">登陆账号信息</th>
</tr>
<tr>
<td width="390px" valign="top">
<table class="formTable" width="380px">
<tr>
<th colspan="2">账号信息:</th>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "" && _memberInfo!=null)
{ %>
<tr>
<td align="right" width="70">通 行 证:</td>
<td><%=_memberInfo.passport %></td>
</tr>
<%}
else
{ %>
<tr>
<td align="right" width="70">会员查找:</td>
<td><asp:TextBox ID="txtSearch" runat="server" CssClass="w160 input"></asp:TextBox> <input type="button" class="submit" value="查找" id="btnSearch" /></td>
</tr>
<%} %>
<tr>
<td align="right">登陆账号:</td>
<td><asp:DropDownList ID="ddlmember" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380px">
<tr>
<th colspan="2">企业信息:</th>
</tr>
<tr>
<td width="70px" align="right">
推荐属性:
</td>
<td >
<asp:CheckBoxList runat="server" ID="chkattribute" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList>
</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">
企业组 :
</td>
<td>
<asp:DropDownList ID="ddldealergroup" runat="server" CssClass="select selectNone" Width="160px"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
名称索引:
</td>
<td>
<asp:TextBox ID="txtletter" runat="server" CssClass="input required w160"></asp:TextBox>
</td>
</tr>
<tr>
<td width="76px" align="right">
是否vip :
</td>
<td>
<asp:TextBox ID="txtvip" runat="server" Width="45" CssClass="input required">0</asp:TextBox><label>(1-10值越大级别越高,0为不是vip)</label>
</td>
</tr>
<tr>
<td align="right">
人员规格 :
</td>
<td>
<asp:DropDownList ID="ddlstaffsize" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
注册年份:
</td>
<td>
<asp:TextBox ID="txtregyear" runat="server" CssClass="input w160 required digits"></asp:TextBox>
</td>
</tr>
<tr>
<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="txtbuy" runat="server" CssClass="w250 textarea" TextMode="MultiLine" Rows="4"></asp:TextBox><label>长度不超过250字符,生产/销售/租凭业务描述</label>
</td>
</tr>
</table>
</td>
<td width="380px" valign="top">
<table class="formTable" width="380px">
<tr>
<th colspan="2">联系信息:</th>
</tr>
<tr>
<td align="right" width="70px" >地区:</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 w250 required"></asp:TextBox></td>
</tr>
<tr>
<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"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
电话 :
</td>
<td>
<asp:TextBox ID="txtphone" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
传真 :
</td>
<td>
<asp:TextBox ID="txtfax" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
邮箱 :
</td>
<td>
<asp:TextBox ID="txtemail" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
邮编 :
</td>
<td>
<asp:TextBox ID="txtpostcode" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
主页 :
</td>
<td>
<asp:TextBox ID="txthomepage" runat="server" CssClass="input w160"></asp:TextBox>
</td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">图片信息:</th>
</tr>
<tr>
<td align="right" valign="top">形 象 图:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Dealer, 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>
<td width="70px" align="right">企业标志:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Dealer, 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">缩 略 图:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Dealer, 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.Dealer, 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>
<td align="right">企业展示:</td>
<td>
<div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Dealer, 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>
</table>
</td>
<td valign="top">
<table class="formTable" width="380">
<tr>
<th colspan="2">优化及配置:</th>
</tr>
<tr>
<td width="70px" align="right">关 键 字:</td>
<td><asp:TextBox id="txtkeywords" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">配置域名:</td>
<td><asp:TextBox id="txtdomain" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">配置IP:</td>
<td><asp:TextBox id="txtdomainip" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">ICP备案:</td>
<td><asp:TextBox id="txticp" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">企业风格:</td>
<td><asp:DropDownList ID="ddltemplate" runat="server"></asp:DropDownList></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">企业描述:</th>
</tr>
<tr>
<td colspan="2"><asp:TextBox id="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">企业状态:</th>
</tr>
<tr>
<td width="90px" align="right">审核:</td>
<td><asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">上/下线:</td>
<td><asp:DropDownList ID="ddllinestatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td>
<asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
<tr>
<td align="right">
点击量 :
</td>
<td>
<asp:TextBox ID="txthits" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
最后修改 :
</td>
<td>
<asp:TextBox ID="txtlastedittime" runat="server" CssClass="input Wdate w160 required" onfocus="WdatePicker()"></asp:TextBox>
</td>
</tr>
<%} %>
</table>
</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/Admin/dealer/dealerinfo.aspx | ASP.NET | oos | 22,709 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dealergroupinfo.aspx.cs" Inherits="TREC.Web.Admin.dealer.dealergroupinfo" %>
<%@ 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">
$(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>
<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>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="dealergrouplist.aspx">返回列表</a></span><b>您当前的位置:首页 > 工厂管理 > 工厂组管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">工厂组信息</th>
</tr>
<tr>
<td width="120" align="right">
名称 :
</td>
<td align="left">
<asp:TextBox ID="txttitle" runat="server" CssClass="w160 input required"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
颜色 :
</td>
<td align="left">
<asp:TextBox ID="txtcolor" runat="server" CssClass="w160 input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
组图标 :
</td>
<td align="left">
<asp:TextBox ID="txtavatar" runat="server" CssClass="w160 input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
积分 :
</td>
<td align="left">
<asp:TextBox ID="txtintegral" runat="server" CssClass="w160 input required number">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
金钱 :
</td>
<td align="left">
<asp:TextBox ID="txtmoney" runat="server" CssClass="w160 input required number">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
广告数量 :
</td>
<td align="left">
<asp:TextBox ID="txtadcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
店铺数量 :
</td>
<td align="left">
<asp:TextBox ID="txtshopcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
品牌数量 :
</td>
<td align="left">
<asp:TextBox ID="txtbrandcount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
促销数量 :
</td>
<td align="left">
<asp:TextBox ID="txtpromotioncount" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
广告推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtadrecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
店铺推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtshoprecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
品牌推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtbrandrecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
促销推荐数量 :
</td>
<td align="left">
<asp:TextBox ID="txtpromotionrecommend" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
权限 :
</td>
<td align="left">
<asp:TextBox ID="txtpermissions" runat="server" CssClass="w160 input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
级别 :
</td>
<td align="left">
<asp:TextBox ID="txtlev" runat="server" CssClass="w160 input required digits">1</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
描述 :
</td>
<td align="left">
<asp:TextBox ID="txtdescript" runat="server" CssClass=" w380 textarea" TextMode="MultiLine" Rows="3"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td align="left">
<asp:TextBox ID="txtsort" runat="server" CssClass="w160 input required digits">0</asp:TextBox>
</td>
</tr>
</table>
<div style="margin-top:10px; margin-left:140px">
<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/Admin/dealer/dealergroupinfo.aspx | ASP.NET | oos | 7,668 |
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.Admin.dealer
{
public partial class dealergroupinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnDealerGroup model = ECDealer.GetDealerGroupInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.txttitle.Text = model.title;
this.txtcolor.Text = model.color;
this.txtavatar.Text = model.avatar;
this.txtintegral.Text = model.integral.ToString();
this.txtmoney.Text = model.money.ToString();
this.txtadcount.Text = model.adcount.ToString();
this.txtshopcount.Text = model.shopcount.ToString();
this.txtbrandcount.Text = model.brandcount.ToString();
this.txtpromotioncount.Text = model.promotioncount.ToString();
this.txtadrecommend.Text = model.adrecommend.ToString();
this.txtshoprecommend.Text = model.shoprecommend.ToString();
this.txtbrandrecommend.Text = model.brandrecommend.ToString();
this.txtpromotionrecommend.Text = model.promotionrecommend.ToString();
this.txtpermissions.Text = model.permissions;
this.txtlev.Text = model.lev.ToString();
this.txtdescript.Text = model.descript;
this.txtsort.Text = model.sort.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnDealerGroup model = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
string title = this.txttitle.Text;
string color = this.txtcolor.Text;
string avatar = this.txtavatar.Text;
decimal integral = TypeConverter.StrToDeimal(this.txtintegral.Text);
decimal money = TypeConverter.StrToDeimal(this.txtmoney.Text);
int adcount = TypeConverter.StrToInt(this.txtadcount.Text);
int shopcount = TypeConverter.StrToInt(this.txtshopcount.Text);
int brandcount = TypeConverter.StrToInt(this.txtbrandcount.Text);
int promotioncount = TypeConverter.StrToInt(this.txtpromotioncount.Text);
int adrecommend = TypeConverter.StrToInt(this.txtadrecommend.Text);
int shoprecommend = TypeConverter.StrToInt(this.txtshoprecommend.Text);
int brandrecommend = TypeConverter.StrToInt(this.txtbrandrecommend.Text);
int promotionrecommend = TypeConverter.StrToInt(this.txtpromotionrecommend.Text);
string permissions = this.txtpermissions.Text;
int lev = TypeConverter.StrToInt(this.txtlev.Text);
string descript = this.txtdescript.Text;
int sort = TypeConverter.StrToInt(this.txtsort.Text);
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECDealer.GetDealerGroupInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
}
if (model == null)
{
model = new EnDealerGroup();
}
model.title = title;
model.color = color;
model.avatar = avatar;
model.integral = integral;
model.money = money;
model.adcount = adcount;
model.shopcount = shopcount;
model.brandcount = brandcount;
model.promotioncount = promotioncount;
model.adrecommend = adrecommend;
model.shoprecommend = shoprecommend;
model.brandrecommend = brandrecommend;
model.promotionrecommend = promotionrecommend;
model.permissions = permissions;
model.lev = lev;
model.descript = descript;
model.sort = sort;
int aid = ECDealer.EditDealerGroup(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "DealerGrouplist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/dealer/dealergroupinfo.aspx.cs | C# | oos | 4,901 |
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.Admin.dealer
{
public partial class dealerlist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECDealer.DeleteDealer(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECDealer.GetDealerList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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)
{
ECDealer.DeleteDealerByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "dealerlist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/dealer/dealerlist.aspx.cs | C# | oos | 1,718 |
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.Admin.dealer
{
public partial class dealerinfo : AdminPageBase
{
public string areaCode = "";
public EnMember _memberInfo = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddlmember.Items.Clear();
ddlmember.DataSource = ECMember.GetTop20MemberList();
ddlmember.DataTextField = "username";
ddlmember.DataValueField = "id";
ddlmember.DataBind();
ddlmember.Items.Insert(0, new ListItem("请选择", ""));
ddlmember.Items.Insert(1, new ListItem("无联联账号", "0"));
ddldealergroup.Items.Clear();
ddldealergroup.DataSource = ECDealer.GetDealerGroupList("");
ddldealergroup.DataTextField = "title";
ddldealergroup.DataValueField = "id";
ddldealergroup.DataBind();
ddldealergroup.Items.Insert(0, new ListItem("请选择", ""));
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("请选择", ""));
ddllinestatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAuditStatus), ddllinestatus);
ddllinestatus.Items.Insert(0, new ListItem("请选择", ""));
chkattribute.Items.Clear();
WebControlBind.CheckBoxListBind(typeof(EnumAttribute), chkattribute);
WebControlBind.DrpBind(typeof(EnumTemplate), ddltemplate);
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnDealer model = ECDealer.GetDealerInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
if (model != null && model.mid != 0)
{
_memberInfo = ECMember.GetMemberInfo(" where id=" + model.mid);
if (_memberInfo != null && _memberInfo.id != 0)
{
this.ddlmember.Items.Clear();
this.ddlmember.Items.Insert(0, new ListItem(_memberInfo.username, model.mid.ToString()));
this.ddlmember.Enabled = false;
}
}
txttitle.Text = model.title;
this.txtletter.Text = model.letter;
this.ddldealergroup.SelectedValue = model.groupid.ToString();
WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute);
this.txtvip.Text = model.vip.ToString();
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.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.txtdomain.Text = model.domain;
this.txtdomainip.Text = model.domainip;
this.txticp.Text = model.icp;
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.txtkeywords.Text = model.keywords;
this.ddltemplate.SelectedValue = model.template;
this.txthits.Text = model.hits.ToString();
this.txtsort.Text = model.sort.ToString();
this.txtlastedittime.Text = model.lastedittime.ToString();
this.ddlauditstatus.SelectedValue = model.auditstatus.ToString();
this.ddllinestatus.SelectedValue = model.linestatus.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnDealer model = null;
string strErr = "";
if (strErr != "")
{
//MessageBox.Show(this, strErr);
return;
}
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECDealer.GetDealerInfo(" where id=" + ECommon.QueryId);
model.id = TypeConverter.StrToInt(ECommon.QueryId);
}
if (model == null)
{
model = new EnDealer();
model.mapapi = "";
model.createmid = 0;
}
int mid = TypeConverter.StrToInt(ddlmember.SelectedValue);
string title = txttitle.Text;
string letter = this.txtletter.Text;
int groupid = TypeConverter.StrToInt(ddldealergroup.SelectedValue);
string attribute = WebControlBind.CheckBoxListSelected(chkattribute);
string industry = "";
string productcategory = "";
int vip = TypeConverter.StrToInt(this.txtvip.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(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 domain = this.txtdomain.Text;
string domainip = this.txtdomainip.Text;
string icp = this.txticp.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;
string keywords = this.txtkeywords.Text;
string template = ddltemplate.SelectedValue;
int hits = TypeConverter.StrToInt(this.txthits.Text);
int sort = TypeConverter.StrToInt(this.txtsort.Text);
DateTime lastedittime = DateTime.Now;
int auditstatus = TypeConverter.StrToInt(ddlauditstatus.SelectedValue);
int linestatus = TypeConverter.StrToInt(ddllinestatus.SelectedValue);
model.mid = mid;
model.title = title;
model.letter = letter;
model.groupid = groupid;
model.industry = industry;
model.productcategory = productcategory;
model.vip = vip;
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.domain = domain;
model.domainip = domainip;
model.icp = icp;
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 = adminId;
model.lastedittime = lastedittime;
model.auditstatus = auditstatus;
model.linestatus = linestatus;
int aid = ECDealer.EditDealer(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.Dealer, aid, EnFilePath.Surface));
}
if (thumb.Length > 0)
{
ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Dealer, aid, EnFilePath.Thumb));
}
if (logo.Length > 0)
{
ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.Dealer, aid, EnFilePath.Logo));
}
if (bannel.Length > 0)
{
ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Dealer, aid, EnFilePath.Banner));
}
if (desimage.Length > 0)
{
ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.Dealer, 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)
{
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, "编辑成功!", "dealerlist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/dealer/dealerinfo.aspx.cs | C# | oos | 13,926 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dealergrouplist.aspx.cs" Inherits="TREC.Web.Admin.dealer.dealergrouplist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="dealergroupinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 工厂管理 > 工厂组管理</b>
</div>
<div class="spClear"></div>
<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">名称</th>
<th width="60px" align="center">积分</th>
<th width="60px" align="center">金钱</th>
<th width="60px" align="center">级别</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="membergroupinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><%#Eval("integral")%></td>
<td align="center"><%#Eval("money")%></td>
<td align="center"><%#Eval("lev")%></td>
<td align="right" style="padding-left:5px;"><a href="membergroupinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="membergroupinfo.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/dealer/dealergrouplist.aspx | ASP.NET | oos | 3,476 |
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.Admin.dealer
{
public partial class dealergrouplist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECDealer.DeletEnDealerGroup(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECDealer.GetDealerGroupList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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)
{
ECDealer.DeletEnDealerGroupByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "dealergrouplist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/dealer/dealergrouplist.aspx.cs | C# | oos | 1,745 |
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.Admin.log
{
public partial class loglist :AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECLog.DeleteLog(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECLog.GetLogList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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)
{
ECLog.DeleteLogByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "loglist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/log/loglist.aspx.cs | C# | oos | 1,688 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="loglist.aspx.cs" Inherits="TREC.Web.Admin.log.loglist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="loginfo.aspx">添加日志</a></span><b>您当前的位置:首页 > 系统管理 > 操作日志</b>
</div>
<div class="spClear"></div>
<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="80px">操作模块</th>
<th align="center" width="80px">操作动作</th>
<th align="center" width="80px">操作人</th>
<th align="left">配置名称</th>
<th align="center" width="160px">时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><%#Eval("module")%></td>
<td align="center"><%#Eval("action")%></td>
<td align="center"><%#Eval("operatename")%></td>
<td align="left"><a href="loginfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><asp:TextBox ID="txtSort" runat="server" Text='<%#Eval("lastedittime") %>' Width="40" style="margin-left:10px;"></asp:TextBox></td>
<td align="right" style="padding-left:5px;"><a href="loginfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="loglist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/log/loglist.aspx | ASP.NET | oos | 3,651 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="loginfo.aspx.cs" Inherits="TREC.Web.Admin.log.loginfo" 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">
$(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");
}
});
$("#ddlmodule").live("change", (function () {
if ($(this).val() != "" && $(this).val() != "0") {
$.ajax({
url: "<%=TREC.ECommerce.ECommon.WebUrl %>/ajax/ajaxlog.ashx",
data: "type=getLogModuleType&module=" + $(this).val(),
dataType:"json",
success: function (data) {
$("#ddltype").hide();
$("#ddltype").show();
if (data != "") {
$("#ddltype").html();
$("#ddltype").html("<option value=\"0\">请选择</option>");
$.each(data, function (i) {
$("#ddltype").append("<option value=\"" + data[i].id + "\">" + data[i].name + "</option>");
});
}
}
});
}
}));
});
</script>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="loglist.aspx">返回列表</a></span><b>您当前的位置:首页 > 系统管理 > 操作日志</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="2" align="left">操作日志</th>
</tr>
<tr>
<td width="160px" align="right">
所属模块:
</td>
<td>
<asp:TextBox ID="txtmodeule" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
操作动作:
</td>
<td>
<asp:TextBox ID="txtaction" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
操作人ID :
</td>
<td>
<asp:TextBox ID="txtoperateid" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
操作人名称:
</td>
<td>
<asp:TextBox ID="txtoperatename" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
操作内容 :
</td>
<td>
<asp:TextBox ID="txttitle" runat="server" CssClass=" textarea w380" TextMode="MultiLine" Rows="3"></asp:TextBox>
</td>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
<tr>
<td align="right">
操作时间 :
</td>
<td>
<asp:Label ID="lblastedittime" runat="server"></asp:Label>
</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/Admin/log/loginfo.aspx | ASP.NET | oos | 5,264 |
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.Admin.log
{
public partial class loginfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnLog model = ECLog.GetLogInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
this.txtmodeule.Text = model.modeule.ToString();
this.txtaction.Text = model.action.ToString();
this.txtoperateid.Text = model.operateid.ToString();
this.txtoperatename.Text = model.operatename;
this.txttitle.Text = model.title;
this.lblastedittime.Text = model.lastedittime.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
TREC.Entity.EnLog 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 = ECLog.GetLogInfo(" where id=" + ECommon.QueryId);
}
if (model == null)
{
model = new EnLog();
model.lastedittime = DateTime.Now;
}
int modeule = int.Parse(this.txtmodeule.Text);
int action = int.Parse(this.txtaction.Text);
int operateid = int.Parse(this.txtoperateid.Text);
string operatename = this.txtoperatename.Text;
string title = this.txttitle.Text;
model.modeule = modeule;
model.action = action;
model.operateid = operateid;
model.operatename = operatename;
model.title = title;
int aid = ECLog.EditLog(model);
if (aid > 0)
{
UiCommon.JscriptPrint(this.Page, "编辑成功!", "loglist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/log/loginfo.aspx.cs | C# | oos | 2,687 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="brandlist.aspx.cs" Inherits="TREC.Web.Admin.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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="brandinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<table>
<tr>
<td><label>品牌搜索:</label><asp:TextBox ID="txtbranname" runat="server" CssClass="input"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" CssClass="submit" Text="提交"
onclick="btnSearch_Click" /></td>
</tr>
</table>
<div class="spClear"></div>
<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">品牌名</th>
<th align="center" width="160px">最后活动时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="brandinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><%#Eval("lastedittime")%></td>
<td align="right" style="padding-left:5px;"><a href="brandinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="brandlist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/brand/brandlist.aspx | ASP.NET | oos | 3,582 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="brandinfo.aspx.cs" Inherits="TREC.Web.Admin.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="<%=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=brand&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=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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="brandlist.aspx">返回列表</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">登陆账号信息</th>
</tr>
<tr>
<td width="390px" valign="top">
<table class="formTable" width="380px">
<tr>
<th colspan="2">品牌所属工厂:</th>
</tr>
<tr>
<td align="right" width="70">工厂查找:</td>
<td><asp:TextBox ID="txtSearch" runat="server" CssClass="w160 input"></asp:TextBox> <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></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380px">
<tr>
<th colspan="2">品牌信息:</th>
</tr>
<tr>
<td width="70px" align="right">
推荐属性:
</td>
<td >
<asp:CheckBoxList runat="server" ID="chkattribute" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList>
</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">
名称索引:
</td>
<td>
<asp:TextBox ID="txtletter" runat="server" CssClass="input required w160"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
品牌档位:
</td>
<td>
<asp:DropDownList ID="ddlspread" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
品牌材质:
</td>
<td>
<asp:DropDownList ID="ddlmaterial" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
品牌风格:
</td>
<td>
<asp:DropDownList ID="ddlstyle" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
品牌色系:
</td>
<td>
<asp:DropDownList ID="ddlcolor" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList>
</td>
</tr>
</table>
</td>
<td width="380px" valign="top">
<table class="formTable" width="380">
<tr>
<th colspan="2">图片信息:</th>
</tr>
<tr>
<td align="right" valign="top">形 象 图:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Brand, 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 type="file" class="upload" onchange="_upfile(this)" runat="server" /></a>
<span class="uploading">正在上传,请稍后……</span>
</div>
</div>
</td>
</tr>
<tr>
<td width="70px" align="right">企业标志:</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 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" path="<%=string.Format(TREC.Entity.EnFilePath.Brand, 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 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.Brand, 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 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.Brand, 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 type="file" class="upload" onchange="_upfile(this)" runat="server" /></a>
<span class="uploading">正在上传,请稍后……</span>
</div>
</div>
</td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">优化及配置:</th>
</tr>
<tr>
<td align="right">品牌网站:</td>
<td><asp:TextBox id="txthomepage" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td width="70px" align="right">关 键 字:</td>
<td><asp:TextBox id="txtkeywords" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">ICP备案:</td>
<td><asp:TextBox id="txticp" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">品牌风格:</td>
<td><asp:DropDownList ID="ddltemplate" runat="server"></asp:DropDownList></td>
</tr>
</table>
</td>
<td valign="top">
<table class="formTable" width="380">
<tr>
<th colspan="2">品牌介绍:</th>
</tr>
<tr>
<td colspan="2"><asp:TextBox id="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">品牌状态:</th>
</tr>
<tr>
<td width="90px" align="right">审核:</td>
<td><asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">上/下线:</td>
<td><asp:DropDownList ID="ddllinestatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td>
<asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
<tr>
<td align="right">
点击量 :
</td>
<td>
<asp:TextBox ID="txthits" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
最后修改 :
</td>
<td>
<asp:TextBox ID="txtlastedittime" runat="server" CssClass="input Wdate w160 required" onfocus="WdatePicker()"></asp:TextBox>
</td>
</tr>
<%} %>
</table>
</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/Admin/brand/brandinfo.aspx | ASP.NET | oos | 17,354 |
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.Admin.brand
{
public partial class brandsinfo : AdminPageBase
{
public string areaCode = "";
public EnBrand _brandInfo = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ddlbrand.Items.Clear();
ddlbrand.DataSource = ECBrand.GetBrandList(1, 20, "", out tmpPageCount);
ddlbrand.DataTextField = "title";
ddlbrand.DataValueField = "id";
ddlbrand.DataBind();
ddlbrand.Items.Insert(0, new ListItem("请选择", ""));
ddlauditstatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAuditStatus), ddlauditstatus);
ddlauditstatus.Items.Insert(0, new ListItem("请选择", ""));
ddllinestatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAuditStatus), ddllinestatus);
ddllinestatus.Items.Insert(0, new ListItem("请选择", ""));
chkattribute.Items.Clear();
WebControlBind.CheckBoxListBind(typeof(EnumAttribute), chkattribute);
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.txtletter.Text = model.letter;
WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute);
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.txtkeywords.Text = model.keywords;
this.ddltemplate.SelectedValue = model.template;
this.txthits.Text = model.hits.ToString();
this.txtsort.Text = model.sort.ToString();
this.txtlastedittime.Text = model.lastedittime.ToString();
this.ddlauditstatus.SelectedValue = model.auditstatus.ToString();
this.ddllinestatus.SelectedValue = model.linestatus.ToString();
}
}
}
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 = "";
}
int brandid = TypeConverter.StrToInt(ddlbrand.SelectedValue);
string title = txttitle.Text;
string letter = this.txtletter.Text;
string attribute = WebControlBind.CheckBoxListSelected(chkattribute);
string icp = this.txticp.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;
string keywords = this.txtkeywords.Text;
string template = ddltemplate.SelectedValue;
int hits = TypeConverter.StrToInt(this.txthits.Text);
int sort = TypeConverter.StrToInt(this.txtsort.Text);
DateTime lastedittime = DateTime.Now;
int auditstatus = TypeConverter.StrToInt(ddlauditstatus.SelectedValue);
int linestatus = TypeConverter.StrToInt(ddllinestatus.SelectedValue);
model.brandid = brandid;
model.title = title;
model.letter = letter;
model.attribute = attribute;
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.lasteditid = adminId;
model.lastedittime = lastedittime;
model.auditstatus = auditstatus;
model.linestatus = linestatus;
int aid = ECBrand.EditBrands(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.Brands, aid, EnFilePath.Surface));
}
if (thumb.Length > 0)
{
ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Brands, aid, EnFilePath.Thumb));
}
if (logo.Length > 0)
{
ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.Brands, aid, EnFilePath.Logo));
}
if (bannel.Length > 0)
{
ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Brands, aid, EnFilePath.Banner));
}
if (desimage.Length > 0)
{
ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.Brands, 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.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/Admin/brand/brandsinfo.aspx.cs | C# | oos | 8,566 |
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.Admin.brand
{
public partial class brandslist : AdminPageBase
{
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.GetBrandsList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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.DeleteBrandsByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "brandslist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/brand/brandslist.aspx.cs | C# | oos | 1,714 |
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.Admin.brand
{
public partial class brandlist : AdminPageBase
{
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 = "";
if (txtbranname.Text != "")
{
strWhere += " title like '%" + txtbranname.Text + "%' ";
}
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");
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
ShowData();
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/brand/brandlist.aspx.cs | C# | oos | 2,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.Admin.brand
{
public partial class brandinfo : AdminPageBase
{
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("请选择", ""));
ddlauditstatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAuditStatus), ddlauditstatus);
ddlauditstatus.Items.Insert(0, new ListItem("请选择", ""));
ddllinestatus.Items.Clear();
WebControlBind.DrpBind(typeof(EnumAuditStatus), ddllinestatus);
ddllinestatus.Items.Insert(0, new ListItem("请选择", ""));
chkattribute.Items.Clear();
WebControlBind.CheckBoxListBind(typeof(EnumAttribute), chkattribute);
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 != null ? _companyInfo.title : "无企业", _companyInfo != null ? model.companyid.ToString() : "0"));
this.ddlcompany.Enabled = false;
}
txttitle.Text = model.title;
this.txtletter.Text = model.letter;
WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute);
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.txthomepage.Text = model.homepage;
this.txtdescript.Text = model.descript;
this.txtkeywords.Text = model.keywords;
this.ddltemplate.SelectedValue = model.template;
this.txthits.Text = model.hits.ToString();
this.txtsort.Text = model.sort.ToString();
this.txtlastedittime.Text = model.lastedittime.ToString();
this.ddlauditstatus.SelectedValue = model.auditstatus.ToString();
this.ddllinestatus.SelectedValue = model.linestatus.ToString();
}
}
}
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;
}
int companyid = TypeConverter.StrToInt(ddlcompany.SelectedValue);
string title = txttitle.Text;
string letter = this.txtletter.Text;
string attribute = WebControlBind.CheckBoxListSelected(chkattribute);
string productcategory = "";
string style = ddlstyle.SelectedValue;
string material = ddlmaterial.SelectedValue;
string spread = ddlspread.SelectedValue;
string color = ddlcolor.SelectedValue;
string icp = this.txticp.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;
string keywords = this.txtkeywords.Text;
string template = ddltemplate.SelectedValue;
int hits = TypeConverter.StrToInt(this.txthits.Text);
int sort = TypeConverter.StrToInt(this.txtsort.Text);
DateTime lastedittime = DateTime.Now;
int auditstatus = TypeConverter.StrToInt(ddlauditstatus.SelectedValue);
int linestatus = TypeConverter.StrToInt(ddllinestatus.SelectedValue);
model.companyid = companyid;
model.title = title;
model.letter = letter;
model.attribute = attribute;
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.homepage = this.txthomepage.Text;
model.desimage = desimage;
model.descript = descript;
model.keywords = keywords;
model.template = template;
model.hits = hits;
model.sort = sort;
model.lasteditid = adminId;
model.lastedittime = lastedittime;
model.auditstatus = auditstatus;
model.linestatus = linestatus;
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/Admin/brand/brandinfo.aspx.cs | C# | oos | 11,223 |
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.Admin.brand
{
public partial class appbrandlist : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECAppBrand.DeleteAppBrand(TypeConverter.StrToInt(ECommon.QueryId));
}
if (ECommon.QueryEdit == "3" && ECommon.QueryId != "")
{
ECAppBrand.UpAppBrand(TypeConverter.StrToInt(ECommon.QueryId));
}
rptList.DataSource = ECAppBrand.GetAppBrandList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", 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, "批量删除成功!", "brandlist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/brand/appbrandlist.aspx.cs | C# | oos | 1,907 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="brandslist.aspx.cs" Inherits="TREC.Web.Admin.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" src="../script/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="brandsinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<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">品牌名</th>
<th align="center" width="160px">最后活动时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="brandsinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="center"><%#Eval("lastedittime")%></td>
<td align="right" style="padding-left:5px;"><a href="brandsinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="brandslist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/brand/brandslist.aspx | ASP.NET | oos | 3,260 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="brandsinfo.aspx.cs" Inherits="TREC.Web.Admin.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.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=brands&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=gettopbrand&v=" + $("#txtSearch").val(),
dataType: "json",
success: function (data) {
if (data != "") {
$("#ddlbrand").html();
$("#ddlbrand").html("<option value=\"\">请选择</option>");
$.each(data, function (i) {
$("#ddlbrand").append("<option value=\"" + data[i].id + "\">" + data[i].name + "</option>");
});
}
}
})
});
});
</script>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="brandslist.aspx">返回列表</a></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="3" align="left">登陆账号信息</th>
</tr>
<tr>
<td width="390px" valign="top">
<table class="formTable" width="380px">
<tr>
<th colspan="2">品牌所属工厂:</th>
</tr>
<tr>
<td align="right" width="70">工厂查找:</td>
<td><asp:TextBox ID="txtSearch" runat="server" CssClass="w160 input"></asp:TextBox> <input type="button" class="submit" value="查找" id="btnSearch" /></td>
</tr>
<tr>
<td align="right">选择工厂:</td>
<td><asp:DropDownList ID="ddlbrand" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380px">
<tr>
<th colspan="2">品牌信息:</th>
</tr>
<tr>
<td width="70px" align="right">
推荐属性:
</td>
<td >
<asp:CheckBoxList runat="server" ID="chkattribute" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList>
</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">
名称索引:
</td>
<td>
<asp:TextBox ID="txtletter" runat="server" CssClass="input required w160"></asp:TextBox>
</td>
</tr>
</table>
</td>
<td width="380px" valign="top">
<table class="formTable" width="380">
<tr>
<th colspan="2">图片信息:</th>
</tr>
<tr>
<td align="right" valign="top">形 象 图:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Brands, 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 type="file" class="upload" onchange="_upfile(this)" runat="server" /></a>
<span class="uploading">正在上传,请稍后……</span>
</div>
</div>
</td>
</tr>
<tr>
<td width="70px" align="right">企业标志:</td>
<td>
<div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Brands, 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 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" path="<%=string.Format(TREC.Entity.EnFilePath.Brands, 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 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.Brands, 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 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.Brands, 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 type="file" class="upload" onchange="_upfile(this)" runat="server" /></a>
<span class="uploading">正在上传,请稍后……</span>
</div>
</div>
</td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">优化及配置:</th>
</tr>
<tr>
<td align="right">品牌网站:</td>
<td><asp:TextBox id="txthomepage" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td width="70px" align="right">关 键 字:</td>
<td><asp:TextBox id="txtkeywords" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">ICP备案:</td>
<td><asp:TextBox id="txticp" runat="server" CssClass="input w160"></asp:TextBox></td>
</tr>
<tr>
<td align="right">品牌风格:</td>
<td><asp:DropDownList ID="ddltemplate" runat="server"></asp:DropDownList></td>
</tr>
</table>
</td>
<td valign="top">
<table class="formTable" width="380">
<tr>
<th colspan="2">品牌介绍:</th>
</tr>
<tr>
<td colspan="2"><asp:TextBox id="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="360"></asp:TextBox></td>
</tr>
</table>
<div class="spClear"></div>
<table class="formTable" width="380">
<tr>
<th colspan="2">品牌状态:</th>
</tr>
<tr>
<td width="90px" align="right">审核:</td>
<td><asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">上/下线:</td>
<td><asp:DropDownList ID="ddllinestatus" runat="server" CssClass="select selectNone" Width="160"></asp:DropDownList></td>
</tr>
<tr>
<td align="right">
排序 :
</td>
<td>
<asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
<tr>
<td align="right">
点击量 :
</td>
<td>
<asp:TextBox ID="txthits" runat="server" CssClass="input w160 required digits">0</asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
最后修改 :
</td>
<td>
<asp:TextBox ID="txtlastedittime" runat="server" CssClass="input Wdate w160 required" onfocus="WdatePicker()"></asp:TextBox>
</td>
</tr>
<%} %>
</table>
</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/Admin/brand/brandsinfo.aspx | ASP.NET | oos | 15,847 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="appbrandlist.aspx.cs" Inherits="TREC.Web.Admin.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" src="../script/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"></span><b>您当前的位置:首页 > 成员管理 > 登陆账号管理</b>
</div>
<div class="spClear"></div>
<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">品牌名</th>
<th align="center">经销商名</th>
<th align="center">工厂名称</th>
<th align="center">审核</th>
<th align="center" width="160px">最后活动时间</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="javascript:;"><%#Eval("brandtitle") %></a></td>
<td align="center"><%#Eval("dealetitle")%></td>
<td align="center"><%#Eval("companytitle")%></td>
<td align="center"><%#Eval("auditstatus").ToString() == "0" ? "<a href='brandlist.aspx?edit=3&id="+Eval("id")+"'>审核</a>" : "己审核" %></td>
<td align="center"><%#Eval("lastedittime")%></td>
<td align="right" style="padding-left:5px;"><a href="brandinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="brandlist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/brand/appbrandlist.aspx | ASP.NET | oos | 3,599 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="articleinfo.aspx.cs" Inherits="TREC.Web.Admin.article.articleinfo" %>
<%@ 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" />
<script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.2.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 %>/editor/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/fileupload.js"></script>
<script type="text/javascript" src="../script/function.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('#txtcontext', {
allowPreviewEmoticons: true,
allowImageUpload: true,
allowFileManager: true,
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
fileManagerJson:"<%=ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=article&id=<%=ECommon.QueryId %>",
<%} %>
allowMediaUpload: true,
});
});
//显示关闭高级选项
$("#upordown").toggle(function() {
$(this).text("关闭高级选项");
$(this).removeClass();
$(this).addClass("up-01");
$(".upordown").show();
}, function() {
$(this).text("显示高级选项");
$(this).removeClass();
$(this).addClass("up-02");
$(".upordown").hide();
});
});
</script>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="articlelist.aspx">返回列表</a></span><b>您当前的位置:首页 > 文档信息 > 文档信息</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="2" align="left">文档信息</th>
</tr>
<tr>
<td align="right" width="15%">
所属分类 :
</td>
<td align="left">
<asp:DropDownList ID="ddlcategory" runat="server" CssClass="select"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
文章标题 :
</td>
<td align="left">
<asp:TextBox ID="txttitle" runat="server" CssClass="input w380 required" maxlength="50" minlength="3" HintTitle="信息标题" HintInfo="控制在50个字数内,标题文本尽量不要太长。"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
推荐类别 :
</td>
<td align="left">
<asp:CheckBoxList ID="chkattribute" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList>
<span id="upordown" class="up-02">显示高级选项</span>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
文章作者 :
</td>
<td align="left">
<asp:TextBox ID="txtautho" runat="server" CssClass="input w250" maxlength="30" HintTitle="作者" HintInfo="控制在30个字数内,如“管理员”。">管理员</asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
文章来源 :
</td>
<td align="left">
<asp:TextBox ID="txtsource" runat="server" CssClass="input w250" maxlength="30" HintTitle="信息来源" HintInfo="控制在30个字数内,如“本站”。">本站</asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
连接地址 :
</td>
<td align="left">
<asp:TextBox ID="txtlinkurl" runat="server" CssClass="input w250" maxlength="150" HintTitle="内容外部连接" HintInfo="当信息为站外信息时,填写连接址 例;http://www.baidu.com,地址前缀http://必须填写,长度不超过150"></asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
文章排序 :
</td>
<td align="left">
<asp:TextBox ID="txtsort" runat="server" CssClass="input required number valid" size="10"
maxlength="10" HintTitle="信息排序" HintInfo="纯数字,数值越大越靠前。">0</asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
文章关键字 :
</td>
<td align="left">
<asp:TextBox ID="txtkeyword" runat="server" CssClass="input w250" maxlength="100" HintTitle="Meta关键字" HintInfo="用于搜索引擎,如有多个关健字请用英文的,号分隔,不填写将自动提取标题。"></asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
文章描述 :
</td>
<td align="left">
<asp:TextBox ID="txtdescript" runat="server" CssClass="textarea wh380"
maxlength="250" HintTitle="描述"
HintInfo="用于搜索引擎或内容描述,控制在250个字数内,不填写将自动提取内容前200个字符。" TextMode="MultiLine" ></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
文章副标题 :
</td>
<td align="left">
<asp:TextBox ID="txtsubtitle" runat="server" CssClass="input w250" ></asp:TextBox>
</td>
</tr>
<tr style="display:none">
<td align="right" >
文章索引 :
</td>
<td align="left">
<asp:TextBox ID="txtletter" runat="server" CssClass="input w250" ></asp:TextBox>
</td>
</tr>
<tr style="display:none">
<td align="right">
文章副分类 :
</td>
<td align="left">
<asp:TextBox ID="txtsubcategoryid" runat="server" CssClass="input w250" ></asp:TextBox>
</td>
</tr>
<tr style="display:none">
<td align="right">
文章图标 :
</td>
<td align="left">
<asp:HiddenField ID="hfico" runat="server" />
</td>
</tr>
<tr>
<td align="right">
文章缩略图 :
</td>
<td align="left">
<div class="fileUpload" path="<%=string.Format(EnFilePath.Article,EnFilePath.Thumb,ECommon.QueryId)%>">
<asp:HiddenField ID="hfthumb" 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">
文章幻灯图 :
</td>
<td align="left">
<div class="fileUpload" path="<%=string.Format(EnFilePath.Article,EnFilePath.Banner,ECommon.QueryId)%>">
<asp:HiddenField ID="hfbanner" 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">
文章内容 :
</td>
<td align="left">
<asp:TextBox ID="txtcontext" runat="server" CssClass="textarea" TextMode="MultiLine" cols="100" rows="8" style="width:100%;height:400px;" ></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">
浏览次数 :
</td>
<td align="left">
<asp:TextBox ID="txtclickcount" runat="server" CssClass="input required number valid" size="10"
maxlength="10" HintTitle="信息浏览次数" HintInfo="纯数字,本信息被阅读的次数。">0</asp:TextBox>
</td>
</tr>
</table>
<div style="margin-top:10px; text-align:center">
<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/Admin/article/articleinfo.aspx | ASP.NET | oos | 11,158 |
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.Admin.article
{
public partial class articlecategorylist :AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ECArticle.BindArticleCategory(ddlcategory);
ddlcategory.Items.Insert(0, new ListItem("请选择", ""));
WebControlBind.DrpBind(typeof(EnumAttribute), ddlattribute);
ddlattribute.Items.Insert(0, new ListItem("请选择", ""));
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECArticle.DeleteArticleCategory(TypeConverter.StrToInt(ECommon.QueryId));
}
if (ECommon.QueryEdit == "3" && ECommon.QueryId != "")
{
ECArticle.CategoryArticleNodeUp(TypeConverter.StrToInt(ECommon.QueryId));
}
string strWhere = "";
if (ddlattribute.SelectedValue != "")
{
strWhere += " and attribute like '%" + ddlattribute.SelectedValue + ",%'";
}
if (ddlcategory.SelectedValue != "" && ddlcategory.SelectedValue != "0")
{
strWhere += " and categoryid=" + ddlcategory.SelectedValue;
}
if (txtKeywords.Text != "")
{
strWhere += " and title like '%" + txtKeywords.Text + "%'";
}
rptList.DataSource = ECArticle.GetReaderArticleCategoryList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, "", "lft", "asc", out tmpPageCount);
rptList.DataBind();
AspNetPager1.RecordCount = tmpPageCount;
}
protected void btnSelect_Click(object sender, EventArgs e)
{
ShowData();
}
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)
{
ECArticle.DeleteArticleCategoryByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "articlecategorylist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/article/articlecategorylist.aspx.cs | C# | oos | 2,947 |
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.Admin.article
{
public partial class articlecategoryinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ECArticle.BindArticleCategory(ddlcategory);
chkattribute.Items.Clear();
WebControlBind.CheckBoxListBind(typeof(EnumAttribute), chkattribute);
if (ECommon.QueryPid != "")
{
ddlcategory.SelectedValue = ECommon.QueryPid;
}
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnArticleCategory model = ECArticle.GetArticleCategoryInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute);
this.txttitle.Text = model.title;
this.txtsubtitle.Text = model.subtitle;
this.txtletter.Text = model.letter;
this.ddlcategory.SelectedValue = model.parentid.ToString();
this.ddlcategory.Enabled = false;
this.hfico.Value = model.ico;
this.hfthumb.Value = model.thumb;
this.hfbanner.Value = model.banner;
this.txtkeyword.Text = model.keyword;
this.txtdescript.Text = model.descript;
this.txtcontext.Text = model.context;
this.txtlinkurl.Text = model.linkurl;
this.ddllinktype.SelectedValue = model.linktype.ToString();
this.txtindextemplate.Text = model.indextemplate;
this.txtlisttemplate.Text = model.listtemplate;
this.txtcontemplate.Text = model.contemplate;
this.txtsort.Text = model.sort.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnArticleCategory model = null;
string strErr = "";
if (this.txttitle.Text.Trim().Length == 0)
{
strErr += "分类名称不能为空!\\n";
}
if (strErr != "")
{
ScriptUtils.ShowMessage(this.Page, "msg", strErr);
return;
}
string attribute = WebControlBind.CheckBoxListSelected(chkattribute);
string title = this.txttitle.Text;
string subtitle = this.txtsubtitle.Text;
string letter = this.txtletter.Text;
int parentid = int.Parse(ddlcategory.SelectedValue);
string ico = this.hfico.Value;
string thumb = this.hfthumb.Value != null ? this.hfthumb.Value.EndsWith(",") ? this.hfthumb.Value.Substring(0, this.hfthumb.Value.Length - 1) : this.hfthumb.Value : "";
string banner = this.hfbanner.Value;
string keyword = this.txtkeyword.Text;
string descript = this.txtdescript.Text;
string context = this.txtcontext.Text;
string linkurl = this.txtlinkurl.Text;
int sort = int.Parse(this.txtsort.Text);
int linktype = int.Parse(this.ddllinktype.SelectedValue);
string indextemplate = this.txtindextemplate.Text;
string listtemplate = this.txtlisttemplate.Text;
string contemplate = this.txtcontemplate.Text;
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECArticle.GetArticleCategoryInfo(" where id=" + ECommon.QueryId);
}
if (model == null)
{
model = new EnArticleCategory();
model.othercon = "";
model.createtime = DateTime.Now;
model.createid = adminId;
model.lft = 0;
model.rgt = 0;
model.depth = "";
model.lev = 0;
}
model.attribute = attribute;
model.title = title;
model.subtitle = subtitle;
model.letter = letter;
model.parentid = parentid;
model.ico = ico;
model.thumb = thumb;
model.banner = banner;
model.keyword = keyword;
model.descript = descript;
model.context = context;
model.linkurl = linkurl;
model.sort = sort;
model.edittime = DateTime.Now;
model.editid = adminId;
model.linktype = linktype;
model.parentid = parentid;
model.indextemplate = indextemplate;
model.listtemplate = listtemplate;
model.contemplate = contemplate;
model.sort = sort;
int aid = ECArticle.EditArticleCategory(model);
if (aid > 0)
{
ECUpLoad upload = new ECUpLoad();
if (thumb.Length > 0)
{
upload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.ArticleCategory, EnFilePath.Thumb, aid));
}
if (banner.Length > 0)
{
upload.MoveFiles(banner.Split(','), string.Format(EnFilePath.ArticleCategory, aid, EnFilePath.Banner, aid));
}
StringBuilder imglist = Utils.GetImgUrl(txtcontext.Text);
if (imglist.ToString().Length > 0)
{
string strConFilePath = "";
foreach (string s in imglist.ToString().Split(','))
{
if (s.Contains(EnFilePath.tmpRootPath))
{
strConFilePath += s + ",";
}
}
if (strConFilePath.Length > 0)
{
ECArticle.UpCategoryConFilePath(ECommon.RepFilePathContent(model.context, EnFilePath.tmpRootPath, string.Format(EnFilePath.ArticleCategory, aid, EnFilePath.ConImage)), aid);
upload.MoveContentFiles(strConFilePath.Replace(EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.ArticleCategory, aid, EnFilePath.ConImage));
}
}
UiCommon.JscriptPrint(this.Page, "编辑成功!", "articlecategorylist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/article/articlecategoryinfo.aspx.cs | C# | oos | 7,061 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="articlecategoryinfo.aspx.cs" Inherits="TREC.Web.Admin.article.articlecategoryinfo" %>
<%@ 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" />
<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 %>/editor/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/fileupload.js"></script>
<script type="text/javascript" src="../script/function.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('#txtcontext', {
allowPreviewEmoticons: true,
allowImageUpload: true,
allowFileManager: true,
<%if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{ %>
fileManagerJson:"<%=ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=article&id=<%=ECommon.QueryId %>",
<%} %>
allowMediaUpload: true,
});
});
//显示关闭高级选项
$("#upordown").toggle(function() {
$(this).text("关闭高级选项");
$(this).removeClass();
$(this).addClass("up-01");
$(".upordown").show();
}, function() {
$(this).text("显示高级选项");
$(this).removeClass();
$(this).addClass("up-02");
$(".upordown").hide();
});
});
</script>
</head>
<body style="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="articlecategorylist.aspx">返回列表</a></span><b>您当前的位置:首页 > 文档信息 > 文档分类</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="2" align="left">文档分类</th>
</tr>
<tr>
<td align="right" width="15%">
所属分类 :
</td>
<td align="left">
<asp:DropDownList ID="ddlcategory" runat="server" CssClass="select"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">
分类名称 :
</td>
<td align="left">
<asp:TextBox ID="txttitle" runat="server" CssClass="input w380 required" maxlength="50" minlength="3" HintTitle="信息标题" HintInfo="控制在50个字数内,标题文本尽量不要太长。"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" >
分类索引 :
</td>
<td align="left">
<asp:TextBox ID="txtletter" runat="server" CssClass="input w250" ></asp:TextBox>
<label>[*请填写分类的英文/拼音/拼音首写]</label>
<span id="upordown" class="up-02">显示高级选项</span>
</td>
</tr>
<tr style="display:none">
<td align="right">
属性 :
</td>
<td align="left">
<asp:CheckBoxList ID="chkattribute" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
连接类型 :
</td>
<td align="left">
<asp:DropDownList ID="ddllinktype" runat="server" CssClass="select">
<asp:ListItem Text="默认连接类型" Value="0"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
首页模版 :
</td>
<td align="left">
<asp:TextBox ID="txtindextemplate" runat="server" CssClass="input w250" maxlength="30" HintTitle="首页模版" HintInfo="填写模版路径。">@template/article/index.aspx</asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
列表模版 :
</td>
<td align="left">
<asp:TextBox ID="txtlisttemplate" runat="server" CssClass="input w250" maxlength="30" HintTitle="列表模版" HintInfo="填写模版路径。">@template/article/list.aspx</asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
内容模版 :
</td>
<td align="left">
<asp:TextBox ID="txtcontemplate" runat="server" CssClass="input w250" maxlength="30" HintTitle="内容模版" HintInfo="填写模版路径。">@template/article/info.aspx</asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
连接地址 :
</td>
<td align="left">
<asp:TextBox ID="txtlinkurl" runat="server" CssClass="input w250" maxlength="150" HintTitle="内容外部连接" HintInfo="当信息为站外信息时,填写连接址 例;http://www.baidu.com,地址前缀http://必须填写,长度不超过150"></asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
分类关键字 :
</td>
<td align="left">
<asp:TextBox ID="txtkeyword" runat="server" CssClass="input w250" maxlength="100" HintTitle="Meta关键字" HintInfo="用于搜索引擎,如有多个关健字请用英文的,号分隔,不填写将自动提取标题。"></asp:TextBox>
</td>
</tr>
<tr class="upordown hide">
<td align="right">
分类描述 :
</td>
<td align="left">
<asp:TextBox ID="txtdescript" runat="server" CssClass="textarea wh380"
maxlength="250" HintTitle="描述"
HintInfo="用于搜索引擎或内容描述,控制在250个字数内,不填写将自动提取内容前200个字符。" TextMode="MultiLine" ></asp:TextBox>
</td>
</tr>
<tr style="display:none">
<td align="right">
分类副分类 :
</td>
<td align="left">
<asp:TextBox ID="txtsubtitle" runat="server" CssClass="input w250" ></asp:TextBox>
</td>
</tr>
<tr style="display:none">
<td align="right">
分类排序 :
</td>
<td align="left">
<asp:TextBox ID="txtsort" runat="server" CssClass="input required number valid" size="10"
maxlength="10" HintTitle="信息排序" HintInfo="纯数字,数值越大越靠前。">0</asp:TextBox>
</td>
</tr>
<tr style="display:none">
<td align="right">
分类图标 :
</td>
<td align="left">
<asp:HiddenField ID="hfico" runat="server" />
</td>
</tr>
<tr>
<td align="right">
分类缩略图 :
</td>
<td align="left">
<div class="fileUpload" path="<%=string.Format(EnFilePath.ArticleCategory,EnFilePath.Thumb,ECommon.QueryId)%>">
<asp:HiddenField ID="hfthumb" 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">
分类幻灯图 :
</td>
<td align="left">
<div class="fileUpload" path="<%=string.Format(EnFilePath.ArticleCategory,EnFilePath.Banner,ECommon.QueryId)%>">
<asp:HiddenField ID="hfbanner" 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">
分灯内容 :
</td>
<td align="left">
<asp:TextBox ID="txtcontext" runat="server" CssClass="textarea" TextMode="MultiLine" cols="100" rows="8" style="width:100%;height:400px;" ></asp:TextBox>
</td>
</tr>
</table>
<div style="margin-top:10px; text-align:center">
<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/Admin/article/articlecategoryinfo.aspx | ASP.NET | oos | 11,356 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="articlelist.aspx.cs" Inherits="TREC.Web.Admin.article.articlelist" %>
<%@ 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/function.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="articleinfo.aspx">添加文档</a></span><b>您当前的位置:首页 > 文档信息 > 文档列表</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50" align="center">请选择:</td>
<td>
<asp:DropDownList ID="ddlcategory" runat="server" CssClass="select"
onselectedindexchanged="ddlcategory_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
<asp:DropDownList ID="ddlattribute" runat="server" CssClass="select"
onselectedindexchanged="ddlattribute_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
</td>
<td width="50" align="right">关健字:</td>
<td width="150"><asp:TextBox ID="txtKeywords" runat="server" CssClass="keyword"></asp:TextBox></td>
<td width="60" align="center"><asp:Button ID="btnSelect" runat="server" Text="查询"
CssClass="submit" onclick="btnSelect_Click" /></td>
</tr>
</table>
<div class="spClear"></div>
<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="80px">所属分类</th>
<th align="left">文档标题</th>
<th align="center" width="160px">最后修改</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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="articlecategoryinfo.aspx?id=<%#Eval("categoryid") %>&edit=1"><%#Eval("title")%></a></td>
<td align="left"><a href="articleinfo.aspx?edit=1&id=<%#Eval("id") %>" style="text-decoration:underline"><strong><%#Eval("title")%></strong></a></td>
<td align="center"><%#Eval("edittime")%></td>
<td align="right" style="padding-left:5px;"><a href="articleinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="articlelist.aspx?edit=2&id=<%#Eval("id") %>" onclick="return confirm( '确定要删除这条记录吗? ');">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/article/articlelist.aspx | ASP.NET | oos | 4,545 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="articlecategorylist.aspx.cs" Inherits="TREC.Web.Admin.article.articlecategorylist" %>
<%@ 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.2.min.js"></script>
<script type="text/javascript" src="../script/function.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="articlecategoryinfo.aspx">添加分类</a></span><b>您当前的位置:首页 > 文档信息 > 文档分类</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="display:none">
<tr>
<td width="50" align="center">请选择:</td>
<td>
<asp:DropDownList ID="ddlcategory" runat="server" CssClass="select"></asp:DropDownList>
<asp:DropDownList ID="ddlattribute" runat="server" CssClass="select"></asp:DropDownList>
</td>
<td width="50" align="right">关健字:</td>
<td width="150"><asp:TextBox ID="txtKeywords" runat="server" CssClass="keyword"></asp:TextBox></td>
<td width="60" align="center"><asp:Button ID="btnSelect" runat="server" Text="查询"
CssClass="submit" onclick="btnSelect_Click" /></td>
</tr>
</table>
<div class="spClear"></div>
<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"> 分类名称</th>
<th align="center" width="240px">操作</th>
<th align="center" width="160px">最后修改</th>
<th width="80px" align="right" style="padding-left:5px;">修改/删除</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">
<%#TRECommon.HTMLUtils.GetSpacesString(TRECommon.TypeConverter.StrToInt(Eval("lev").ToString())*2) %>
<img align="absmiddle" src="../images/folder_open.gif"><img align="absmiddle" src="../images/t.gif">
<a href="articlecategoryinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title")%></a>
</td>
<td align="center">
<a href="articlecategorylist.aspx?edit=3&id=<%#Eval("id") %>">上移</a> |
<a href="articlelist.aspx?cid=<%#Eval("id")%>">管理文档</a> |
<a href="articlecategoryinfo.aspx?pid=<%#Eval("id")%>">添加子分类</a>
</td>
<td align="center"><%#Eval("edittime")%></td>
<td align="right" style="padding-left:5px;"><a href="articlecategoryinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="articlecategorylist.aspx?edit=2&id=<%#Eval("id") %>" onclick="return confirm( '确定要删除这条记录吗? ');">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" PageSize="50"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/article/articlecategorylist.aspx | ASP.NET | oos | 4,927 |
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.Admin.article
{
public partial class articleinfo : AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ECArticle.BindArticleCategory(ddlcategory);
chkattribute.Items.Clear();
WebControlBind.CheckBoxListBind(typeof(EnumAttribute), chkattribute);
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
EnArticle model = ECArticle.GetArticleInfo(" where id=" + ECommon.QueryId);
if (model != null)
{
WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute);
this.txttitle.Text = model.title;
this.txtsubtitle.Text = model.subtitle;
this.txtletter.Text = model.letter;
this.ddlcategory.SelectedValue = model.categoryid.ToString();
this.txtsubcategoryid.Text = model.subcategoryid;
this.hfico.Value = model.ico;
this.hfthumb.Value = model.thumb;
this.hfbanner.Value = model.banner;
this.txtkeyword.Text = model.keyword;
this.txtdescript.Text = model.descript;
this.txtcontext.Text = model.context;
this.txtsource.Text = model.source;
this.txtautho.Text = model.autho;
this.txtlinkurl.Text = model.linkurl;
this.txtclickcount.Text = model.clickcount.ToString();
this.txtsort.Text = model.sort.ToString();
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
EnArticle model = null;
string strErr = "";
if (this.txttitle.Text.Trim().Length == 0)
{
strErr += "title不能为空!\\n";
}
if (strErr != "")
{
ScriptUtils.ShowMessage(this.Page, "msg", strErr);
return;
}
string attribute = WebControlBind.CheckBoxListSelected(chkattribute);
string title = this.txttitle.Text;
string subtitle = this.txtsubtitle.Text;
string letter = this.txtletter.Text;
int categoryid = int.Parse(ddlcategory.SelectedValue);
string subcategoryid = this.txtsubcategoryid.Text;
string ico = this.hfico.Value;
string thumb = this.hfthumb.Value != null ? this.hfthumb.Value.EndsWith(",") ? this.hfthumb.Value.Substring(0, this.hfthumb.Value.Length - 1) : this.hfthumb.Value : "";
string banner = this.hfbanner.Value;
string keyword = this.txtkeyword.Text;
string descript = this.txtdescript.Text;
string context = this.txtcontext.Text;
string source = this.txtsource.Text;
string autho = this.txtautho.Text;
string linkurl = this.txtlinkurl.Text;
int clickcount = int.Parse(this.txtclickcount.Text);
int sort = int.Parse(this.txtsort.Text);
if (ECommon.QueryId != "" && ECommon.QueryEdit != "")
{
model = ECArticle.GetArticleInfo(" where id=" + ECommon.QueryId);
}
if (model == null)
{
model = new EnArticle();
model.othercon = "";
model.createtime = DateTime.Now;
model.createid = adminId;
}
model.attribute = attribute;
model.title = title;
model.subtitle = subtitle;
model.letter = letter;
model.categoryid = categoryid;
model.subcategoryid = subcategoryid;
model.ico = ico;
model.thumb = thumb;
model.banner = banner;
model.keyword = keyword;
model.descript = descript;
model.context = context;
model.source = source;
model.autho = autho;
model.linkurl = linkurl;
model.clickcount = clickcount;
model.sort = sort;
model.edittime = DateTime.Now;
model.editid = adminId;
int aid = ECArticle.EditArticle(model);
if (aid > 0)
{
ECUpLoad upload = new ECUpLoad();
if (thumb.Length > 0)
{
upload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Article, EnFilePath.Thumb, aid));
}
if (banner.Length > 0)
{
upload.MoveFiles(banner.Split(','), string.Format(EnFilePath.Article, aid, EnFilePath.Banner, aid));
}
StringBuilder imglist = Utils.GetImgUrl(txtcontext.Text);
if (imglist.ToString().Length > 0)
{
string strConFilePath = "";
foreach (string s in imglist.ToString().Split(','))
{
if (s.Contains(EnFilePath.tmpRootPath))
{
strConFilePath += s + ",";
}
}
if (strConFilePath.Length > 0)
{
ECArticle.UpConFilePath(ECommon.RepFilePathContent(model.context, EnFilePath.Article, string.Format(EnFilePath.Article, aid, EnFilePath.ConImage)), aid);
upload.MoveContentFiles(strConFilePath.Replace(EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Article, aid, EnFilePath.ConImage));
}
}
UiCommon.JscriptPrint(this.Page, "编辑成功!", "articlelist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/article/articleinfo.aspx.cs | C# | oos | 6,489 |
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.Admin.article
{
public partial class articlelist :AdminPageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
ECArticle.BindArticleCategory(ddlcategory);
ddlcategory.Items.Insert(0, new ListItem("请选择", ""));
WebControlBind.DrpBind(typeof(EnumAttribute),ddlattribute);
ddlattribute.Items.Insert(0, new ListItem("请选择", ""));
ShowData();
}
}
protected void ShowData()
{
if (ECommon.QueryEdit == "2" && ECommon.QueryId != "")
{
ECArticle.DeleteArticle(TypeConverter.StrToInt(ECommon.QueryId));
}
string strWhere = "";
if (ECommon.QueryCid != "")
{
ddlcategory.SelectedValue = ECommon.QueryCid;
}
if (ddlattribute.SelectedValue != "")
{
strWhere += " and attribute like '%" + ddlattribute.SelectedValue + ",%'";
}
if (ddlcategory.SelectedValue != "" && ddlcategory.SelectedValue != "0")
{
strWhere += " and categoryid=" + ddlcategory.SelectedValue;
}
if (txtKeywords.Text != "")
{
strWhere += " and title like '%" + txtKeywords.Text + "%'";
}
rptList.DataSource = ECArticle.GetReaderArticleList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount);
rptList.DataBind();
AspNetPager1.RecordCount = tmpPageCount;
}
protected void btnSelect_Click(object sender, EventArgs e)
{
ShowData();
}
protected void ddlcategory_SelectedIndexChanged(object sender, EventArgs e)
{
ShowData();
}
protected void ddlattribute_SelectedIndexChanged(object sender, EventArgs e)
{
ShowData();
}
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)
{
ECArticle.DeleteArticleByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist);
UiCommon.JscriptPrint(this.Page, "批量删除成功!", "articlelist.aspx", "Success");
}
}
}
} | 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/article/articlelist.aspx.cs | C# | oos | 3,106 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rolelist.aspx.cs" Inherits="TREC.Web.Admin.permission.rolelist" %>
<%@ 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/admin.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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="add"><a href="roleinfo.aspx">添加系列</a></span><b>您当前的位置:首页 > 系统管理 > 角色管理</b>
</div>
<div class="spClear"></div>
<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">角色名称</th>
<th width="80px" align="right" style="padding-left:5px;">操作</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"><a href="roleinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td>
<td align="right" style="padding-left:5px;"><a href="roleinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="rolelist.aspx?edit=2&id=<%#Eval("id") %>">删除</a></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
<div class="spClear"></div>
<div style="line-height:30px;height:30px;">
<div id="Pagination" class="right flickr">
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页"
NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div>
<div class="left">
<span class="btn_all" onclick="checkAll(this);">全选</span>
<span class="btn_bg">
<asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>
</span>
</div>
</div>
</form>
</body>
</html>
| 10aaa-10aaa | trunk/TRECommerce/TREC.Web/Admin/permission/rolelist.aspx | ASP.NET | oos | 3,141 |
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="moduleinfo.aspx.cs" Inherits="TREC.Web.Admin.permission.moduleinfo" %>
<%@ 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">
$(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="padding:10px;">
<form id="form1" runat="server">
<div class="navigation">
<span class="back"><a href="modulelist.aspx">返回列表</a></span><b>您当前的位置:首页 > 系统管理 > 模块信息</b>
</div>
<div class="spClear"></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
<tr>
<th colspan="2" align="left">模块信息</th>
</tr>
<tr>
<td width="160px" align="right">模块标题:</td>
<td align="left">
<asp:TextBox id="txttitle" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">模块标识:</td>
<td align="left">
<asp:TextBox id="txtmark" runat="server" CssClass="input"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">模块类型:</td>
<td align="left">
<asp:DropDownList ID="ddltype" runat="server" CssClass="select selectNone"></asp:DropDownList>
</td>
</tr>
<tr>
<td align="right">模块描述:</td>
<td align="left">
<asp:TextBox id="txtdescript" runat="server" CssClass="textarea w380" TextMode="MultiLine" Rows="3"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right">排序:</td>
<td align="left">
<asp:TextBox id="txtsort" runat="server" Width="40px" CssClass="input">0</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/Admin/permission/moduleinfo.aspx | ASP.NET | oos | 3,690 |