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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="modulelist.aspx.cs" Inherits="TREC.Web.Admin.permission.modulelist" %> <%@ 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="moduleinfo.aspx">添加系列</a></span><b>您当前的位置:首页 &gt; 系统管理 &gt; 模块管理</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="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="left"><a href="moduleinfo.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="moduleinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="modulelist.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>&nbsp;&nbsp; </span> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/modulelist.aspx
ASP.NET
oos
3,460
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.permission { public partial class actioninfo : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { ddlMoudle.DataSource = ECModule.GetModuleList(""); ddlMoudle.DataTextField = "title"; ddlMoudle.DataValueField = "id"; ddlMoudle.DataBind(); ddlMoudle.Items.Insert(0, new ListItem("请选择", "0")); WebControlBind.RadioBind(typeof(EnumActionType), raActionType); raActionType.Items.Insert(0, new ListItem("所有", "0")); raActionType.Items[0].Selected = true; if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnAction model = ECAction.GetActionInfo(" where id=" + ECommon.QueryId); if (model != null) { this.txttitle.Text = model.title; this.txtmark.Text = model.mark; this.txtdescript.Text = model.descript; this.txtsort.Text = model.sort.ToString(); this.ddlMoudle.SelectedValue = model.mid.ToString(); this.raActionType.SelectedValue = model.actype.ToString(); } } } protected void btnSave_Click(object sender, EventArgs e) { TREC.Entity.EnAction model = new TREC.Entity.EnAction(); string strErr = ""; if (this.txttitle.Text.Trim().Length == 0) { strErr += "title不能为空!\\n"; } if (this.txtmark.Text.Trim().Length == 0) { strErr += "mark不能为空!\\n"; } if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model.id = TypeConverter.StrToInt(ECommon.QueryId); if (model == null) { model =new EnAction(); } } string title = this.txttitle.Text; string mark = this.txtmark.Text; int mid = TypeConverter.StrToInt(ddlMoudle.SelectedValue); int actype = TypeConverter.StrToInt(raActionType.SelectedValue); string descript = this.txtdescript.Text; int sort = int.Parse(this.txtsort.Text); model.title = title; model.mark = mark; model.mid = mid; model.actype = actype; model.descript = descript; model.sort = sort; int aid = ECAction.EditAction(model); if (aid > 0) { UiCommon.JscriptPrint(this.Page, "编辑成功!", "actionlist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/actioninfo.aspx.cs
C#
oos
3,352
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; using TREC.Entity; using TREC.ECommerce; namespace TREC.Web.Admin.permission { public partial class setroleaction : System.Web.UI.Page { public List<EnModule> ModuleList = new List<EnModule>(); public List<EnAction> ActionList = new List<EnAction>(); public List<EnRoleActionDef> RoleActionDefList = new List<EnRoleActionDef>(); public List<EnRole> RoleList = new List<EnRole>(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { RoleList = ECRole.GetRoleList(""); if (ECommon.QueryRoleId == "") { Response.Redirect("setroleaction.aspx?rid=" + RoleList[0].id); } ModuleList = ECModule.GetModuleList(""); ActionList = ECAction.GetActionList(""); RoleActionDefList = ECRole.GetRoleActionDefList(" where roleid=" + ECommon.QueryRoleId); foreach (EnModule m in ModuleList) { if (RoleActionDefList.Where(x => x.moduleid == m.id && x.actionid==0).Count() > 0) { m.isRoleHas = 1; foreach (EnAction a in ActionList.Where(x => x.mid == m.id)) { a.isActionHas = 1; } } } foreach (EnAction a in ActionList) { if (RoleActionDefList.Where(x => x.actionid == a.id && x.moduleid == a.mid).Count() > 0) { a.isActionHas = 1; } } } } protected void lbtnUpAction_Click(object sender, EventArgs e) { string actions = hfactionValue.Value; if (actions != "") { ECRole.DelRoleActionDef(TypeConverter.StrToInt(hfRoleId.Value)); foreach (string s in actions.Split(',')) { if (s != "") { //s_2_4,m_4, EnRoleActionDef m = new EnRoleActionDef(); m.roleid = TypeConverter.StrToInt(hfRoleId.Value); if(s.Substring(0,2)=="m_") { m.moduleid = TypeConverter.StrToInt(s.Substring(s.IndexOf("_") + 1)); m.actionid = 0; } else { m.actionid = TypeConverter.StrToInt(s.Substring(s.IndexOf("_") + 1, s.LastIndexOf("_") - 2)); m.moduleid = TypeConverter.StrToInt(s.Substring(s.LastIndexOf("_") + 1)); } ECRole.EditRoleActionDef(m); } } UiCommon.JscriptPrint(this.Page, "权限设置成功!", "setroleaction.aspx?rid=" + hfRoleId.Value, "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/setroleaction.aspx.cs
C#
oos
3,383
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.permission { public partial class modulelist :AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECModule.DeleteModule(TypeConverter.StrToInt(ECommon.QueryId)); } List<EnModule> list=ECModule.GetModuleList(ECommon.QueryPageIndex, AspNetPager1.PageSize, "", out tmpPageCount); list.Sort(new EnModuleDescSort()); rptList.DataSource = list; 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) { ECModule.DeleteModuleByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "modulelist.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) { ECModule.UpModuleSort(TypeConverter.StrToInt(id), txtSort.Text == "" ? "0" : txtSort.Text); } } UiCommon.JscriptPrint(this.Page, "排序更新成功!", "modulelist.aspx", "Success"); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/modulelist.aspx.cs
C#
oos
2,519
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.permission { public partial class rolelist : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECRole.DeletEnRole(TypeConverter.StrToInt(ECommon.QueryId)); } rptList.DataSource = ECRole.GetRoleList(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) { ECRole.DeletEnRoleByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "rolelist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/rolelist.aspx.cs
C#
oos
1,726
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="actioninfo.aspx.cs" Inherits="TREC.Web.Admin.permission.actioninfo" %> <%@ 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="actionlist.aspx">返回列表</a></span><b>您当前的位置:首页 &gt; 系统管理 &gt; 操作权限</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="ddlMoudle" runat="server"></asp:DropDownList> </td> </tr> <tr> <td align="right">操作类型:</td> <td align="left"> <asp:RadioButtonList ID="raActionType" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:RadioButtonList> </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/actioninfo.aspx
ASP.NET
oos
3,920
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="actionlist.aspx.cs" Inherits="TREC.Web.Admin.permission.actionlist" %> <%@ 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="actioninfo.aspx">添加系列</a></span><b>您当前的位置:首页 &gt; 系统管理 &gt; 操作权限</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="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("mid") %></td> <td align="left"><a href="actioninfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td> <td align="right" style="padding-left:5px;"><a href="actioninfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="actioninfo.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>&nbsp;&nbsp; </span> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/actionlist.aspx
ASP.NET
oos
3,251
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.permission { public partial class actionlist : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECAction.DeletEnAction(TypeConverter.StrToInt(ECommon.QueryId)); } rptList.DataSource = ECAction.GetActionList(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) { ECAction.DeletEnActionByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "actionlist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/actionlist.aspx.cs
C#
oos
1,726
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.permission { public partial class moduleinfo : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddltype.Items.Clear(); WebControlBind.DrpBind(typeof(EnumModuleType), ddltype); ddltype.Items.Insert(0, new ListItem("请选择", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnModule model = ECModule.GetModuleInfo(" where id=" + ECommon.QueryId); if (model != null) { this.txttitle.Text = model.title; this.txtmark.Text = model.mark; this.txtdescript.Text = model.descript; this.ddltype.SelectedValue = model.type; this.txtsort.Text = model.sort.ToString(); } } } protected void btnSave_Click(object sender, EventArgs e) { TREC.Entity.EnModule model = new TREC.Entity.EnModule(); string strErr = ""; if (this.txttitle.Text.Trim().Length == 0) { strErr += "title不能为空!\\n"; } if (this.txtmark.Text.Trim().Length == 0) { strErr += "mark不能为空!\\n"; } if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model.id = TypeConverter.StrToInt(ECommon.QueryId); if (model == null) { model = new EnModule(); } } string title = this.txttitle.Text; string mark = this.txtmark.Text; string type = this.ddltype.SelectedValue; string descript = this.txtdescript.Text; int sort = int.Parse(this.txtsort.Text); model.title = title; model.mark = mark; model.descript = descript; model.type = type; model.sort = sort; int aid = ECModule.EditModule(model); if (aid > 0) { UiCommon.JscriptPrint(this.Page, "编辑成功!", "modulelist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/moduleinfo.aspx.cs
C#
oos
2,853
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.permission { public partial class roleinfo : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnRole model = ECRole.GetRoleInfo(" where id=" + ECommon.QueryId); if (model != null) { this.txttitle.Text = model.title; this.txtmark.Text = model.mark; this.txtdescript.Text = model.descript; this.txtsort.Text = model.sort.ToString(); } } } protected void btnSave_Click(object sender, EventArgs e) { TREC.Entity.EnRole model = new TREC.Entity.EnRole(); string strErr = ""; if (this.txttitle.Text.Trim().Length == 0) { strErr += "title不能为空!\\n"; } if (this.txtmark.Text.Trim().Length == 0) { strErr += "mark不能为空!\\n"; } if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model.id = TypeConverter.StrToInt(ECommon.QueryId); if (model == null) { model = new EnRole(); } } string title = this.txttitle.Text; string mark = this.txtmark.Text; string descript = this.txtdescript.Text; int sort = int.Parse(this.txtsort.Text); model.title = title; model.mark = mark; model.descript = descript; model.sort = sort; int aid = ECRole.EditRole(model); if (aid > 0) { UiCommon.JscriptPrint(this.Page, "编辑成功!", "rolelist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/roleinfo.aspx.cs
C#
oos
2,494
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="roleinfo.aspx.cs" Inherits="TREC.Web.Admin.permission.roleinfo" %> <%@ 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="rolelist.aspx">返回列表</a></span><b>您当前的位置:首页 &gt; 系统管理 &gt; 角色信息</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: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/roleinfo.aspx
ASP.NET
oos
3,450
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setroleaction.aspx.cs" Inherits="TREC.Web.Admin.permission.setroleaction" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>设置角色权限</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <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"); } ); if ("<%=ECommon.QueryRoleId %>" == "") { $(".actionPannel > ul > li:first-child a").addClass("cur"); } $(".nav").each(function () { if ($(this).hasClass("cur")) { $("#hfRoleId").attr("value", $(this).attr("id")); } }) $("a.n_chk,a.n_chkcur").live("click", function () { if ($(this).hasClass("n_chk")) { $(this).removeClass("n_chk"); $(this).addClass("n_chkcur"); } else { if ($(this).hasClass("n_chkcur")) { $(this).removeClass("n_chkcur"); $(this).addClass("n_chk"); } } }); $(".node > a.n_chk").live("click", function () { var subNodeObj = $(this).parent().next(".subNode"); $(subNodeObj).find("li > a.n_chk").addClass("n_chkcur"); $(subNodeObj).find("li > a.n_chk").removeClass("n_chk"); }) $(".node > a.n_chkcur").live("click", function () { var subNodeObj = $(this).parent().next(".subNode"); $(subNodeObj).find("li > a.n_chkcur").addClass("n_chk"); $(subNodeObj).find("li > a.n_chkcur").removeClass("n_chkcur"); }) $(".subNode > ul> li > a.n_chkcur").live("click", function () { var boolisAllF = false; $(this).parent().parent().find("li").each(function () { if ($(this).find("a.linkselect").hasClass("n_chk")) { boolisAllF = true; } }) if (boolisAllF) { $(this).parent().parent().parent().prev().find("a.linkselect").removeClass("n_chkcur"); if (!$(this).parent().parent().parent().prev().find("a.linkselect").hasClass("n_chk")) { $(this).parent().parent().parent().prev().find("a.linkselect").addClass("n_chk"); } } }) $(".subNode > ul> li > a.n_chk").live("click", function () { var boolisAllF = true; $(this).parent().parent().find("li").each(function () { if ($(this).find("a.linkselect").hasClass("n_chk")) { boolisAllF = false; } }) if (boolisAllF) { $(this).parent().parent().parent().prev().find("a.linkselect").removeClass("n_chk"); if (!$(this).parent().parent().parent().prev().find("a.linkselect").hasClass("n_chkcur")) { $(this).parent().parent().parent().prev().find("a.linkselect").addClass("n_chkcur"); } } }) $(".node > span.n_r").live("click", function () { if ($(this).parent().hasClass("open")) { $(this).parent().removeClass("open"); $(this).parent().addClass("close"); //$(this).parent().next(".subNode").animate({ height: '0px' }); $(this).parent().next(".subNode").hide(100); } else { if ($(this).parent().hasClass("close")) { $(this).parent().removeClass("close"); $(this).parent().addClass("open"); //$(this).parent().next(".subNode").animate({ height: 'auto' }); $(this).parent().next(".subNode").show(100); } } }) $("#lbtnUpAction").click(function () { var idList = ""; $(".actionPannel").find(".module").each(function () { if ($(this).find("a.linkselect").hasClass("n_chkcur")) { idList += $(this).find("a.linkselect").attr("id") + ","; } else { $(this).next(".subNode").find("a.n_chkcur").each(function () { idList += $(this).attr("id") + ","; }) } }) $("#hfactionValue").attr("value", idList); }) }) </script> <style type="text/css"> .actionPannel{width:100%; float:left;} .actionPannel ul{display:block; width:100%; float:left;} .actionPannel ul li{float:left; border-bottom:1px solid #E4E1FF; height:24px; line-height:24px; text-align:center;cursor:pointer;} .actionPannel ul li a{ border:1px solid #E4E1FF; display:block; margin:0px 5px 0px 5px; border-bottom:none; padding:0px 8px;} .actionPannel ul li a:Hover,.actionPannel ul li a.cur{background:url("../images/nav_bg.gif") repeat-x scroll 0 0 transparent; border:1px solid #E4E1FF; border-bottom:none;} .actionPannel .module{ float:left; display:block; height:24px; line-height:24px; font-weight:bold; float:left; padding-left:10px; width:100%; margin-top:10px; } .node span,.node a.n_chk,.node a.n_chkcur,.subNode a.n_chk,.subNode a.n_chkcur,.subNode span{width:16px; height:16px; display:block; float:left; background:url("../images/tree.gif"); background-repeat:no-repeat;} .node span.n_r{ background-position:-62px 0; cursor:pointer;} .close span.n_r{background-position:-44px 0} .node a.n_chk{ height:13px; width:13px; background-position:0px 0px; margin:3px 0px 0px 3px;} .node span.n_ico{ background-position:-80px -16px; margin:1px 0px 0px 3px;} .node a.n_t{display:block; float:left; height:18px; line-height:16px; margin-left:5px;} .node a.n_t:hover,.node a.n_t_cur{ background:#FFE6B0; border:1px solid #FFB951;} .subNode{margin-left:20px;} .subNode span.n_r{ background-position:-26px -18px;} .subNode a.n_chk{ height:13px; width:13px; background-position:0px 0px; margin:3px 0px 0px 3px; padding:0px;} .subNode span.n_ico{ background-position:-80px -32px; margin:1px 0px 0px 3px;} .node a.n_chk:hover,.subNode a.n_chk:hover{ background:url("../images/tree.gif"); background-repeat:no-repeat;background-position:0 -12px } .node a.n_chkcur:hover,.subNode a.n_chkcur:hover{background:url("../images/tree.gif"); background-repeat:no-repeat;background-position:0 -36px} .node a.n_chkcur,.subNode a.n_chkcur{height:13px; width:13px; background-position:0 -24px; margin:3px 0px 0px 3px; padding:0px;} .subNode ul li{display:block; background:none;} .subNode ul li a{display:block;text-align:left; line-height:16px; float:left; margin-left:0px;} .subNode ul li,.subNode ul li a,.subNode ul li a:hover{border:none; background:none;} </style> </head> <body style="padding:10px;"> <form id="form1" runat="server"> <div class="navigation"> <span class="add">&nbsp;</span><b>您当前的位置:首页 &gt; 系统管理 &gt; 设置角色权限</b> </div> <div class="spClear"></div> <div class="actionPannel"> <ul> <%foreach (EnRole r in RoleList) { %> <li><a href="setroleaction.aspx?rid=<%=r.id %>" class="<%=UiCommon.QueryStringCur("rid", r.id.ToString(), "", "cur")%> nav" id="<%=r.id %>"><%=r.title %></a></li> <%} %> </ul> <%foreach(EnModule m in ModuleList){ %> <div class="module node open"><span class="n_r"></span><a class="linkselect <%=m.isRoleHas == 1 ? "n_chkcur" : "n_chk"%>" id="m_<%=m.id %>"></a><span class="n_ico"></span><a href="javascript:;" class="n_t"><%=m.title %></a></div> <div class="subNode"> <ul> <%foreach (EnAction a in ActionList.Where(x=>x.mid==m.id).ToList()) { %> <li><span class="n_r"></span><a class="linkselect <%=a.isActionHas == 1 ? "n_chkcur" : "n_chk"%>" id="s_<%=a.id %>_<%=m.id %>"></a><span class="n_ico"></span><a href="javascript:;"><%=a.title %></a></li> <%} %> </ul> </div> <%} %> </div> <div class="spClear"></div> &nbsp;&nbsp; <span class="btn_bg"> <asp:LinkButton ID="lbtnUpAction" runat="server" OnClientClick="return confirm( '确定要更新该角色的权限? ');" onclick="lbtnUpAction_Click" >更新</asp:LinkButton>&nbsp;&nbsp; </span> <asp:HiddenField ID="hfactionValue" runat="server" /> <asp:HiddenField ID="hfRoleId" runat="server" /> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/permission/setroleaction.aspx
ASP.NET
oos
9,811
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="TREC.Web.Admin.index" %> <%@ 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" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/common.js"></script> <script type="text/javascript" src="script/admin.js"></script> <style type="text/css"> html,body,form{height:100%;} table{ background:#EBF5FC;} table td{ vertical-align:top; text-align:left; padding:0px; margin:0px;} .navPoint{ font-family:Webdings; color:#fff; font-size:9pt; cursor:hand; cursor:pointer; vertical-align:middle;} td.n{vertical-align:middle; text-align:left; cursor:pointer; padding:0px; margin:0px; border:0px; background:url("images/main_cen_bg.gif") repeat-x scroll 0 0 transparent; height:100%;} </style> </style> </head> <body style="margin:0 0 0 0; height:100%;"> <table cellpadding="0" cellspacing="0" style="width:100%; height:100%;" border="0"> <tr> <td style="height:60px; width:100%" colspan="3"> <iframe id="topFrame" style="Z-index: 1; visibility: inherit; width: 100%; height: 60px" src="top.aspx" frameborder="0" scrolling="no"></iframe> </td> </tr> <tr> <td width="width:100"> <table style="height:100%; width:100%"> <tr> <td style="width:159px; height:100%;" id="tableLeftMenu"> <iframe id="frmLeft" name="frmLeft" style="width: 159px; height: 100%" src="menu.aspx" frameborder="0" scrolling="no"></iframe> </td> <td width="8px;" id="tableLeftMenuBar" class="n"><div style="cursor:pointer;" id="sysBar"><img alt="关闭/打开左栏" src="images/butClose.gif" id="barImg"></div></td> <td id="tableConvertMain" style="background:#fff;"> <iframe id="frmmain" name="frmmain" style="width: 100%; height: 100%" src="main.aspx" frameborder="0"></iframe> </td> </tr> </table> </td> </tr> </table> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/index.aspx
ASP.NET
oos
2,526
*{ scrollbar-face-color:#E6F2FD; scrollbar-highlight-color:#ffffff; scrollbar-shadow-color:#D6E4EF; scrollbar-3dlight-color:#F1F9FF; scrollbar-arrow-color:#006699; scrollbar-track-color:#F1F9FF; scrollbar-darkshadow-color:#F1F9FF; color:#666; font-family:Verdana, Geneva, sans-serif; font-size:12px; } body{ margin:0px; color:#666; background-color:#FFF; font-family:Verdana, Geneva, sans-serif; font-size:12px; } form,ul,li{ margin:0px; list-style-type:none; padding:0px; } table { empty-cells: show; border-collapse: collapse; } a{ color:#005eac; text-decoration:none; } a:visited,a:active{ color:#005eac; } a:hover{ color:#ff5500; } img{ border:0px; vertical-align:middle; } h1{ font-size:14px; } .w160{width:160px;} .w250{width:250px;} .w380{width:380px;} .wh380{width:380px; height:50px;} .submit{ background:url(../images/button_submit.gif) repeat-x #e3f1fa; border:1px solid #aed0ea; padding:0px 10px; height:24px; line-height:24px; color:#3d80b3; cursor:pointer; } .input{ padding:0px 3px; border:1px solid #d1d1d1; background:url(../images/input_bg.jpg) repeat-x; height:22px; line-height:22px; font-size:12px; color:#999; } .textarea{ padding:3px; border:1px solid #d1d1d1; background:url(../images/input_bg.jpg) repeat-x; font-size:12px; color:#999; } .focus{ border:1px solid #FC0 !important; background:url(../images/focus_bg.jpg) repeat-x !important; color:#00F !important; } .select{ padding:1px; border: 1px solid #CDCDCD; background:#FDFEEF; height:22px; line-height:22px; } .keyword{ border: 1px solid #CDCDCD; background:#FDFEEF; height:20px; line-height:20px; overflow:hidden; } .login_input{ padding:2px 2px 2px 5px; color:#999; font-size:12px; width:150px; height:1.5em; line-height:1.5em; border:1px solid #d1d1d1; background:url(../images/input_bg.jpg) repeat-x; } #login_body{ position:absolute; margin-top:-140px; width:727px; height:230px; margin-left:-350px; top:50%; left:50%; } #login_div{ background:url(../images/login_bg.jpg); width:727px; height:200px; } .login_btn{ width:82px; height:81px; margin:25px 0 0 20px; _margin-left:0px; } #login_form_div { margin-left:400px; line-height:26px; padding-top:30px; } #login_form_div table{ padding:20px; font-size:14px; line-height:26px; } .tipbox{ font-size:12px; color:#F00; line-height:26px; } input,select,textarea{float:left; margin:0px 2px;} label{ display:block; height:22px; float:left; line-height:26px;} .checkall{margin-left:7px; display:block;} input[type="radio"]{margin-top:6px; margin-left:5px;} input[type="checkbox"]{margin-top:6px; margin-left:5px;} .left{ float:left; } .right{ float:right; } .clear{ clear:both; } .spClear{ clear:both;height:10px; } .mouse{ cursor:pointer; } #login_footer { text-align:center; color:#999999; } /* 顶部菜单 */ #tabs{ float:right; margin-bottom:2px; font-family:"微软雅黑"; font-size:14px; width:auto; line-height:normal; } #tabs ul{ margin:0; padding:26px 10px 0 0px !important; *padding:27px 10px 0 0px !important; padding:27px 10px 0 0px; list-style:none; } #tabs ul li{ display:inline; margin:0; padding:0; } #tabs ul li a{ float:left; margin:0; padding:0 0 0 4px; background:url(../images/"tabsleft.gif") no-repeat left top; text-decoration:none; } #tabs ul li a span{ float:left; display:block; color:#039; background:url(../images/"tabsright.gif") no-repeat right top; padding:6px 8px 6px 6px; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ #tabs ul li a span{ float:none; } /* End IE5-Mac hack */ #tabs ul li a:hover{ background-position:0% -42px; } #tabs ul li a:hover span{ color:#5A6AB1; background-position:100% -42px; color:#F5F5F5; } #tabs .hover a{ background:url(../images/"tabsleft.gif") no-repeat; background-position:0% -42px; } #tabs .hover a span{ background:url(../images/"tabsright.gif") no-repeat; background-position:100% -42px; color:#F5F5F5; } /* 左边导航菜单 */ .left_menu{ text-align:left; font-family:"微软雅黑"; } .left_menu ul{ margin-top:10px;padding-left:10px;} .left_menu ul li{padding-left:15px;background:url(../images/left_menu_bg.gif) no-repeat;} .left_menu ul li a{padding-left:10px;line-height:25px;background:url(../images/ico_01.gif) 0px center no-repeat;} /* 当前位置 */ .navigation{ padding:6px 10px 6px 5px; color:#2F7EAE; border:1px solid #E4E1FF; background:url(../images/nav_bg.gif) repeat-x; } .navigation b{ padding-left:25px; font-weight:normal; background:url(../images/home.gif) 5px center no-repeat #F8F7FF; } .navigation .add{ float:right; padding-left:15px; background:url(../images/add.gif) no-repeat 0 0; } .navigation .lft { float:left; margin-left:10px; } .navigation .back{ float:right; padding-left:15px; background:url(../images/back.gif) no-repeat 0 0; } .navCur{padding:0px; height:28px;} .navCur span{margin-left:20px;} .navCur span.add,.navCur .back{display:block; float:left; margin-top:8px;} .navCur span.t { background:url(../images/subnav.gif) no-repeat 0 0; width:74px; padding:0px; height:28px; display:block; float:left; text-align:left; } .navCur span.cur{background:url(../images/subnav_cur.gif) no-repeat 0 0;} .navCur span.t a{line-height:30px; display:block; text-align:center;} .warning{ padding:8px 10px 8px 30px; border:1px solid #FAF4B8; color:#C52716; background:url(../images/warning.gif) 8px center no-repeat #FEFDE9; } .correct{ padding:8px 10px 8px 30px; border:1px solid #CCF9C1; color:#090; background:url(../images/correct.gif) 8px center no-repeat #F1FEF2; } .disable{ padding:8px 10px 8px 30px; border:1px solid #F9F2B7; color:#F00; background:url(../images/disable.gif) 8px center no-repeat #FDF8E8; } .btn_bg a{ padding:1px 8px; color:#000; border:1px solid #70b1cf; background:url(../images/btn_bg.gif) repeat-x; } .btn_all{ padding:1px 8px; color:#000; border:1px solid #70b1cf; background:url(../images/btn_bg.gif) repeat-x; cursor:pointer; } .msgtable{ border:1px solid #EDECFF; } .msgtable th{ padding:0.5em; font-weight:700; /*border:1px solid #EDECFF;*/ } .msgtable td{ padding:0.4em; border-bottom:1px solid #F3F3F3; } .msgtable th{ /*background:#F8F7FF;*/ background:url(../images/table_th_bg.gif) repeat-x bottom; } .msgtable td span.line{display:block; float:left;width:100%; margin:3px 0px;} .msgtable tr.line{ /*background:#F8F7FF;*/ background:url(../images/table_th_bg.gif) repeat-x bottom; } table.tableSub{border:0px; width:100%;} table.tableSub td{border:0px; border:1px #777 solid;} table.tableSub td.t{background:#e3e3e3; font-weight:bold;} .tr_bg{background:#F9F9F9;} .tr_hover_col{background:#EAEAEA;} .navtable{padding:0.6em;border:1px solid #EDECFF;} .navtable td{width:80px;} .title5 { background: url(../images/"titlebg2.gif"); width: 80px; cursor: hand; line-height: 120%; padding-top: 2px; text-align: center; height: 20px; } .title6 { font-weight: normal; background: url(../images/"titlebg1.gif"); width: 80px; cursor: hand; color: #ffffff; padding-top: 2px; text-align: center; height: 20px; } /*提示文字样式*/ #HintMsg{ width:271px; position:absolute; display:none; } #HintMsg .HintTop{ height:9px; background:url(../images/hintbg1.gif) no-repeat; overflow:hidden; } #HintMsg .HintInfo{ padding:0 5px; border-left:1px solid #000; border-right:1px solid #000; background:#FFFFE1; line-height:1.5em; } #HintMsg .HintInfo b{ display:block; margin-bottom:6px; padding-left:15px; background:url(../images/hint.gif) left center no-repeat; height:13px; line-height:16px; } #HintMsg .HintInfo b span{ display:block; float:right; text-indent:-9999px; background:url(../images/close.gif) no-repeat; width:12px; height:12px; cursor:pointer; } #HintMsg .HintFooter{ height:22px; background:url(../images/hintbg2.gif) no-repeat; } /*设置提示样式*/ .icon-01{ margin:0; padding:10px 0 0 80px; color:#4D4D4D; font-family:"微软雅黑"; line-height:1.8em; min-height:60px; background:url(../images/icon-01.gif) no-repeat 10px 10px; } .icon-02{ margin:0; padding:10px 0 0 80px; color:#4D4D4D; font-family:"微软雅黑"; line-height:1.8em; min-height:60px; background:url(../images/icon-02.gif) no-repeat 10px 10px; } .icon-03{ margin:0; padding:10px 0 0 80px; color:#4D4D4D; font-family:"微软雅黑"; line-height:1.8em; min-height:60px; background:url(../images/icon-03.gif) no-repeat 10px 10px; } .icon-01 b{ display:block; color:#090; font-size:14px; line-height:2.0em; } .icon-02 b{ display:block; color:#F00; font-size:14px; line-height:2.0em; } .icon-03 b{ display:block; color:#FC0; font-size:14px; line-height:2.0em; } /*页面居中显示*/ .pcent{ top:35%; right:35%; position:absolute; display:none; z-index:100000; } /*验证表单样式*/ span.error{ margin-left:5px; padding-left:25px; color:#F00; background:url(../images/error.gif) left center no-repeat; } span.success{ margin-left:5px; padding-left:25px; color:#999; background:url(../images/success.gif) left center no-repeat; } span.error,span.success{ display:block; height:22px; float:left; line-height:22px;} /*其它样式*/ .hide{display:none;} .up-01,.up-02{ display:block; float:left; padding-left:20px; cursor:pointer; line-height:17px; font-weight:700; } .up-01{ background:url(../images/top_ico1.gif) no-repeat 0 center; } .up-02{ background:url(../images/top_ico2.gif) no-repeat 0 center; } /*大图预览提示*/ #imgtip{ position:absolute; border:1px solid #ccc; background:#fff; padding:2px; display:none; } .comment{ color:#06F; line-height:1.0em; } /*图文列表显示样式*/ .pro_img_list{margin:0;padding:0;min-width:800px;position:relative;} .pro_img_list ul{margin:0 0 0 -20px;} .pro_img_list ul li{float:left;margin:0 0 10px 20px;padding:5px 10px;width:120px;height:168px;border:1px solid #bce5f8;background:url(../images/pro_bg.gif) repeat-x;overflow:hidden;} .pro_img_list ul li .nTitle{padding-bottom:5px;line-height:20px;height:20px;color:#005eac;} .pro_img_list ul li .nImg img{width:120px;height:120px;} .pro_img_list ul li .nBtm{padding-top:5px;height:16px;} .pro_img_list ul li .nBtm img{vertical-align:middle;} /*file容器样式*/ .fileUpload .input{height:18px; line-height:18px;} .fileUpload .fileTools{margin-bottom:3px; float:left;} .fileTools a._filedel,.fileTools a._filesee{display:block; width:12px; line-height:24px; height:18px; float:left; margin-left:4px; text-decoration:underline;} a._filesee .seeupfile{display:block; position:absolute; border:1px solid; z-index:1000000; background:#ccc;} a.files {margin:0 auto;float:left; width:64px;height:22px;overflow:hidden;display:block;border:1px solid #70b1cf;background:url(../images/upfilebg.gif) left top no-repeat;text-decoration:none;} /*file设为透明,并覆盖整个触发面*/ a.files input {margin-left:-240px;font-size:20px;cursor:pointer;filter:alpha(opacity=0);opacity:0;} /*取消点击时的虚线框*/ a.files, a.files input{outline:none;/*ff*/hide-focus:expression(this.hideFocus=true);/*ie*/ height:18px; line-height:18px;} /*上传文件时切换图片*/ .filesbg2{background:url(../images/upfilebg2.gif) left top no-repeat!important;} .uploading{float:left;background:url(../images/loading.gif) no-repeat left center;padding-left:18px;display:none;line-height:20px;height:20px;} .line5 {clear:both;font-size:1px;height:5px;overflow:hidden;} /*图文容器样式*/ a.upfiles {margin:0 auto;width:90px;height:30px;overflow:hidden;display:block;border:1px solid #BEBEBE;background:url(../images/btn_upload.gif) left top no-repeat;text-decoration:none;} a.upfiles:hover {background-color:#FFFFEE;background-position:0 -30px;} /*file设为透明,并覆盖整个触发面*/ a.upfiles input {margin-left:-350px;font-size:30px;cursor:pointer;filter:alpha(opacity=0);opacity:0;} /*取消点击时的虚线框*/ a.upfiles, a.upfiles input{outline:none;/*ff*/hide-focus:expression(this.hideFocus=true);/*ie*/} /*相框图片显示*/ .imgbox{border:2px solid #999;padding:10px;width:180px;height:180px;text-align:center;vertical-align:baseline;background:url(../images/noimg.gif) no-repeat center center;} .imgbox img{max-width:180px;max-height:180px;/*IE6*/_width:expression(this.width>180&&this.width>this.height?180:true);_height:expression(this.height>180?180:true);} .imgItems{margin-top:5px;width:204px;overflow:hidden;} .imgItems ul{width:220px;list-style:none;} .imgItems ul li{float:left;margin:0 10px 5px 0; border:1px solid #EEE;padding:3px;width:53px;height:73px;text-align:center;vertical-align:baseline;position:relative;} .imgItems ul li img{border-width:0px;max-width:50px;max-height:50px;vertical-align:baseline;/*IE6*/_width:expression(this.width>50&&this.width>this.height?50:true);_height:expression(this.height>50?50:true);} .imgItems ul li a{top:58px; left:3px; width:44px; position:absolute; background:#999; padding-left:10px;display:block;background:url(../images/delimg.gif) no-repeat 5px 2px;text-decoration:none;font-size:12px;color:#333;cursor:pointer;line-height:18px;height:18px;overflow:hidden;} .imgItems ul li a:hover{text-decoration:none;color:#999;background-position:5px -11px;} .filebtn{text-align:center;width:200px;} /*评论样式*/ .comment .user{margin-top:5px;color:#999999;text-align:right;} .comment .user span{margin-left:15px;} .comment .user span.left{margin-left:0;color:#666;line-height:150%;font-weight:bold;} .comment .ask{margin-bottom:5px;color:#666;overflow:hidden;line-height:150%;} .comment .ask dt{float:left;text-align:right;width:80px;} /*.comment .ask dt b,*/.comment .answer dt b{display:block;float:left;margin:2px 3px 0 0;width:14px;height:13px;background:url(../images/icon_reviews.gif) no-repeat;} .comment .ask dt b{position:relative;display:block;float:left;margin:2px 3px 0 0;width:14px;height:13px;/*background-position:-15px -14px;*/} .comment .answer{color:#D75509;line-height:150%;} .comment .answer dt{float:left;text-align:right;width:80px;} .comment .answer dt b{background-position:0 -14px;} .comment .grade1,.comment .grade2,.comment .grade3,.comment .grade4,.comment .grade5{display:inline-block;width:64px;height:12px;background:url(../images/icon_reviews.gif) no-repeat; overflow:hidden;} .comment .grade1{background-position:-52px 0;} .comment .grade2{background-position:-39px 0;} .comment .grade3{background-position:-26px 0;} .comment .grade4{background-position:-13px 0;} .comment .grade5{background-position:0 0;} .TipDiv{ float:left; line-height:22px;} .color{border:1px solid #e3e3e3;width:60px; height:22px; line-height:22px;} ul.nav{display:block; width:100%; float:left; margin:8px 0px;} ul.nav li{float:left; border-bottom:1px solid #E4E1FF; height:24px; line-height:24px; text-align:center;cursor:pointer;} ul.nav li a{ border:1px solid #E4E1FF; display:block; margin:0px 5px 0px 5px; border-bottom:none; padding:0px 8px;} ul.nav li a:Hover,ul.nav li a.cur{background:url("../images/nav_bg.gif") repeat-x scroll 0 0 transparent; border:1px solid #E4E1FF; border-bottom:none;} .formTable{border:1px solid #ccc;} .formTable tr th{background:#ededed; text-align:left;} .formTable tr td{border:none; padding-top:8px; padding-bottom:8px;} .info{padding:6px 10px 6px 5px; float:left; height:auto; border:1px solid #f60; background:#CBFCC9;}
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/css/style.css
CSS
oos
15,882
/* ----------------------------------------------------------------------------------------------------------------*/ /* ---------->>> global settings needed for thickbox <<<-----------------------------------------------------------*/ /* ----------------------------------------------------------------------------------------------------------------*/ *{padding: 0; margin: 0;} /* ----------------------------------------------------------------------------------------------------------------*/ /* ---------->>> thickbox specific link and font settings <<<------------------------------------------------------*/ /* ----------------------------------------------------------------------------------------------------------------*/ #TB_window { font: 12px Arial, Helvetica, sans-serif; color: #333333; } #TB_secondLine { font: 10px Arial, Helvetica, sans-serif; color:#666666; } #TB_window a:link {color: #666666;} #TB_window a:visited {color: #666666;} #TB_window a:hover {color: #000;} #TB_window a:active {color: #666666;} #TB_window a:focus{color: #666666;} /* ----------------------------------------------------------------------------------------------------------------*/ /* ---------->>> thickbox settings <<<-----------------------------------------------------------------------------*/ /* ----------------------------------------------------------------------------------------------------------------*/ #TB_overlay { position: fixed; z-index:100; top: 0px; left: 0px; height:100%; width:100%; } .TB_overlayMacFFBGHack {background: url(macFFBgHack.png) repeat;} .TB_overlayBG { background-color:#000; filter:alpha(opacity=75); -moz-opacity: 0.75; opacity: 0.75; } * html #TB_overlay { /* ie6 hack */ position: absolute; height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } #TB_window { position: fixed; background: #ffffff; z-index: 102; color:#000000; display:none; border: 4px solid #525252; text-align:left; top:50%; left:50%; } * html #TB_window { /* ie6 hack */ position: absolute; margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); } #TB_window img#TB_Image { display:block; margin: 15px 0 0 15px; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; border-top: 1px solid #666; border-left: 1px solid #666; } #TB_caption{ height:25px; padding:7px 30px 10px 25px; float:left; } #TB_closeWindow{ height:25px; padding:11px 25px 10px 0; float:right; } #TB_closeAjaxWindow{ padding:7px 10px 5px 0; margin-bottom:1px; text-align:right; float:right; } #TB_ajaxWindowTitle{ float:left; padding:7px 0 5px 10px; margin-bottom:1px; } #TB_title{ background-color:#e8e8e8; height:27px; width:102%; } #TB_ajaxContent{ clear:both; padding:2px 15px 15px 15px; overflow:auto; text-align:left; line-height:1.4em; } #TB_ajaxContent.TB_modal{ padding:15px; } #TB_ajaxContent p{ padding:5px 0px 5px 0px; } #TB_load{ position: fixed; display:none; height:13px; width:208px; z-index:103; top: 50%; left: 50%; margin: -6px 0 0 -104px; /* -height/2 0 0 -width/2 */ } * html #TB_load { /* ie6 hack */ position: absolute; margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px'); } #TB_HideSelect{ z-index:99; position:fixed; top: 0; left: 0; background-color:#fff; border:none; filter:alpha(opacity=0); -moz-opacity: 0; opacity: 0; height:100%; width:100%; } * html #TB_HideSelect { /* ie6 hack */ position: absolute; height: expression(document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'); } #TB_iframeContent{ clear:both; border:none; margin-bottom:-1px; margin-top:1px; _margin-bottom:1px; }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/css/thickbox.css
CSS
oos
4,028
/* Stylesheet for Tigra Calendar v5.0 Product is Public Domain (Free for any kind of applicaiton, customization and derivative works are allowed) URL: http://www.softcomplex.com/products/tigra_calendar/ - all image paths are relative to path of stylesheet - the styles below can be moved into the document or in existing stylesheet */ /* input box in default state */ .tcalInput { background: url('../images/cal.gif') 100% 50% no-repeat; padding-right: 20px; cursor: pointer; } /* additional properties for input boxe in activated state, above still applies unless in conflict */ .tcalActive { background-image: url('../images/no_cal.gif'); } /* container of calendar's pop-up */ #tcal { position: absolute; visibility: hidden; z-index: 100; width: 170px; background-color: white; margin-top: 2px; padding: 0 2px 2px 2px; border: 1px solid silver; -moz-box-shadow: 3px 3px 4px silver; -webkit-box-shadow: 3px 3px 4px silver; box-shadow: 3px 3px 4px silver; -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver')"; filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver'); } /* table containing navigation and current month */ #tcalControls { border-collapse: collapse; border: 0; width: 100%; } #tcalControls td { border-collapse: collapse; border: 0; padding: 0; width: 16px; background-position: 50% 50%; background-repeat: no-repeat; cursor: pointer; } #tcalControls th { border-collapse: collapse; border: 0; padding: 0; line-height: 25px; font-size: 10px; text-align: center; font-family: Tahoma, Geneva, sans-serif; font-weight: bold; white-space: nowrap; } #tcalPrevYear { background-image: url('../images/prev_year.gif'); } #tcalPrevMonth { background-image: url('../images/prev_mon.gif'); } #tcalNextMonth { background-image: url('../images/next_mon.gif'); } #tcalNextYear { background-image: url('../images/next_year.gif'); } /* table containing week days header and calendar grid */ #tcalGrid { border-collapse: collapse; border: 1px solid silver; width: 100%; } #tcalGrid th { border: 1px solid silver; border-collapse: collapse; padding: 3px 0; text-align: center; font-family: Tahoma, Geneva, sans-serif; font-size: 10px; background-color: gray; color: white; } #tcalGrid td { border: 0; border-collapse: collapse; padding: 2px 0; text-align: center; font-family: Tahoma, Geneva, sans-serif; width: 14%; font-size: 11px; cursor: pointer; } #tcalGrid td.tcalOtherMonth { color: silver; } #tcalGrid td.tcalWeekend { background-color: #ACD6F5; } #tcalGrid td.tcalToday { border: 1px solid red; } #tcalGrid td.tcalSelected { background-color: #FFB3BE; }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/css/tcal.css
CSS
oos
2,814
/*------------------------------------- zTree Style version: 3.0 author: Hunter.z email: hunter.z@263.net website: http://code.google.com/p/jquerytree/ -------------------------------------*/ .ztree * {padding:0; margin:0; font-size:12px; font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif} .ztree {margin:0; padding:5px; color:#333} .ztree li{padding:0; margin:0; list-style:none; line-height:14px; text-align:left; white-space:nowrap} .ztree li ul{ margin:0; padding:0 0 0 18px} .ztree li ul.line{ background:url(../images/line_conn.gif) 0 0 repeat-y;} .ztree li a {padding:1px 3px 0 0; margin:0 10px 0 0; cursor:pointer; height:16px; color:#333; background-color: transparent; text-decoration:none; vertical-align:top; display: inline-block} .ztree li a:hover {text-decoration:underline} .ztree li a.curSelectedNode {padding-top:0px; background-color:#FFE6B0; color:black; border:1px #FFB951 solid; opacity:0.8; filter:alpha(opacity=80)} .ztree li a.curSelectedNode_Edit {padding-top:0px; background-color:#FFE6B0; color:black; border:1px #FFB951 solid; opacity:0.8; filter:alpha(opacity=80)} .ztree li a.tmpTargetNode {padding-top:0px; background-color:#316AC5; color:white; border:1px #316AC5 solid; opacity:0.8; filter:alpha(opacity=80)} .ztree li a input.rename {height:14px; width:80px; padding:0; margin:0; font-size:12px; border:1px #7EC4CC solid; *border:0px} .ztree li span {line-height:16px; margin-right: 2px} .ztree li button {width:16px; height:16px; vertical-align:middle; border:0 none; cursor: pointer; background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; background-image:url("../images/zTreeStandard.png"); *background-image:url("../images/zTreeStandard.gif")} .ztree li button.chk {width:13px; height:13px; margin:0 3px 0 0; cursor: auto} .ztree li button.chk.checkbox_false_full {background-position:0 0} .ztree li button.chk.checkbox_false_full_focus {background-position:0 -12px} .ztree li button.chk.checkbox_true_full {background-position:0 -24px} .ztree li button.chk.checkbox_true_full_focus {background-position:0 -36px} .ztree li button.chk.checkbox_true_part {background-position:0 -48px} .ztree li button.chk.checkbox_true_part_focus {background-position:0 -60px} .ztree li button.chk.checkbox_false_part {background-position:0 -72px} .ztree li button.chk.checkbox_false_part_focus {background-position:0 -84px} .ztree li button.chk.radio_false_full {background-position:-13px 0} .ztree li button.chk.radio_false_full_focus {background-position:-13px -12px} .ztree li button.chk.radio_true_full {background-position:-13px -24px} .ztree li button.chk.radio_true_full_focus {background-position:-13px -36px} .ztree li button.chk.radio_true_part {background-position:-13px -48px} .ztree li button.chk.radio_true_part_focus {background-position:-13px -60px} .ztree li button.chk.radio_false_part {background-position:-13px -72px} .ztree li button.chk.radio_false_part_focus {background-position:-13px -84px} .ztree li button.switch {width:18px; height:18px} .ztree li button.root_open{background-position:-62px -54px} .ztree li button.root_close{background-position:-44px -54px} .ztree li button.roots_open{background-position:-62px 0} .ztree li button.roots_close{background-position:-44px 0} .ztree li button.center_open{background-position:-62px -18px} .ztree li button.center_close{background-position:-44px -18px} .ztree li button.bottom_open{background-position:-62px -36px} .ztree li button.bottom_close{background-position:-44px -36px} .ztree li button.noline_open{background-position:-62px -72px} .ztree li button.noline_close{background-position:-44px -72px} .ztree li button.root_docu{ background:none;} .ztree li button.roots_docu{background-position:-26px 0} .ztree li button.center_docu{background-position:-26px -18px} .ztree li button.bottom_docu{background-position:-26px -36px} .ztree li button.noline_docu{ background:none;} .ztree li button.ico_open{margin-right:2px; background-position:-80px -16px; vertical-align:top; *vertical-align:middle} .ztree li button.ico_close{margin-right:2px; background-position:-80px 0; vertical-align:top; *vertical-align:middle} .ztree li button.ico_docu{margin-right:2px; background-position:-80px -32px; vertical-align:top; *vertical-align:middle} .ztree li button.edit {margin-right:2px; background-position:-80px -48px; vertical-align:top; *vertical-align:middle} .ztree li button.remove {margin-right:2px; background-position:-80px -64px; vertical-align:top; *vertical-align:middle} .ztree li button.ico_loading{margin-right:2px; background:url(../images/loading.gif) no-repeat scroll 0 0 transparent; vertical-align:top; *vertical-align:middle} ul.tmpTargetzTree {background-color:#FFE6B0; opacity:0.8; filter:alpha(opacity=80)} button.tmpzTreeMove_arrow {width:16px; height:16px; padding:0; margin:2px 0 0 1px; border:0 none; position:absolute; background-color:transparent; background-repeat:no-repeat; background-attachment: scroll; background-position:-80px -80px; background-image:url("../images/zTreeStandard.png"); *background-image:url("../images/zTreeStandard.gif")} ul.zTreeDragUL {margin:0; padding:0; position:absolute; width:auto; height:auto;overflow:auto; background-color:#cfcfcf; border:1px #00B83F dotted; opacity:0.8; filter:alpha(opacity=80)} .zTreeMask {z-index:10000; background-color:#cfcfcf; opacity:0.0; filter:alpha(opacity=0); position:absolute} /* level 等级样式*/ /*.ztree li button.level0 { display:none; } .ztree li ul.level0 { padding:0; background:none; }*/
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/css/zTreeStyle.css
CSS
oos
5,650
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="TREC.Web.Admin.login" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>-后台登陆</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> </head> <body> <form id="form1" runat="server"> <div id="login_body"> <div id="login_div"> <div id="login_form_div"> <table border=0 width="300"> <tbody> <tr> <td width="170"> 管理员帐号<br /> <asp:TextBox ID="txtUserName" runat="server" CssClass="login_input required" title="请输入登陆名!" HintTitle="请输入登录帐号" HintInfo="用户名必须是字母或数字,不能包含空格或其它非法字符,不区分大小写。"></asp:TextBox> <BR> 管理密码<br /> <asp:TextBox ID="txtUserPwd" runat="server" CssClass="login_input required" title="请输入密码!" HintTitle="请输入登录密码" HintInfo="登录密码必须>=6位且是字母或数字,不能包含空格或其它非法字符,不区分大小写。" TextMode="Password"></asp:TextBox><br /> </td> <td align="left"> <asp:ImageButton ID="loginsubmit" runat="server" CssClass="login_btn" ImageUrl="images/login_btn.gif" onclick="loginsubmit_Click" /> </td> </tr> <tr> <td colspan="2" class="tipbox" style="background:url(Images/hint.gif) 0 6px no-repeat; padding-left:15px;">提示:<asp:Label ID="lbMsg" runat="server" Text="登录失败3次,需关闭后才能重新登录"></asp:Label><br><span class="msg"></span> </td> </tr> </tbody> </table> </div> </div> <div id="login_footer">福家网 © 2010 - 2011 fujiawang.com Inc.</div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/login.aspx
ASP.NET
oos
2,262
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; namespace TREC.Web.Admin { public partial class top :AdminPageBase { protected List<EnModule> list = new List<EnModule>(); protected void Page_Load(object sender, EventArgs e) { list = ECModule.GetModuleList(" type=" + (int)EnumModuleType.后台 + " or type=" + (int)EnumModuleType.系统); list.Sort(new EnModuleDescSort()); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/top.aspx.cs
C#
oos
607
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="apppromotionproductlist.aspx.cs" Inherits="TREC.Web.Admin.promotion.apppromotionproductlist" %> <%@ 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" /> <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 %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.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"> <b>您当前的位置:首页 &gt; 促销活动 &gt; 促销活动信息</b> </div> <div class="spClear"></div> <table> <tr> <td>&nbsp;&nbsp;<label>品牌:</label><asp:DropDownList ID="ddlbrand" runat="server" AutoPostBack="true" onselectedindexchanged="ddlbrand_SelectedIndexChanged"></asp:DropDownList>&nbsp;&nbsp; &nbsp;&nbsp;<label>会员:</label><asp:DropDownList ID="ddluser" runat="server" AutoPostBack="true" onselectedindexchanged="ddluser_SelectedIndexChanged" ></asp:DropDownList>&nbsp;&nbsp; <asp:Label ID="lbcount" runat="server"></asp:Label></td><td></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 width="80px" align="center">姓名</th> <th width="80px" align="center">邮箱</th> <th width="80px" align="center">电话</th> <th width="80px" align="center">分类</th> <th width="80px" align="center">品牌</th> <th width="150px" align="center">大小</th> <th align="left">材质</th> <th width="120px" align="center">时间</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("name")%></a></td> <td align="center"><%#Eval("memail")%></td> <td align="center"><%#Eval("mphone")%></td> <td align="center"><%#Eval("productname")%></td> <td align="center"><%#Eval("brandname")%></td> <td align="center"><%#Eval("sizevalue")%></td> <td align="left"><%#Eval("materialname")%></td> <td align="center"><%#Eval("addtime")%></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" PageSize="20" 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>&nbsp;&nbsp; </span> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/apppromotionproductlist.aspx
ASP.NET
oos
4,510
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="apppromotioncuslist.aspx.cs" Inherits="TREC.Web.Admin.promotion.apppromotioncuslist" %> <%@ 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" /> <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 %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.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="apppromotioncusinfo.aspx">添加信息</a></span><b>您当前的位置:首页 &gt; 促销活动 &gt; 促销活动信息</b> </div> <div class="spClear"></div> <table> <tr> <td>&nbsp;&nbsp;<label>品牌:</label><asp:DropDownList ID="ddlbrand" runat="server" AutoPostBack="true" onselectedindexchanged="ddlbrand_SelectedIndexChanged"></asp:DropDownList>&nbsp;&nbsp; &nbsp;&nbsp;<label>会员:</label><asp:DropDownList ID="ddluser" runat="server" AutoPostBack="true" onselectedindexchanged="ddluser_SelectedIndexChanged" ></asp:DropDownList>&nbsp;&nbsp; &nbsp;&nbsp;<label>地区:</label><asp:DropDownList ID="ddlarea" runat="server" AutoPostBack="true" onselectedindexchanged="ddlarea_SelectedIndexChanged"></asp:DropDownList>&nbsp;&nbsp; <asp:Label ID="lbcount" runat="server"></asp:Label></td><td></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 width="80px" align="center">品牌</th> <th width="80px" align="center">姓名</th> <th width="80px" align="center">电话</th> <th align="left">地址</th> <th width="80px" align="right" style="padding-left:5px;">操作</th> </tr> <asp:Repeater ID="rptList" runat="server" OnItemDataBound="rptList_OnItemDataBound"> <ItemTemplate> <tr> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="center"><asp:Label ID="lb_aid" runat="server" Text='<%#Eval("aid")%>'></asp:Label></td> <td align="center"><%#Eval("name") %></a></td> <td align="center"><%#Eval("phone")%></td> <td align="left"><%#Eval("address")%></td> <td align="right" style="padding-left:5px;"><a href="apppromotioncusinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="apppromotioncuslist.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" PageSize="20" 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>&nbsp;&nbsp; </span> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/apppromotioncuslist.aspx
ASP.NET
oos
4,723
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.promotion { public partial class promotiondeflist : AdminPageBase { public EnPromotion model = new EnPromotion(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryPId == "") { UiCommon.JscriptPrint(this.Page, "参数不正确,请刷新数据得新查看!", "promotionlist.aspx", "Success"); return; } model = ECPromotion.GetPromotionInfo(" where id=" + ECommon.QueryPId); if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECPromotionDef.DeletePromotionDef(TypeConverter.StrToInt(ECommon.QueryId)); } rptList.DataSource = ECPromotionDef.GetPromotionDefList(ECommon.QueryPageIndex, AspNetPager1.PageSize, " pid='" + ECommon.QueryPId + "'", 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) { ECPromotionDef.DeletePromotionDefByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "promotionlist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/promotiondeflist.aspx.cs
C#
oos
2,187
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.promotion { public partial class apppromotionproductlist : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlbrand.DataSource = ECAppPromotion.GetPromotionAppBrandList(""); ddlbrand.DataTextField = "title"; ddlbrand.DataValueField = "bid"; ddlbrand.DataBind(); ddlbrand.Items.Insert(0, new ListItem("请选择", "")); ddluser.DataSource = ECAppPromotion.GetAppProductListUsers(); ddluser.DataTextField = "name"; ddluser.DataValueField = "mid"; ddluser.DataBind(); ddluser.Items.Insert(0, new ListItem("请选择", "")); ShowData(); } } protected void ShowData() { string strWhere=""; if (ddlbrand.SelectedValue != "") { strWhere += " and brandid=" + ddlbrand.SelectedValue; } if (ddluser.SelectedValue != "") { strWhere += " and mid=" + ddluser.SelectedValue; } strWhere = strWhere != "" && strWhere!=null ? strWhere.Substring(4, strWhere.Length - 4) : strWhere; rptList.DataSource = ECAppPromotion.GetAppProductList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; lbcount.Text = "结果数量:" + 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) { ECAppPromotion.DeleteAppProductCustomerByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "apppromotionproductlist.aspx", "Success"); } } protected void ddlbrand_SelectedIndexChanged(object sender, EventArgs e) { ShowData(); } protected void ddluser_SelectedIndexChanged(object sender, EventArgs e) { ShowData(); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/apppromotionproductlist.aspx.cs
C#
oos
2,960
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="apppromotioncusinfo.aspx.cs" Inherits="TREC.Web.Admin.promotion.apppromotioncusinfo" %> <%@ 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"); } }); }); </script> </head> <body style="padding:10px;"> <form id="form1" runat="server"> <div class="navigation"> <span class="back"><a href="apppromotioncuslist.aspx">返回列表</a></span><b>您当前的位置:首页 &gt; 促销活动 &gt; 促销活动信息</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="160" align="right"> 品牌: </td> <td align="left" > <asp:DropDownList ID="ddlappbrand" runat="server" CssClass="select" Width="160px"></asp:DropDownList> </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="txtphone" 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="txtemail" runat="server" CssClass="input"></asp:TextBox> </td> </tr> <tr> <td align="right"> 地址 : </td> <td align="left"> <asp:TextBox ID="txtaddress" runat="server" CssClass="input w380"></asp:TextBox> </td> </tr> <tr> <td align="right"> 描述 : </td> <td align="left"> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea w250" Height="60"></asp:TextBox> </td> </tr> <tr> <td align="right"> 联系记录 : </td> <td align="left"> <asp:TextBox ID="txtcus" runat="server" CssClass=" textarea w380" TextMode="MultiLine" Height="80"></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/promotion/apppromotioncusinfo.aspx
ASP.NET
oos
5,191
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="promotiondefinfo.aspx.cs" Inherits="TREC.Web.Admin.promotion.promotiondefinfo" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>设置关联信息</title> <link rel="Stylesheet" type="text/css" href="../css/style.css" /> <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=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'] }); }); var editor2; KindEditor.ready(function (K) { editor2 = K.create('#txttitle', { allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist','link', 'fullscreen'] }); }); }); </script> <style> .fileUpload{float:left; width:380px} </style> </head> <body style="padding:10px;"> <form id="form1" runat="server"> <div class="navigation"> <span class="back"><a href="promotiondeflist.aspx?pid=<%=ECommon.QueryPId %>">返回列表</a></span><b>您当前的位置:首页 &gt; 促销活动 &gt; 促销活动信息</b> </div> <div class="spClear"></div> <div class="info"> <span>活动:<strong><%=modelPInfo.title%></strong></span> <span>开始时间:<strong><%=modelPInfo.startdatetime%></strong></span> <span>结束时间:<strong><%=modelPInfo.enddatetime%></strong></span> </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="70" align="right"> 活动类型: </td> <td align="left"> <asp:DropDownList ID="ddltype" runat="server" CssClass="select" Width="60px"></asp:DropDownList> <asp:TextBox ID="txtsearch" runat="server" CssClass="input"></asp:TextBox> <asp:Button ID="btnSearch" runat="server" Text="查找" onclick="btnSearch_Click" /><br> </td> </tr> <tr> <td align="right">选择结果:</td> <td><asp:DropDownList ID="ddlvalue" runat="server"></asp:DropDownList></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:TextBox ID="txttitle" runat="server" CssClass="textarea" TextMode="MultiLine" style="width:660px; height:100px"></asp:TextBox> </td> </tr> <tr> <td align="right">缩略图:</td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.PromotionDef, 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.PromotionDef, 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> <asp:TextBox ID="txtdescript" runat="server" TextMode="MultiLine" CssClass="textarea" style="width:660px; height:220px;"></asp:TextBox> </td> </tr> <tr> <td align="right">排序:</td> <td> <asp:TextBox ID="txtsort" runat="server" CssClass="input" Width="40">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/promotion/promotiondefinfo.aspx
ASP.NET
oos
8,176
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="promotionlist.aspx.cs" Inherits="TREC.Web.Admin.promotion.promotionlist" %> <%@ 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" /> <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 %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.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"); } ); }) function getDialog(j) { art.dialog.open('promotiondef.aspx', { id: 'memdiv' + j, width: 800, height: 400, title: '设置-<%#Eval("title") %>-信息', ok: function () { var iframe = this.iframe.contentWindow; if (!iframe.document.body) { alert('正在加载……') return false; }; return true; }, }); } </script> </head> <body style="padding:10px;"> <form id="form1" runat="server"> <div class="navigation"> <span class="add"><a href="promotioninfo.aspx">添加信息</a></span><b>您当前的位置:首页 &gt; 促销活动 &gt; 促销活动信息</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 width="80px" 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="center"><a href="promotiondefinfo.aspx?pid=<%#Eval("id") %>">添加</a>/<a href="promotiondeflist.aspx?pid=<%#Eval("id") %>">管理</a></td> <td align="left"><a href="promotioninfo.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="promotioninfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="promotionlist.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" PageSize="20" 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>&nbsp;&nbsp; </span> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/promotionlist.aspx
ASP.NET
oos
4,499
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="promotioninfo.aspx.cs" Inherits="TREC.Web.Admin.promotion.promotioninfo" %> <%@ 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=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'] }); }); var editor2; KindEditor.ready(function (K) { editor2 = K.create('#txthtmltitle', { 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', 'fullscreen'] }); }); }); </script> </head> <body style="padding:10px;"> <form id="form1" runat="server"> <div class="navigation"> <span class="back"><a href="promotionlist.aspx">返回列表</a></span><b>您当前的位置:首页 &gt; 促销活动 &gt; 促销活动信息</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="160" align="right"> 活动类型: </td> <td align="left" width="440px"> <asp:DropDownList ID="ddltype" runat="server" CssClass="select" Width="160px"></asp:DropDownList> </td> <td rowspan="9" valign="top" align="left"> <table class="formTable" width="400px"> <tr> <td align="right" valign="top">形&nbsp;象&nbsp;&nbsp;图:</td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Promotion, 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.Promotion, 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">缩&nbsp;略&nbsp;&nbsp;图:</td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Promotion, 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.Promotion, 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.Promotion, ECommon.QueryId, TREC.Entity.EnFilePath.DesImage)%>"> <asp:HiddenField ID="hfdesimage" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"><input id="File5" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td 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> <tr> <td align="right"> 点击量 : </td> <td align="left"> <asp:TextBox ID="txthits" runat="server" CssClass="input" Width="40">0</asp:TextBox> </td> </tr> <tr> <td align="right"> 排序 : </td> <td align="left"> <asp:TextBox ID="txtsort" runat="server" CssClass="input" Width="40">0</asp:TextBox> </td> </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> </table> </td> </tr> <tr> <td align="right"> 活动名称 : </td> <td align="left"> <asp:TextBox ID="txttitle" runat="server" CssClass="input w380 required"></asp:TextBox> </td> </tr> <tr> <td align="right"> HTMl标题 : </td> <td align="left"> <asp:TextBox id="txthtmltitle" runat="server" CssClass="textarea required" TextMode="MultiLine" heigh="100" Width="390"></asp:TextBox> </td> </tr> <tr> <td align="right"> 索引 : </td> <td align="left"> <asp:TextBox ID="txtletter" runat="server" CssClass="input"></asp:TextBox> </td> </tr> <tr> <td align="right"> 推荐属性 : </td> <td align="left"> <asp:CheckBoxList ID="chkattribute" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList> </td> </tr> <tr> <td align="right"> 开始时间 : </td> <td align="left"> <asp:TextBox ID="txtstartdatetime" runat="server" CssClass="input"></asp:TextBox> <img onclick="WdatePicker({el:'txtstartdatetime'})" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"> </td> </tr> <tr> <td align="right"> 结束时间 : </td> <td align="left"> <asp:TextBox ID="txtenddatetime" runat="server" CssClass="input"></asp:TextBox> <img onclick="WdatePicker({el:'txtenddatetime'})" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/skin/datePicker.gif" width="16" height="22" align="absmiddle"> </td> </tr> <tr> <td align="right"> 地区 : </td> <td align="left"> <div class="_droparea" id="ddlareacode" title="<%=areaCode %>"></div> </td> </tr> <tr> <td align="right"> 地址 : </td> <td align="left"> <asp:TextBox ID="txtaddress" runat="server" CssClass="input w380"></asp:TextBox> </td> </tr> <tr> <td align="right"> 活动内容 : </td> <td align="left" colspan="2"> <asp:TextBox id="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Height="200" Width="820"></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/promotion/promotioninfo.aspx
ASP.NET
oos
14,984
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="promotiondeflist.aspx.cs" Inherits="TREC.Web.Admin.promotion.promotiondeflist" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Import Namespace="TREC.Entity" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.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"); } ); }) function getDialog(j) { art.dialog.open('promotionstage.aspx?pid=<%=ECommon.QueryPId%>&did='+j, { id: 'memdiv' + j, width: 850, height: 600, title: '设置-<%#Eval("title") %>-规则', ok: function () { var iframe = this.iframe.contentWindow; if (!iframe.document.body) { alert('正在加载……') return false; }; return true; }, }); } </script> </head> <body style="padding:10px;"> <form id="form1" runat="server"> <div class="navigation"> <span class="add"><a href="promotiondefinfo.aspx?pid=<%=ECommon.QueryPId %>">添加信息</a></span><b>您当前的位置:首页 &gt; 促销活动 &gt; 促销活动信息</b> </div> <div class="spClear"></div> <div class="info"> <span>活动:<strong><%=model.title%></strong></span> <span>开始时间:<strong><%=model.startdatetime%></strong></span> <span>结束时间:<strong><%=model.enddatetime%></strong></span> </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 width="60px" align="center">对象类型</th> <th width="60px" align="center">对象ID</th> <th width="60px" align="center"><a href="#">促销规则</a></th> <th align="left">对象名称</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="center"><%#Enum.GetName(typeof(EnumPromotionDefType),int.Parse(Eval("type").ToString())) %></td> <td align="center"><%#Eval("value") %></td> <td align="center"><a href="#" onclick="getDialog(<%#Eval("Id")%>)">设置规则</a></td> <td align="left"><a href="promotiondefinfo.aspx?edit=1&id=<%#Eval("id") %>&pid=<%=ECommon.QueryPId %>"><%#Eval("valuetitle").ToString()%></a></td> <td align="center"><%#Eval("valueletter") %></td> <td align="center"><%#Eval("fordio").ToString()== "1" ? "<font style='color:#f60'>是</font>" : "否"%></td> <td align="right" style="padding-left:5px;"><a href="promotiondefinfo.aspx?edit=1&id=<%#Eval("id") %>&pid=<%=ECommon.QueryPId %>">修改</a>|<a href="promotiondeflist.aspx?edit=2&id=<%#Eval("id") %>&pid=<%=ECommon.QueryPId %>">删除</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" PageSize="20" 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>&nbsp;&nbsp; </span> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/promotiondeflist.aspx
ASP.NET
oos
5,380
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="apppromotionbrandinfo.aspx.cs" Inherits="TREC.Web.Admin.promotion.apppromotionbrandinfo" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>设置关联信息</title> <link rel="Stylesheet" type="text/css" href="../css/style.css" /> <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=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'] }); }); }); </script> <style> .fileUpload{float:left; width:380px} </style> </head> <body style="padding:10px;"> <form id="form1" runat="server"> <div class="navigation"> <span class="back"><a href="apppromotionbrandlist.aspx">返回列表</a></span><b>您当前的位置:首页 &gt; 促销活动 &gt; 促销活动信息</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="70" align="right"> 活动类型: </td> <td align="left"> <asp:TextBox ID="txtsearch" runat="server" CssClass="input"></asp:TextBox> <asp:Button ID="btnSearch" runat="server" Text="查找" onclick="btnSearch_Click" /><br> </td> </tr> <tr> <td align="right">选择结果:</td> <td><asp:DropDownList ID="ddlvalue" runat="server"></asp:DropDownList></td> </tr> <tr> <td align="right">缩略图:</td> <Td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.AppPromotionBrand, 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.AppPromotionBrand, 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> <asp:TextBox ID="txthtmltitle" runat="server" CssClass="input"></asp:TextBox> </Td> </tr> <tr> <td align="right">内容:</td> <Td> <asp:TextBox ID="txtdescript" runat="server" CssClass="input" TextMode="MultiLine" Rows="8" Height="200" Width="640"></asp:TextBox> </Td> </tr> <tr> <td align="right">排序:</td> <td> <asp:TextBox ID="txtsort" runat="server" CssClass="input" Width="40">0</asp:TextBox> </td> </tr> <tr> <td align="right">申请数:</td> <td> <asp:TextBox ID="txtappcount" runat="server" CssClass="input" Width="40">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/promotion/apppromotionbrandinfo.aspx
ASP.NET
oos
7,363
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.promotion { public partial class promotionstage : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { WebControlBind.DrpBind(typeof(EnumPromotionStageType), ddlstype); ddlstype.Items.Insert(0, new ListItem("请选择", "")); WebControlBind.DrpBind(typeof(EnumPromotionStageModule), ddlsmodule); ddlsmodule.Items.Insert(0, new ListItem("请选择", "")); WebControlBind.DrpBind(typeof(EnumPromotionModule), ddlpmodule); ddlpmodule.Items.Insert(0, new ListItem("请选择", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryPId == "" || ECommon.QueryDId=="") { UiCommon.JscriptPrint(this.Page, "参数不正确,请刷新数据得新查看!", "promotionlist.aspx", "Success"); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnPromotionStage model = ECPromotionStage.GetPromotionStageInfo(" where id=" + ECommon.QueryId); if (model != null) { this.txttitle.Text = model.title; this.ddlstype.SelectedValue = model.stype.ToString(); this.ddlsmodule.SelectedValue = model.smodle.ToString(); this.txtsvaluemin.Text = model.svaluemin; this.txtsvaluemax.Text = model.svaluemax; this.ddlpmodule.SelectedValue = model.pmodule.ToString(); this.txtrule.Text = model.prolue; this.txtpvalue.Text = model.pvalue; this.txtsort.Text = model.sort.ToString(); } } rptlist.DataSource = ECPromotionStage.GetPromotionStageList(" pid=" + ECommon.QueryPId + " and did=" + ECommon.QueryDId); rptlist.DataBind(); } protected void btnSave_Click(object sender, EventArgs e) { EnPromotionStage model = null; int pid = 0, did = 0; if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECPromotionStage.GetPromotionStageInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); } if (model == null) { model = new EnPromotionStage(); } pid = TypeConverter.StrToInt(ECommon.QueryPId); did = TypeConverter.StrToInt(ECommon.QueryDId); string title = this.txttitle.Text; int stype = int.Parse(ddlstype.SelectedValue); int smodle = int.Parse(ddlsmodule.SelectedValue); string svaluemin = this.txtsvaluemin.Text; string svaluemax = this.txtsvaluemax.Text; int pmodule = int.Parse(ddlpmodule.SelectedValue); string prolue = txtrule.Text; string pvalue = this.txtpvalue.Text; int sort = int.Parse(this.txtsort.Text); model.title = title; model.pid = pid; model.did = did; model.stype = stype; model.smodle = smodle; model.svaluemin = svaluemin; model.svaluemax = svaluemax; model.pmodule = pmodule; model.prolue = prolue; model.pvalue = pvalue; model.sort = sort; int aid = ECPromotionStage.EditPromotionStage(model); if (aid > 0) { //UiCommon.JscriptPrint(this.Page, "编辑成功!", "promotionstage.aspx?pid=" + ECommon.QueryPId + "&did=" + ECommon.QueryDId, "Success"); ScriptUtils.ShowAndRedirect("编辑成功!", "promotionstage.aspx?pid=" + ECommon.QueryPId + "&did=" + ECommon.QueryDId); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/promotionstage.aspx.cs
C#
oos
4,370
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.promotion { public partial class promotioninfo : AdminPageBase { public string areaCode = ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlauditstatus.Items.Clear(); WebControlBind.DrpBind(typeof(EnumAuditStatus), ddlauditstatus); ddlauditstatus.Items.Insert(0, new ListItem("请选择", "")); ddltype.Items.Clear(); WebControlBind.DrpBind(typeof(EnumPromotionType), ddltype); ddltype.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 != "") { EnPromotion model = ECPromotion.GetPromotionInfo(" where id=" + ECommon.QueryId); if (model != null) { areaCode = model.areacode; this.txttitle.Text = model.title; this.txthtmltitle.Text = model.htmltitle; this.txtletter.Text = model.letter; WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute); this.ddltype.SelectedValue = model.ptype.ToString(); 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.txttemplate.Text = model.template; this.txthits.Text = model.hits.ToString(); this.txtsort.Text = model.sort.ToString(); this.ddlauditstatus.SelectedValue = model.auditstatus.ToString(); this.ddllinestatus.SelectedValue = model.linestatus.ToString(); this.txtstartdatetime.Text = model.startdatetime.ToString(); this.txtenddatetime.Text = model.enddatetime.ToString(); this.txtaddress.Text = model.address; } } } protected void btnSave_Click(object sender, EventArgs e) { EnPromotion model = null; if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECPromotion.GetPromotionInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); } if (model == null) { model = new EnPromotion(); int createmid = adminId; model.createmid = createmid; } string title = this.txttitle.Text; string htmltitle = this.txthtmltitle.Text; string letter = this.txtletter.Text; string attribute = WebControlBind.CheckBoxListSelected(chkattribute); int ptype = int.Parse(ddltype.SelectedValue); string surface = this.hfsurface.Value; string logo = this.hflogo.Value; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string desimage = this.hfdesimage.Value; string descript = this.txtdescript.Text; string keywords = this.txtkeywords.Text; string template = this.txttemplate.Text; int hits = int.Parse(this.txthits.Text); int sort = int.Parse(this.txtsort.Text); DateTime lastedittime = DateTime.Now; int auditstatus = int.Parse(ddlauditstatus.SelectedValue); int linestatus = int.Parse(ddllinestatus.SelectedValue); DateTime startdatetime = DateTime.Parse(txtstartdatetime.Text); DateTime enddatetime = DateTime.Parse(txtenddatetime.Text); string address = txtaddress.Text; model.title = title; model.htmltitle = htmltitle; model.letter = letter; model.attribute = attribute; model.ptype = ptype; 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.startdatetime = startdatetime; model.enddatetime = enddatetime; model.address = address; int aid = ECPromotion.EditPromotion(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.Promotion, aid, EnFilePath.Thumb)); } if (logo.Length > 0) { ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.Promotion, aid, EnFilePath.Logo)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Promotion, aid, EnFilePath.Banner)); } if (desimage.Length > 0) { ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.Promotion, 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) { ECPromotion.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Promotion, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Promotion, aid, EnFilePath.ConImage)); } } UiCommon.JscriptPrint(this.Page, "编辑成功!", "promotionlist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/promotioninfo.aspx.cs
C#
oos
8,176
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="promotionstage.aspx.cs" Inherits="TREC.Web.Admin.promotion.promotionstage" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="Stylesheet" type="text/css" href="../css/style.css" /> <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"); } }); }); </script> </head> <body> <form id="form1" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th colspan="2" align="left"> 设置促销规则 </th> </tr> <tr> <td align="right">规则标题:</td> <td> <asp:TextBox ID="txttitle" runat="server" CssClass="input w380" ></asp:TextBox> </td> </tr> <tr> <td width="70" align="right"> 促销类型: </td> <td align="left"> <asp:DropDownList ID="ddlstype" runat="server" CssClass="select selectNone"></asp:DropDownList> </td> </tr> <tr> <td align="right">规则条件:</td> <td><asp:DropDownList ID="ddlsmodule" runat="server" CssClass="select"></asp:DropDownList></td> </tr> <tr> <td align="right">条件值:</td> <td> <asp:TextBox ID="txtsvaluemin" runat="server" CssClass="input" Width="60"></asp:TextBox><label>-</label> <asp:TextBox ID="txtsvaluemax" runat="server" CssClass="input" Width="60"></asp:TextBox><label>模则对象的值范围</label> </td> </tr> <tr> <td align="right">促销对象:</td> <td><asp:DropDownList ID="ddlpmodule" runat="server" CssClass="select"></asp:DropDownList></td> </tr> <tr> <td align="right">促销值:</td> <td> <asp:TextBox ID="txtpvalue" runat="server" CssClass="input"></asp:TextBox> </td> </tr> <tr> <td align="right">规则公式:</td> <td> <asp:TextBox ID="txtrule" runat="server" CssClass="textarea" Width="380" Height="60" TextMode="MultiLine"></asp:TextBox>(示意) </td> </tr> <tr> <td align="right">排序:</td> <td> <asp:TextBox ID="txtsort" runat="server" CssClass="input" Width="40">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> <div class="spClear"></div> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th align="left">规则列表:</th> </tr> <asp:Repeater ID="rptlist" runat="server"> <ItemTemplate> <tr> <td><a href="promotionstage.aspx?edit=1&id=<%#Eval("id") %>&pid=<%=ECommon.QueryPId %>&did=<%=ECommon.QueryDId %>"><%#Eval("title") %></a></td> </tr> </ItemTemplate> </asp:Repeater> </table> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/promotionstage.aspx
ASP.NET
oos
5,370
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.promotion { public partial class promotionlist : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECPromotion.DeletePromotion(TypeConverter.StrToInt(ECommon.QueryId)); } rptList.DataSource = ECPromotion.GetPromotionList(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) { ECPromotion.DeletePromotionByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "promotionlist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/promotionlist.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 System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Admin.promotion { public partial class promotiondefinfo : AdminPageBase { public EnPromotion modelPInfo = new EnPromotion(); protected void Page_Load(object sender, EventArgs e) { modelPInfo = ECPromotion.GetPromotionInfo(" where id=" + ECommon.QueryPId); if (!IsPostBack) { ddltype.Items.Clear(); WebControlBind.DrpBind(typeof(EnumPromotionDefType), ddltype); ddltype.Items.Insert(0, new ListItem("请选择", "")); chkattribute.Items.Clear(); WebControlBind.CheckBoxListBind(typeof(EnumAttribute), chkattribute); ddlvalue.Items.Insert(0, new ListItem("请查找", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryPId == "") { UiCommon.JscriptPrint(this.Page, "参数不正确,请刷新数据得新查看!", "promotionlist.aspx", "Success"); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnPromotionDef model = ECPromotionDef.GetPromotionDefInfo(" where id=" + ECommon.QueryId); if (model != null) { WebControlBind.CheckBoxListSetSelected(chkattribute, model.attribute); ddltype.SelectedValue = model.type; ddlvalue.Items.Clear(); ddlvalue.Items.Insert(0, new ListItem(model.valuetitle + "/" + model.valueletter + "_" + model.fordio, model.value)); this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.banner; this.txtdescript.Text = model.descript; this.txtsort.Text = model.sort.ToString(); this.txttitle.Text = model.title; } } } protected void btnSave_Click(object sender, EventArgs e) { EnPromotionDef model = null; int pid=0; if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECPromotionDef.GetPromotionDefInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); } if (model == null) { model = new EnPromotionDef(); model.curcountmoney = "0"; model.curcountpeople = "0"; model.curstage = "0"; model.fordio = "1"; } pid = TypeConverter.StrToInt(ECommon.QueryPId); string attribute = WebControlBind.CheckBoxListSelected(chkattribute); string type = ddltype.SelectedValue; string value = ddlvalue.SelectedValue; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string descript = this.txtdescript.Text; int sort = int.Parse(this.txtsort.Text); model.title = txttitle.Text; model.pid = pid; model.attribute = attribute; model.type = type; model.value = value; model.valuetitle = ddlvalue.SelectedItem.Text.Substring(0, ddlvalue.SelectedItem.Text.IndexOf("/")); model.valueletter = ddlvalue.SelectedItem.Text.Substring(ddlvalue.SelectedItem.Text.IndexOf("/") + 1, ddlvalue.SelectedItem.Text.IndexOf("_") - ddlvalue.SelectedItem.Text.IndexOf("/") - 1); model.thumb = thumb; model.banner = bannel; model.descript = descript; model.sort = sort; model.fordio = ddlvalue.SelectedItem.Text.Substring(ddlvalue.SelectedItem.Text.IndexOf("_") + 1, ddlvalue.SelectedItem.Text.Length - ddlvalue.SelectedItem.Text.IndexOf("_") - 1); if (ECPromotionDef.ExistsDef(model) > 0 & ECommon.QueryId == "" && ECommon.QueryEdit == "") { UiCommon.JscriptPrint(this.Page, "信息己存在,请重新设置!", "promotionlist.aspx", "Error"); return; } int aid = ECPromotionDef.EditPromotionDef(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.PromotionDef, aid, EnFilePath.Thumb)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.PromotionDef, 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) { ECPromotionDef.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.PromotionDef, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.PromotionDef, aid, EnFilePath.ConImage)); } } UiCommon.JscriptPrint(this.Page, "编辑成功!", "promotiondeflist.aspx?pid=" + ECommon.QueryPId, "Success"); } } protected void btnSearch_Click(object sender, EventArgs e) { if (txtsearch.Text != "") { switch (TypeConverter.StrToInt(ddltype.SelectedValue)) { case (int)EnumPromotionDefType.品牌: ddlvalue.DataSource = ECBrand.GetWebAllBrandList(-1, 0, " title like '%" + txtsearch.Text + "%'", out tmpPageCount); ddlvalue.DataTextField = "title"; ddlvalue.DataValueField = "brandid"; ddlvalue.DataBind(); break; } } else { ddlvalue.Items.Insert(0, new ListItem("请输入查找", "")); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/promotiondefinfo.aspx.cs
C#
oos
7,165
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.promotion { public partial class apppromotioncusinfo : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlappbrand.Items.Clear(); ddlappbrand.DataSource = ECAppPromotion.GetPromotionAppBrandList(""); ddlappbrand.DataTextField = "title"; ddlappbrand.DataValueField = "id"; ddlappbrand.DataBind(); ddlappbrand.Items.Insert(0, new ListItem("请选择", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnAppBrandCustomer model = ECAppPromotion.GetAppBrandCustomerInfo(" where id=" + ECommon.QueryId); if (model != null) { this.ddlappbrand.SelectedValue = model.aid.ToString(); this.txtname.Text = model.name; this.txtphone.Text = model.phone; this.txtmphone.Text = model.mphone; this.txtemail.Text = model.email; this.txtaddress.Text = model.address; this.txtdescript.Text = model.descript; this.txtcus.Text = model.cus; } } } protected void btnSave_Click(object sender, EventArgs e) { EnAppBrandCustomer model = null; int asid = int.Parse(ddlappbrand.SelectedValue); string name = this.txtname.Text; string phone = this.txtphone.Text; string mphone = this.txtmphone.Text; string email = this.txtemail.Text; string address = this.txtaddress.Text; string descript = this.txtdescript.Text; string cus = this.txtcus.Text; if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECAppPromotion.GetAppBrandCustomerInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); } if (model == null) { model = new EnAppBrandCustomer(); model.id = 0; } model.aid = asid; model.name = name; model.phone = phone; model.mphone = mphone; model.email = email; model.address = address; model.descript = descript; model.cus = cus; int aid = ECAppPromotion.EditAppBrandCustomer(model); if (aid > 0) { UiCommon.JscriptPrint(this.Page, "编辑成功!", "promotionlist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/apppromotioncusinfo.aspx.cs
C#
oos
3,179
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.promotion { public partial class apppromotionbrandinfo : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlvalue.Items.Insert(0, new ListItem("请查找", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnPromotionAppBrand model = ECAppPromotion.GetPromotionAppBrandInfo(" where id=" + ECommon.QueryId); if (model != null) { this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.banner; txthtmltitle.Text = model.htmltitle; txtdescript.Text = model.descript; ddlvalue.Items.Clear(); ddlvalue.Items.Insert(0, new ListItem(model.title + "/" + model.letter + "_" + model.fordio, model.bid.ToString())); this.txtsort.Text = model.sort.ToString(); this.txtappcount.Text = model.appcount.ToString(); } } } protected void btnSave_Click(object sender, EventArgs e) { EnPromotionAppBrand model = null; int pid=0; if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECAppPromotion.GetPromotionAppBrandInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); } if (model == null) { model = new EnPromotionAppBrand(); model.fordio = "1"; } pid = TypeConverter.StrToInt(ECommon.QueryPId); string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string value = ddlvalue.SelectedValue; string descript = txtdescript.Text; string htmltitle = txthtmltitle.Text; int sort = int.Parse(this.txtsort.Text); model.bid = int.Parse(value); model.title = ddlvalue.SelectedItem.Text.Substring(0, ddlvalue.SelectedItem.Text.IndexOf("/")); model.letter = ddlvalue.SelectedItem.Text.Substring(ddlvalue.SelectedItem.Text.IndexOf("/") + 1, ddlvalue.SelectedItem.Text.IndexOf("_") - ddlvalue.SelectedItem.Text.IndexOf("/") - 1); model.sort = sort; model.htmltitle = htmltitle; model.descript = descript; model.thumb = thumb; model.banner = bannel; model.appcount = int.Parse(txtappcount.Text); model.fordio = ddlvalue.SelectedItem.Text.Substring(ddlvalue.SelectedItem.Text.IndexOf("_") + 1, ddlvalue.SelectedItem.Text.Length - ddlvalue.SelectedItem.Text.IndexOf("_") - 1); int aid = ECAppPromotion.EditPromotionAppBrand(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.AppPromotionBrand, aid, EnFilePath.Thumb)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.AppPromotionBrand, 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) { ECAppPromotion.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.AppPromotionBrand, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.AppPromotionBrand, aid, EnFilePath.ConImage)); } } UiCommon.JscriptPrint(this.Page, "编辑成功!", "apppromotionbrandlist.aspx", "Success"); } } protected void btnSearch_Click(object sender, EventArgs e) { if (txtsearch.Text != "") { ddlvalue.DataSource = ECBrand.GetWebAllBrandList(-1, 0, " title like '%" + txtsearch.Text + "%'", out tmpPageCount); ddlvalue.DataTextField = "title"; ddlvalue.DataValueField = "brandid"; ddlvalue.DataBind(); } else { ddlvalue.Items.Insert(0, new ListItem("请输入查找", "")); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/apppromotionbrandinfo.aspx.cs
C#
oos
5,626
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.promotion { public partial class apppromotionbrandlist : AdminPageBase { public EnPromotion model = new EnPromotion(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECAppPromotion.DeletePromotionAppBrand(TypeConverter.StrToInt(ECommon.QueryId)); } rptList.DataSource = ECAppPromotion.GetPromotionAppBrandList(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) { ECAppPromotion.DeletePromotionAppBrandByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "apppromotionbrandlist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/apppromotionbrandlist.aspx.cs
C#
oos
1,851
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="apppromotionbrandlist.aspx.cs" Inherits="TREC.Web.Admin.promotion.apppromotionbrandlist" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Import Namespace="TREC.Entity" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.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="apppromotionbrandinfo.aspx">添加信息</a></span><b>您当前的位置:首页 &gt; 促销活动 &gt; 促销活动信息</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 width="60px" align="center">品牌ID</th> <th width="60px" align="center">品牌索引</th> <th align="left">品牌名称</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="center"><%#Eval("bid")%></td> <td align="center"><%#Eval("letter") %></td> <td align="left"><a href="apppromotionbrandinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title").ToString()%></a></td> <td align="center"><%#Eval("fordio").ToString()== "1" ? "<font style='color:#f60'>是</font>" : "否"%></td> <td align="center"><%#Eval("appcount")%></td> <td align="right" style="padding-left:5px;"><a href="apppromotionbrandinfo.aspx?edit=1&id=<%#Eval("id") %>">修改</a>|<a href="apppromotionbrandlist.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" PageSize="20" 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>&nbsp;&nbsp; </span> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/apppromotionbrandlist.aspx
ASP.NET
oos
4,119
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.promotion { public partial class apppromotioncuslist : AdminPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlbrand.DataSource = ECAppPromotion.GetPromotionAppBrandList(""); ddlbrand.DataTextField = "title"; ddlbrand.DataValueField = "bid"; ddlbrand.DataBind(); ddlbrand.Items.Insert(0, new ListItem("请选择", "")); ddluser.DataSource = ECAppPromotion.GetAppCustomerListUsers(); ddluser.DataTextField = "name"; ddluser.DataValueField = "name"; ddluser.DataBind(); ddluser.Items.Insert(0, new ListItem("请选择", "")); ddlarea.DataSource = ECAppPromotion.GetAppCustomerListAreas(); ddlarea.DataTextField = "address"; ddlarea.DataValueField = "address"; ddlarea.DataBind(); ddlarea.Items.Insert(0, new ListItem("请选择", "-1")); ddlarea.Items.Insert(1, new ListItem("未填写", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECAppPromotion.DeleteAppBrandCustomer(TypeConverter.StrToInt(ECommon.QueryId)); } string strWhere = ""; if (ddlbrand.SelectedValue != "") { strWhere += " and aid in (select id from t_promotionappbrand where bid=" + ddlbrand.SelectedValue + ")"; } if (ddluser.SelectedValue != "") { strWhere += " and name='" + ddluser.SelectedValue + "'"; } if (ddlarea.SelectedValue != "-1" && ddlarea.SelectedValue != "0" && ddlarea.SelectedValue != "") { strWhere += " and address='" + ddlarea.SelectedValue + "'"; } if (ddlarea.SelectedValue == "0" && ddlarea.SelectedValue == "") { strWhere += " and ( address='' or address='0' or address is null)"; } strWhere = strWhere != "" && strWhere != null ? strWhere.Substring(4, strWhere.Length - 4) : strWhere; rptList.DataSource = ECAppPromotion.GetAppBrandCustomerList(ECommon.QueryPageIndex, AspNetPager1.PageSize, strWhere, out tmpPageCount); rptList.DataBind(); AspNetPager1.RecordCount = tmpPageCount; lbcount.Text = "结果数量:" + tmpPageCount; } protected void rptList_OnItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { Label lb_aid=e.Item.FindControl("lb_aid") as Label; EnPromotionAppBrand m = ECAppPromotion.GetPromotionAppBrandInfo(" where id=" + lb_aid.Text); if (m!=null && m.title != null) { lb_aid.Text = m.title; } } } 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) { ECAppPromotion.DeleteAppBrandCustomerByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "apppromotioncuslist.aspx", "Success"); } } protected void ddlarea_SelectedIndexChanged(object sender, EventArgs e) { ShowData(); } protected void ddluser_SelectedIndexChanged(object sender, EventArgs e) { ShowData(); } protected void ddlbrand_SelectedIndexChanged(object sender, EventArgs e) { ShowData(); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Admin/promotion/apppromotioncuslist.aspx.cs
C#
oos
4,683
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web { public partial class index : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/index.aspx.cs
C#
oos
341
<%@ Application Codebehind="Global.asax.cs" Inherits="TREC.Web.Global" Language="C#" %>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Global.asax
ASP.NET
oos
92
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices;
10aaa-10aaa
trunk/TRECommerce/TREC.Web/Properties/AssemblyInfo.cs
C#
oos
110
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 TRECommon; using TREC.Entity; namespace TREC.Web.Suppler { public partial class supplermemberinfo :SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { txtlinkman.Text = memberInfo.tname; txtphone.Text = memberInfo.phone; txtmphone.Text=memberInfo.mobile; txtemail.Text=memberInfo.email; txtzhiwei.Text=memberInfo.career; switch (TypeConverter.StrToInt(Request.QueryString["sid"].ToString())) { case (int)EnumMemberType.工厂企业: if (companyInfo != null) { txtctitle.Text = companyInfo.title; } break; case (int)EnumMemberType.经销商: if (companyInfo != null) { txtctitle.Text = dealerInfo.title; } break; case (int)EnumMemberType.卖场: if (companyInfo != null) { txtctitle.Text = marketInfo.title; } break; } } } protected void btn_Click(object sender, EventArgs e) { memberInfo.tname = txtlinkman.Text; memberInfo.phone = txtphone.Text; memberInfo.mobile = txtmphone.Text; memberInfo.email = txtemail.Text; memberInfo.career = txtzhiwei.Text; memberInfo.lastedittime = DateTime.Now; ECMember.EditMember(memberInfo); if (Request.QueryString["sid"] != null) { switch (TypeConverter.StrToInt(Request.QueryString["sid"].ToString())) { case (int)EnumMemberType.工厂企业: EnCompany _companyInfo = null; if (companyInfo != null) { _companyInfo = companyInfo; } else { _companyInfo = new EnCompany(); _companyInfo.id = 0; _companyInfo.mid = memberInfo.id; _companyInfo.title = txtctitle.Text; _companyInfo.letter = ""; _companyInfo.groupid = 0; _companyInfo.attribute = ""; _companyInfo.industry = ""; _companyInfo.productcategory = ""; _companyInfo.vip = 0; _companyInfo.areacode = ""; _companyInfo.address = ""; _companyInfo.staffsize = 0; _companyInfo.regyear = "2000"; _companyInfo.regcity = ""; _companyInfo.buy = ""; _companyInfo.sell = ""; _companyInfo.linkman = ""; _companyInfo.phone = ""; _companyInfo.mphone = ""; _companyInfo.fax = ""; _companyInfo.email = ""; _companyInfo.postcode = ""; _companyInfo.homepage = ""; _companyInfo.domain = ""; _companyInfo.domainip = ""; _companyInfo.icp = ""; _companyInfo.surface = ""; _companyInfo.logo = ""; _companyInfo.thumb = ""; _companyInfo.bannel = ""; _companyInfo.desimage = ""; _companyInfo.descript = ""; _companyInfo.keywords = ""; _companyInfo.template = ""; _companyInfo.hits = 0; _companyInfo.sort = 0; _companyInfo.lastedid = memberInfo.id; _companyInfo.lastedittime = DateTime.Now; _companyInfo.auditstatus = 0; _companyInfo.linestatus = 0; } if(ECCompany.EditCompany(_companyInfo)>0) { ScriptUtils.RedirectFrame(this.Page, "f_company/setup1.aspx"); } break; case (int)EnumMemberType.经销商: EnDealer _dealerInfo = null; if (dealerInfo != null) { _dealerInfo = dealerInfo; } else { _dealerInfo = new EnDealer(); _dealerInfo.id = 0; _dealerInfo.mid = memberInfo.id; _dealerInfo.title = txtctitle.Text; _dealerInfo.letter = ""; _dealerInfo.groupid = 0; _dealerInfo.attribute = ""; _dealerInfo.industry = ""; _dealerInfo.productcategory = ""; _dealerInfo.vip = 0; _dealerInfo.areacode = ""; _dealerInfo.address = ""; _dealerInfo.staffsize = 0; _dealerInfo.regyear = "2000"; _dealerInfo.regcity = ""; _dealerInfo.buy = ""; _dealerInfo.sell = ""; _dealerInfo.linkman = ""; _dealerInfo.phone = ""; _dealerInfo.mphone = ""; _dealerInfo.fax = ""; _dealerInfo.email = ""; _dealerInfo.postcode = ""; _dealerInfo.homepage = ""; _dealerInfo.domain = ""; _dealerInfo.domainip = ""; _dealerInfo.icp = ""; _dealerInfo.surface = ""; _dealerInfo.logo = ""; _dealerInfo.thumb = ""; _dealerInfo.bannel = ""; _dealerInfo.desimage = ""; _dealerInfo.descript = ""; _dealerInfo.keywords = ""; _dealerInfo.template = ""; _dealerInfo.hits = 0; _dealerInfo.sort = 0; _dealerInfo.lastedid = memberInfo.id; _dealerInfo.lastedittime = DateTime.Now; _dealerInfo.auditstatus = 0; _dealerInfo.linestatus = 0; } if (ECDealer.EditDealer(_dealerInfo) > 0) { ScriptUtils.RedirectFrame(this.Page, "f_dealer/setup1.aspx"); } break; case (int)EnumMemberType.卖场: EnMarket _marketInfo =null; if (marketInfo != null) { _marketInfo = marketInfo; } else { _marketInfo = new EnMarket(); _marketInfo.id = 0; _marketInfo.mid = memberInfo.id; _marketInfo.title = txtctitle.Text; _marketInfo.letter = ""; _marketInfo.groupid = 0; _marketInfo.attribute = ""; _marketInfo.industry = ""; _marketInfo.productcategory = ""; _marketInfo.vip = 0; _marketInfo.areacode = ""; _marketInfo.address = ""; _marketInfo.staffsize = 0; _marketInfo.regyear = "2000"; _marketInfo.regcity = ""; _marketInfo.buy = ""; _marketInfo.sell = ""; _marketInfo.linkman = ""; _marketInfo.phone = ""; _marketInfo.mphone = ""; _marketInfo.fax = ""; _marketInfo.email = ""; _marketInfo.postcode = ""; _marketInfo.homepage = ""; _marketInfo.domain = ""; _marketInfo.domainip = ""; _marketInfo.icp = ""; _marketInfo.surface = ""; _marketInfo.logo = ""; _marketInfo.thumb = ""; _marketInfo.bannel = ""; _marketInfo.desimage = ""; _marketInfo.descript = ""; _marketInfo.keywords = ""; _marketInfo.template = ""; _marketInfo.busroute = ""; _marketInfo.cbm = 0; _marketInfo.hours = ""; _marketInfo.zphone = ""; _marketInfo.hits = 0; _marketInfo.sort = 0; _marketInfo.lastedid = memberInfo.id; _marketInfo.lastedittime = DateTime.Now; _marketInfo.auditstatus = 0; _marketInfo.linestatus = 0; } if (ECMarket.EditMarket(_marketInfo) > 0) { ScriptUtils.RedirectFrame(this.Page, "f_market/setup1.aspx"); } break; } } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/supplermemberinfo.aspx.cs
C#
oos
11,179
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_market { public partial class setup2 : SupplerPageBase { public string areaCode = ""; public EnMember _memberInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnMarketStorey model = ECMarketStorey.GetMarketStoreyInfo(" where id=" + ECommon.QueryId); if (model != null) { this.txttitle.Text = model.title; this.hfsurface.Value = model.surface; this.hflogo.Value = model.logo; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.hfdesimage.Value = model.desimage; this.txtdescript.Text = model.descript; this.txtsort.Text = model.sort.ToString(); } } } protected void btnSave_Click(object sender, EventArgs e) { TREC.Entity.EnMarketStorey model = null; string strErr = ""; if (this.txttitle.Text.Trim().Length == 0) { strErr += "title不能为空!\\n"; } if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECMarketStorey.GetMarketStoreyInfo(" where id=" + ECommon.QueryId); } if (model == null) { model = new EnMarketStorey(); } int marketid = marketInfo.id; string markettitle = marketInfo.title; string title = this.txttitle.Text; string number = "0"; string surface = this.hfsurface.Value; string logo = this.hflogo.Value; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string desimage = this.hfdesimage.Value; string descript = this.txtdescript.Text; string keywords = ""; string template = ""; int hits = 0; int sort = int.Parse(this.txtsort.Text); int lastedid = memberInfo.id; DateTime lastedittime = DateTime.Now; model.marketid = marketid; model.markettitle = markettitle; model.title = title; model.number = number; model.surface = surface; model.logo = logo; model.thumb = thumb; model.bannel = bannel; model.desimage = desimage; model.descript = descript; model.keywords = keywords; model.template = template; model.hits = hits; model.sort = sort; model.lastedid = lastedid; model.lastedittime = lastedittime; int aid = ECMarketStorey.EditMarketStorey(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (surface.Length > 0) { surface = surface.StartsWith(",") ? surface.Substring(1, surface.Length - 1) : surface; surface = surface.EndsWith(",") ? surface.Substring(0, surface.Length - 1) : surface; ecUpload.MoveFiles(surface.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.Surface)); } if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.Thumb)); } if (logo.Length > 0) { ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.Logo)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.Banner)); } if (desimage.Length > 0) { ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.MarketStorey, aid, EnFilePath.DesImage)); } Response.Redirect("../index.aspx"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_market/setup2.aspx.cs
C#
oos
4,966
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setup1.aspx.cs" Inherits="TREC.Web.Suppler.f_market.setup1" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register src="nav.ascx" tagname="nav" tagprefix="uc2" %> <%@ Register src="../ascx/head.ascx" tagname="head" tagprefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/marketinfo.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=market&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); }); $("#ddlPro").live("change", function () { if ($(this).val() != "" && $(this).val() != "0") { $.ajax({ url: "<%=ECommon.WebUrl %>/ajaxtools/ajaxarea.ashx", data: "type=c&p=" + $(this).val(), success: function (data) { $("#ddlregcity").html(data) }, error: function (d, m) { alert(m); } }); } }) }); </script> </head> <body style="height: auto"> <form id="form1" runat="server"> <uc1:head ID="head2" runat="server" /> <div class="Fcon setup"> <div class="setupTitle"> &nbsp;&nbsp;欢迎您进入家具快搜供应商管理系统,请先按顺序添加完成以下内容,以便正式上传产品。 </div> <div class="setupNext"> <uc2:nav ID="nav1" runat="server" /> </div> <div class="setupCon"> <table class="formTable"> <tr> <th colspan="2"> &nbsp;&nbsp;基本信息: </th> </tr> <tr> <td align="right" width="70"> 卖场名称: </td> <td> <asp:TextBox ID="txttitle" runat="server" CssClass="input required w250"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 名称索引: </td> <td> <asp:TextBox ID="txtletter" runat="server" CssClass="input required w250"></asp:TextBox> <div id="txtletterTip" style="width:280px; float:left"></div> </td> </tr> <tr style="display:none"> <td align="right"> 人员规格 : </td> <td> <asp:DropDownList ID="ddlstaffsize" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> </td> </tr> <tr style="display:none"> <td align="right"> 注册年份: </td> <td> <asp:TextBox ID="txtregyear" runat="server" CssClass="input w250 required digits"></asp:TextBox> </td> </tr> <tr style="display:none"> <td align="right"> 注册城市: </td> <td> <asp:DropDownList ID="ddlPro" runat="server" CssClass="select"> </asp:DropDownList> <asp:DropDownList ID="ddlregcity" runat="server" CssClass="select selectNone"> </asp:DropDownList> </td> </tr> <tr> <td align="right"> 营业面积: </td> <td> <asp:TextBox ID="txtcbm" runat="server" CssClass="input number" Width="45"></asp:TextBox><label>(平方米)</label> </td> </tr> <tr> <td align="right"> 投诉电话: </td> <td> <asp:TextBox ID="txtlphone" runat="server" CssClass="input w250"></asp:TextBox> <div id="txtlphoneTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 招商电话: </td> <td> <asp:TextBox ID="txtzphone" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 乘车路线: </td> <td> <asp:TextBox ID="txtbusroute" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 营业时间: </td> <td> <asp:TextBox ID="txthours" runat="server" CssClass="input w380"></asp:TextBox> </td> </tr> <tr style="display:none"> <td align="right"> 业务描述: </td> <td> <asp:TextBox ID="txtbuy" runat="server" CssClass="w250 textarea" TextMode="MultiLine" Rows="4"></asp:TextBox><label>长度不超过250字符,生产/销售/租凭业务描述</label> </td> </tr> <tr> <th colspan="2"> &nbsp;&nbsp; 联系信息: </th> </tr> <tr> <td align="right" > 地区: </td> <td> <div class="_droparea" id="ddlareacode" title="<%=areaCode %>"> </div> </td> </tr> <tr> <td align="right"> 地址: </td> <td> <asp:TextBox ID="txtaddress" runat="server" CssClass="input w380"></asp:TextBox> <div id="txtaddressTip" style="width:280px; float:left"></div> </td> </tr> <tr style="display: none"> <td align="right"> 联系人: </td> <td> <asp:TextBox ID="txtlinkman" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 手机 : </td> <td> <asp:TextBox ID="txtmphone" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 电话 : </td> <td> <asp:TextBox ID="txtphone" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 传真 : </td> <td> <asp:TextBox ID="txtfax" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 邮箱 : </td> <td> <asp:TextBox ID="txtemail" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 邮编 : </td> <td> <asp:TextBox ID="txtpostcode" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <td align="right"> 网址 : </td> <td> <asp:TextBox ID="txthomepage" runat="server" CssClass="input w250"></asp:TextBox> </td> </tr> <tr> <th colspan="2"> &nbsp;&nbsp; 图片信息: </th> </tr> <tr> <td align="right" valign="top" width="88"> 形&nbsp;象&nbsp;&nbsp;图:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.Surface)%>"> <asp:HiddenField ID="hfsurface" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File1" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td width="70px" align="right"> 企业标志:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.Logo)%>"> <asp:HiddenField ID="hflogo" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File2" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 缩&nbsp;略&nbsp;&nbsp;图:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>"> <asp:HiddenField ID="hfthumb" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File3" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 广告幻灯:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.Banner)%>"> <asp:HiddenField ID="hfbannel" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File4" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display: none"> <td align="right"> 企业展示:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Market, ECommon.QueryId, TREC.Entity.EnFilePath.DesImage)%>"> <asp:HiddenField ID="hfdesimage" runat="server" /> <div class="fileTools"> <input type="text" class="input w250 filedisplay" /> <a href="javascript:;" class="files"> <input id="File5" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> </table> <div class="clear"> </div> <table class="formTable" width="100%"> <tr> <th colspan="2"> &nbsp;&nbsp;卖场介绍: </th> </tr> <tr> <td colspan="2"> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="98%" Height="220"></asp:TextBox> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 180px"> <asp:Button ID="btnSave" runat="server" Text="" CssClass="submit" OnClick="btnSave_Click" />&nbsp;</div> <div class="clear"></div> <div class="foot" style=" position:static; left:0px; background:#f4f4f4; bottom:0px; right:0px; width:100%; height:30px; display:none"> 底部 </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_market/setup1.aspx
ASP.NET
oos
15,992
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_market { public partial class nav : System.Web.UI.UserControl { protected string s1css = "", s2css = "", s3css = "", s4css = "", s1url = "javascript:;", s2url = "javascript:;", s3url = "javascript:;", s4url = "javascript:;"; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (SupplerPageBase.marketInfo != null && SupplerPageBase.marketInfo.id != 0) { List<EnMarketStorey> mslist=ECMarketStorey.GetMarketStoreyList(" marketid="+SupplerPageBase.marketInfo.id); bool hasCompany = false, hasBrand = false, hasBrands = false; s1css = "now"; s1url = "javascript:;"; if (SupplerPageBase.marketInfo.title != null && SupplerPageBase.marketInfo.title != "" && SupplerPageBase.marketInfo.zphone != null && SupplerPageBase.marketInfo.zphone != "" && SupplerPageBase.marketInfo.address != null && SupplerPageBase.marketInfo.address != "") { hasCompany = true; s1css = "has"; s1url = "setup1.aspx"; s2css = "now"; s2url = "setup2.aspx"; } if (WebUtils.GetPageName() != "setup1.aspx" && (SupplerPageBase.marketInfo.title == null || SupplerPageBase.marketInfo.title == "" || SupplerPageBase.marketInfo.zphone == null || SupplerPageBase.marketInfo.zphone == "" || SupplerPageBase.marketInfo.address == null || SupplerPageBase.marketInfo.address == "")) { Response.Redirect("setup1.aspx"); return; } if (mslist.Count > 0) { hasBrand = true; s2css = "has"; s4css = "now"; s4url = "../index.aspx"; } //if (WebUtils.GetPageName() != "setup2.aspx" && WebUtils.GetPageName() != "setup1.aspx" && (mslist == null || mslist.Count <= 0)) //{ // Response.Redirect("setup2.aspx"); // return; //} //if (SupplerPageBase.brandList != null && SupplerPageBase.brandidlist != "0" && mslist.Count > 0) //{ // hasBrands = true; // s3url = "setup3.aspx"; // s3css = "has"; // s4css = "now"; // s4url = "../index.aspx"; //} } else { Response.Redirect("../supplerindex"); return; } } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_market/nav.ascx.cs
C#
oos
3,235
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_market { public partial class setup1 : SupplerPageBase { public string areaCode = ""; public EnMember _memberInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlstaffsize.Items.Clear(); ddlstaffsize.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.企业配置 + " and type=" + (int)EnumConfigByEnterprise.人员规模); ddlstaffsize.DataTextField = "title"; ddlstaffsize.DataValueField = "value"; ddlstaffsize.DataBind(); ddlstaffsize.Items.Insert(0, new ListItem("请选择", "")); ddlPro.Items.Clear(); ddlPro.DataSource = ECArea.GetAreaList(" parentcode=0"); ddlPro.DataTextField = "areaname"; ddlPro.DataValueField = "areacode"; ddlPro.DataBind(); ddlPro.Items.Insert(0, new ListItem("请选择", "")); ddlregcity.Items.Clear(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ShowData(); } } protected void ShowData() { if (memberInfo.type != (int)EnumMemberType.卖场) { UiCommon.JscriptPrint(this.Page, "对不起您不是卖场账号!", "../main.aspx", "error"); } else { EnMarket model = ECMarket.GetMarketInfo(" where id=" + marketInfo.id); if (model != null) { txttitle.Text = model.title; this.txtletter.Text = model.letter; areaCode = model.areacode; this.txtaddress.Text = model.address; this.ddlstaffsize.SelectedValue = model.staffsize.ToString(); this.txtregyear.Text = model.regyear; if (!string.IsNullOrEmpty(model.regcity)) { this.ddlregcity.SelectedValue = model.regcity; this.ddlPro.SelectedValue = model.regcity.Substring(0, 2) + "0000"; if (model.regcity != model.regcity.Substring(0, 2) + "0000") { ddlregcity.Items.Clear(); ddlregcity.DataSource = ECArea.GetAreaList(" parentcode=" + ddlPro.SelectedValue); ddlregcity.DataTextField = "areaname"; ddlregcity.DataValueField = "areacode"; ddlregcity.DataBind(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlregcity.SelectedValue = model.regcity; } } if (ddlPro.SelectedValue != "") { ddlregcity.Items.Clear(); ddlregcity.DataSource = ECArea.GetAreaList(" parentcode=" + ddlPro.SelectedValue); ddlregcity.DataTextField = "areaname"; ddlregcity.DataValueField = "areacode"; ddlregcity.DataBind(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlregcity.SelectedValue = model.regcity; } this.txtbuy.Text = model.buy; this.txtlinkman.Text = model.linkman; this.txtphone.Text = model.phone; this.txtmphone.Text = model.mphone; this.txtfax.Text = model.fax; this.txtemail.Text = model.email; this.txtpostcode.Text = model.postcode; this.txthomepage.Text = model.homepage; this.hfsurface.Value = model.surface; this.hflogo.Value = model.logo; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.hfdesimage.Value = model.desimage; this.txtdescript.Text = model.descript; this.txtcbm.Text = model.cbm.ToString(); this.txtlphone.Text = model.lphone; this.txtzphone.Text = model.zphone; this.txtbusroute.Text = model.busroute; this.txthours.Text = model.hours; } } } protected void btnSave_Click(object sender, EventArgs e) { EnMarket model = ECMarket.GetMarketInfo(" where id=" + marketInfo.id); string title = txttitle.Text; string letter = this.txtletter.Text; string industry = ""; string productcategory = ""; string areacode = Request.Form["ddlareacode_value"] == null ? Request.Params["ddlareacode_value"] == null ? "" : Request.Params["ddlareacode_value"].ToString() : Request.Form["ddlareacode_value"]; string address = this.txtaddress.Text; int staffsize = TypeConverter.StrToInt(ddlstaffsize.SelectedValue); string regyear = this.txtregyear.Text; string regcity = Request.Form["ddlregcity"] == null ? Request.Form["ddlregcity"] == null ? "" : Request.Form["ddlregcity"].ToString() : Request.Form["ddlregcity"].ToString(); string buy = this.txtbuy.Text; string sell = ""; string linkman = this.txtlinkman.Text; string phone = this.txtphone.Text; string mphone = this.txtmphone.Text; string fax = this.txtfax.Text; string email = this.txtemail.Text; string postcode = this.txtpostcode.Text; string homepage = this.txthomepage.Text; string surface = this.hfsurface.Value; string logo = this.hflogo.Value; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string desimage = this.hfdesimage.Value; string descript = this.txtdescript.Text; DateTime lastedittime = DateTime.Now; model.title = title; model.letter = letter; model.industry = industry; model.productcategory = productcategory; model.areacode = areacode; model.address = address; model.staffsize = staffsize; model.regyear = regyear; model.regcity = regcity; model.buy = buy; model.sell = sell; model.linkman = linkman; model.phone = phone; model.mphone = mphone; model.fax = fax; model.email = email; model.postcode = postcode; model.homepage = homepage; model.surface = surface; model.logo = logo; model.thumb = thumb; model.bannel = bannel; model.desimage = desimage; model.descript = descript; model.lastedittime = lastedittime; model.cbm = TypeConverter.StrToDeimal(txtcbm.Text); model.lphone = this.txtlphone.Text; model.zphone = this.txtzphone.Text; model.busroute = this.txtbusroute.Text; model.hours = this.txthours.Text; model.lastedid = memberInfo.id; model.mapapi = ""; int aid = ECMarket.EditMarket(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (surface.Length > 0) { surface = surface.StartsWith(",") ? surface.Substring(1, surface.Length - 1) : surface; surface = surface.EndsWith(",") ? surface.Substring(0, surface.Length - 1) : surface; ecUpload.MoveFiles(surface.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.Surface)); } if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.Thumb)); } if (logo.Length > 0) { ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.Logo)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.Banner)); } if (desimage.Length > 0) { ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.DesImage)); } StringBuilder imglist = Utils.GetImgUrl(model.descript); if (Utils.GetImgUrl(model.descript).Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ECMarket.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Market, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Market, aid, EnFilePath.ConImage)); } } Response.Redirect("setup2.aspx"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_market/setup1.aspx.cs
C#
oos
10,408
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="nav.ascx.cs" Inherits="TREC.Web.Suppler.f_market.nav" %> <ul> <li class="<%=s1css %>"><a href="<%=s1url %>"><p>第一步</p><p>添加卖场基本信息</p></a></li> <li class="<%=s2css %>"><a href="<%=s2url %>"><p>第二步</p><p>添加卖场楼层信息</p></a></li><%-- <li class="<%=s3css %>"><a href="<%=s3url %>"><p>第三步</p><p>管理卖场品牌店铺</p></a></li>--%> <li class="<%=s4css %>"><a href="<%=s4url %>"><p>第三步</p><p>可以正常使用供应商管理系统</p></a></li> </ul>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_market/nav.ascx
ASP.NET
oos
591
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setup2.aspx.cs" Inherits="TREC.Web.Suppler.f_market.setup2" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register src="nav.ascx" tagname="nav" tagprefix="uc2" %> <%@ Register src="../ascx/head.ascx" tagname="head" tagprefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.validate.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/additional-methods.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/messages_cn.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript"> $(function () { //表单验证JS $("#form1").validate({ //出错时添加的标签 errorElement: "span", showErrors: function (errorMap, errorList) { if (errorList.length > 0) { if ($("#" + errorList[0].element.id).next() != null) { $("#" + errorList[0].element.id).next().remove(); } } this.defaultShowErrors(); }, success: function (label) { //正确时的样式 label.text(" ").addClass("success"); } }); var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=market&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'link', 'fullscreen'] }); }); $("#ddlPro").live("change", function () { if ($(this).val() != "" && $(this).val() != "0") { $.ajax({ url: "<%=ECommon.WebUrl %>/ajaxtools/ajaxarea.ashx", data: "type=c&p=" + $(this).val(), success: function (data) { $("#ddlregcity").html(data) }, error: function (d, m) { alert(m); } }); } }) }); </script> </head> <body style="height: auto"> <form id="form1" runat="server"> <uc1:head ID="head2" runat="server" /> <div class="Fcon setup"> <div class="setupTitle"> &nbsp;&nbsp;欢迎您进入家具快搜供应商管理系统,请先按顺序添加完成以下内容,以便正式上传产品。 </div> <div class="setupNext"> <uc2:nav ID="nav1" runat="server" /> </div> <div class="setupCon"> <table class="formTable"> <tr> <td align="right" width="70"> 楼层名称: </td> <td width="200"> <asp:TextBox ID="txttitle" runat="server" CssClass="input required w160"></asp:TextBox>(*例:一楼,二楼) </td> </tr> <tr style="display:none"> <td align="right" valign="top"> 形&nbsp;象&nbsp;&nbsp;图: </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.Surface)%>"> <asp:HiddenField ID="hfsurface" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File1" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display:none"> <td width="70px" align="right"> 企业标志: </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.Logo)%>"> <asp:HiddenField ID="hflogo" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File2" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 楼层图:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d10.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>"> <asp:HiddenField ID="hfthumb" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File3" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display:none"> <td align="right"> 广告幻灯: </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.Banner)%>"> <asp:HiddenField ID="hfbannel" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File4" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display:none"> <td align="right"> 企业展示: </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.MarketStorey, ECommon.QueryId, TREC.Entity.EnFilePath.DesImage)%>"> <asp:HiddenField ID="hfdesimage" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File5" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr style="display:none"> <td align="right"> 排序: </td> <td> <asp:TextBox ID="txtsort" runat="server" CssClass="input required w160">0</asp:TextBox> </td> </tr> <tr style="display:none"> <td align="right"> 楼层描述: </td> <td> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="660" Height="220"></asp:TextBox> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 180px"> <asp:Button ID="btnSave" runat="server" Text="" CssClass="submit" OnClick="btnSave_Click" /> </div> <div class="clear"></div> <div class="foot" style=" position:static; left:0px; background:#f4f4f4; bottom:0px; right:0px; width:100%; height:30px; display:none"> 底部 </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_market/setup2.aspx
ASP.NET
oos
9,819
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.Suppler { public partial class supplerindex :SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/supplerindex.aspx.cs
C#
oos
361
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.shop { public partial class shopinfo : SupplerPageBase { public string areaCode = ""; public EnMember _memberInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlmarket.Items.Clear(); ddlmarket.DataSource = ECMarket.GetTop20MarketList(); ddlmarket.DataTextField = "title"; ddlmarket.DataValueField = "id"; ddlmarket.DataBind(); ddlmarket.Items.Insert(0, new ListItem("请选择", "")); ddlmarket.Items.Insert(1, new ListItem("未加入卖场", "0")); chkbrandlist.DataSource = SupplerPageBase.brandList; chkbrandlist.DataTextField = "title"; chkbrandlist.DataValueField = "id"; chkbrandlist.DataBind(); ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnShop model = ECShop.GetShopInfo(" where id=" + ECommon.QueryId); if (model != null) { txttitle.Text = model.title; areaCode = model.areacode; this.txtaddress.Text = model.address; 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.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.txtdescript.Text = model.descript; this.txtsort.Text = model.sort.ToString(); if (model != null && model.marketid != 0) { bool isHas = false; foreach (ListItem item in ddlmarket.Items) { if (item.Value == model.marketid.ToString()) { item.Selected = true; isHas = true; break; } } if (!isHas) { EnMarket m = ECMarket.GetMarketInfoVSNameAndIdInfo(" where id=" + model.marketid.ToString()); if (m != null) { ddlmarket.Items.Add(new ListItem(m.title, model.marketid.ToString())); ddlmarket.SelectedValue = model.marketid.ToString(); } } } foreach (EnShopBrand m in ECShop.GetReaderShopBrandList(" where shopid=" + model.id)) { foreach (ListItem i in chkbrandlist.Items) { if (m.brandid.ToString() == i.Value) i.Selected = true; } } } } } protected void btnSave_Click(object sender, EventArgs e) { EnShop model = null; string strErr = ""; if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECShop.GetShopInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); } if (model == null) { model = new EnShop(); model.mapapi = ""; model.marketid = 0; model.createmid = 0; model.lastedid = memberInfo.id; model.auditstatus = 0; model.linestatus = 0; model.mid = 0; model.domain = ""; model.domainip = ""; model.icp = ""; model.keywords = ""; model.template = ""; model.hits = 0; model.ctype = memberInfo.type; switch (model.ctype) { case (int)EnumMemberType.工厂企业: model.cid = companyInfo.id; break; case (int)EnumMemberType.经销商: model.cid = dealerInfo.id; break; } model.homepage = ""; model.regyear = "2000"; model.vip = 0; model.letter = ""; model.groupid = 0; model.attribute = ""; model.regcity = ""; model.surface = ""; model.logo = ""; model.desimage = ""; model.staffsize = 0; model.auditstatus = 0; model.linestatus = 0; } string title = txttitle.Text; string industry = ""; string productcategory = ""; string areacode = Request.Form["ddlareacode_value"] == null ? Request.Params["ddlareacode_value"] == null ? "" : Request.Params["ddlareacode_value"].ToString() : Request.Form["ddlareacode_value"]; string address = this.txtaddress.Text; 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 thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string descript = this.txtdescript.Text; int sort = TypeConverter.StrToInt(this.txtsort.Text); DateTime lastedittime = DateTime.Now; model.title = title; model.industry = industry; model.productcategory = productcategory; model.areacode = areacode; model.address = address; 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.thumb = thumb; model.bannel = bannel; model.descript = descript; model.sort = sort; model.marketid = TypeConverter.StrToInt(ddlmarket.SelectedValue); model.lastedittime = lastedittime; int aid = ECShop.EditShop(model); if (aid > 0) { //关联品牌 string value = ""; foreach (ListItem i in chkbrandlist.Items) { if (i.Selected) value += i.Value + ","; } value = value.StartsWith(",") ? value.Substring(1, value.Length - 1) : value; value = value.EndsWith(",") ? value.Substring(0, value.Length - 1) : value; string[] values = value.Split(','); if (values.Length > 0) { StringOperation.SortAndDdistinct(values, StringOperation.OrderByType.DESC); List<EnShopBrand> list = new List<EnShopBrand>(); foreach (string s in values) { EnShopBrand m = new EnShopBrand(); m.shopid = aid; m.brandid = TypeConverter.StrToInt(s); list.Add(m); } if (list.Count > 0) { ECShop.EditShopBrand(list); } } ECUpLoad ecUpload = new ECUpLoad(); if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Shop, aid, EnFilePath.Thumb)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Shop, 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) { ECShop.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Shop, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Shop, aid, EnFilePath.ConImage)); } } UiCommon.JscriptPrint(this.Page, "编辑成功!", "shoplist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/shop/shopinfo.aspx.cs
C#
oos
10,596
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.shop { public partial class shopbrand : SupplerPageBase { public string mid = ""; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECShop.DeletEnShop(TypeConverter.StrToInt(ECommon.QueryId)); } string strWhere = ""; switch (memberInfo.type) { case (int)EnumMemberType.工厂企业: strWhere += " cid=" + companyInfo.id + " and ctype=" + memberInfo.type; mid = companyInfo.id.ToString(); break; case (int)EnumMemberType.经销商: strWhere += " cid=" + dealerInfo.id + " and ctype=" + memberInfo.type; mid = dealerInfo.id.ToString(); break; } rptList.DataSource = ECShop.GetShopList(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) { ECShop.DeletEnShopByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "shoplist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/shop/shopbrand.aspx.cs
C#
oos
2,310
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="shopinfo.aspx.cs" Inherits="TREC.Web.Suppler.shop.shopinfo" 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" /> <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="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="<%=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" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/shopinfo.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=shop&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>"); }); } } }) }); $("#btnmarketsearch").click(function () { $.ajax({ url: "<%=ECommon.WebUrl %>/ajax/ajaxuser.ashx", data: "type=getnoaddmarket&v=" + $("#txtmarketsearch").val(), dataType: "json", success: function (data) { if (data != "") { $("#ddlmarket").html(); $("#ddlmarket").html("<option value=\"\">请选择</option>"); $("#ddlmarket").append("<option value=\"0\">未加入卖场</option>"); $.each(data, function (i) { $("#ddlmarket").append("<option value=\"" + data[i].id + "\">" + data[i].name + "</option>"); }); } } }) }); $("#btnctypsearch").click(function () { if($("#ddlctype").val()!="") { $.ajax({ url: "<%=ECommon.WebUrl %>/ajax/ajaxuser.ashx", data: "type=getcompanyordealertoshop&v=" + $("#txtctype").val()+"&t="+$("#ddlctype").val(), dataType: "json", success: function (data) { if (data != "") { $("#ddlc").hide(); $("#ddlc").show(); $("#ddlc").html("<option value=\"\">请选择</option>"); $("#ddlc").append("<option value=\"0\">未加企业</option>"); $.each(data, function (i) { $("#ddlc").append("<option value=\"" + data[i].id + "\">" + data[i].name + "</option>"); }); } } }); } else { alert("请选择要加入的企业类型"); } }); $("#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) { $("#ddlc").html(data) }, error: function (d, m) { alert(m); } }); } }) }); function openCreateMarket() { art.dialog.open('shop/createsmarket.aspx?mt=<%=memberInfo.type %>&m=<%=memberObjId %>', { title: '添加新卖场', width: '800px', height: '620px' }); } </script> </head> <body style="height: auto"> <form id="form1" runat="server"> <table width="100%" border="0" class="formTable"> <tr> <td align="right" width="100"> 卖场查找: </td> <td> <asp:TextBox ID="txtmarketsearch" runat="server" CssClass="w160 input"></asp:TextBox>&nbsp;<input type="button" class="submit" value="查找" id="btnmarketsearch" /> <a href="javascript:;" onclick="openCreateMarket()" id="addshopmarket">&nbsp;</a> <style> a#addshopmarket{ display:block; float:left; width:120px; height:28px; background:url(../images/f1.gif) no-repeat;} a#addshopmarket:hover{background:url(../images/f2.gif) no-repeat;} </style> </td> </tr> <tr> <td align="right"> 搜索结果: </td> <td> <asp:DropDownList ID="ddlmarket" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlmarketTip" style="width:280px; float:left"></div> </td> </tr> <tr style="display: none"> <td align="right"> 销售业务: </td> <td> <asp:TextBox ID="txtbuy" runat="server" CssClass="w250 textarea" TextMode="MultiLine" Rows="4"></asp:TextBox> </td> </tr> <tr> <th colspan="2" align="left"> &nbsp;&nbsp;联系信息: </th> </tr> <tr style="display: none"> <td align="right"> 联系人: </td> <td> <asp:TextBox ID="txtlinkman" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr style="display: none"> <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> <div id="txtphoneTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 传真 : </td> <td> <asp:TextBox ID="txtfax" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr> <td align="right"> 邮箱 : </td> <td> <asp:TextBox ID="txtemail" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 邮编 : </td> <td> <asp:TextBox ID="txtpostcode" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr> <td align="right"> 地区: </td> <td> <div class="_droparea" id="ddlareacode" title="<%=areaCode %>"> </div> </td> </tr> <tr> <td align="right"> 地址: </td> <td> <asp:TextBox ID="txtaddress" runat="server" CssClass="input required" style="width:310px"></asp:TextBox> <div id="txtaddressTip" style="width:280px; float:left"></div> </td> </tr> <tr> <th colspan="2">&nbsp;&nbsp;店铺信息</th> </tr> <tr> <td align="right"> 店铺名称: </td> <td> <asp:TextBox ID="txttitle" runat="server" CssClass="input required w160"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 销售品牌: </td> <td> <asp:CheckBoxList ID="chkbrandlist" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"></asp:CheckBoxList> <div id="chkbrandlistTip" style="width:280px; float:left"></div> <%--<div class="info" style="width:280px; float:left"><span class="ico">&nbsp;&nbsp;</span>&nbsp;&nbsp;最少选择一个品牌!</div> <script type="text/javascript"> $(function () { $("#btnSave").click(function () { if ($(":checkbox:checked").length < 1) { alert("最少选择一个销售品牌"); return false; } }) }) </script>--%> </td> </tr> <tr> <td align="right"> 店铺门口照:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d6.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Shop, 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" valign="top"> 店铺内景:<a href="javascript:;" class="helper" title="点击查看产品缩略图片位置示意"><img src="../images/d7.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Shop, 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" valign="top"> 店铺介绍: </td> <td> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="660" Height="200"></asp:TextBox> </td> </tr> <tr> <td align="right"> 排序: </td> <td> <asp:TextBox ID="txtsort" runat="server" CssClass="input w160 required digits">0</asp:TextBox> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 100px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" OnClick="btnSave_Click" /><input name="重置" type="reset" class="submit" value="重置" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/shop/shopinfo.aspx
ASP.NET
oos
15,053
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="shopbrand.aspx.cs" Inherits="TREC.Web.Suppler.shop.shopbrand" %> <%@ 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 id="Head1" runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <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 %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.getcss.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); }); function getDialog(j) { art.dialog.open('<%=ECommon.WebUrl %>/common/getbrand.aspx?type=upshopbrandid&mid=<%=mid %>&mt=<%=memberInfo.type %>&value=' + j, { id: 'memdiv' + j, width: 800, height: 400, title: '选择-<%#Eval("title") %>-品牌', ok: function () { var iframe = this.iframe.contentWindow; if (!iframe.document.body) { alert('正在加载……') return false; }; $.ajax({ url: '<%=TREC.ECommerce.ECommon.WebUrl %>/ajax/ajaxuser.ashx', data: 'type=upshopbrand&v=' + j + '&v2=' + iframe.document.getElementById('hfvalue').value, dataType: "json", success: function (data) { if (data != null) { $("#d_" + j).html(""); $.each(data, function (i) { var f = '<%=string.Format(EnFilePath.Brand,"_",EnFilePath.Logo) %>'; var mHtml = "<li id=\"" + data[i].id + "\"><a href=\"#\">"; mHtml += "<img src=\"" + f.replace("_", data[i].id) + "/" + data[i].logo + "\" width='105' height='38' alt='" + data[i].name + "' />" mHtml += data[i].name; mHtml += "</a></li>" $("#d_" + j).append(data[i].name+" | "); }); } } }); return true; }, init: function () { $(this.iframe).parent().parent().parent().parent().parent().parent().find('.aui_buttons').append("<img src='<%=ECommon.WebResourceUrl %>/images/ico/ico-03.gif' class='tipimg' style='width:255px; height:32px; position:absolute; right:66px; bottom:14px;'>"); } }); } </script> <style> .tipimg{} .aui_state_highlight{float:none;} button{float:none;} </style> </head> <body style="height:auto"> <form id="form1" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="40px" align="center">编号</th> <th width="200px"align="center">店铺名称</th> <th align="left">&nbsp;&nbsp;品牌</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr> <td align="center"><asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /></td> <td align="center"><asp:Label ID="lb_id" runat="server" Text='<%#Eval("Id")%>'></asp:Label></td> <td align="center"><a href="shopinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td> <td align="left"> <a href="#" onclick="javascript:getDialog(<%#Eval("id") %>);">【设置】</a> <div id="d_<%#Eval("id") %>"></div> </td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/shop/shopbrand.aspx
ASP.NET
oos
6,044
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.Entity; using TREC.ECommerce; namespace TREC.Web.Suppler.shop { public partial class createsmarket :SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { } protected void btnSave_Click(object sender, EventArgs e) { EnMarket model = new EnMarket(); string title = txtmarkettitle.Text; string letter = ""; int groupid = 0; string attribute = ""; string industry = ""; string productcategory = ""; int vip = 0; string areacode = ""; string address = ""; int staffsize = 0; string regyear = "2012"; string regcity = ""; string buy = ""; string sell = ""; string linkman = this.txtlinkman.Text; string phone = this.txtphone.Text; string mphone = ""; string fax = ""; string email = ""; string postcode = ""; string homepage = ""; string domain = ""; string domainip = ""; string icp = ""; string surface = ""; string logo = ""; string thumb = ""; string bannel = ""; string desimage = ""; string descript = this.txtdescript.Text; string keywords = ""; string template = ""; int hits = 0; int sort = 0; DateTime lastedittime = DateTime.Now; int auditstatus = 0; int linestatus = 0; model.mid = 0; 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 = 0; model.lphone = ""; model.zphone = ""; model.busroute = ""; model.hours = ""; model.lastedid = memberInfo.id; model.mapapi = ""; model.createmid = memberInfo.id; if (ECMarket.EditMarket(model) > 0) { UiCommon.JscriptPrint(this.Page, "卖场添加成功,请查找并选择!", "shopinfo.aspx", "Success"); } this.Page.ClientScript.RegisterStartupScript(this.Page.GetType(), System.Guid.NewGuid().ToString(), "<script>art.dialog.close()</script>" ); } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/shop/createsmarket.aspx.cs
C#
oos
3,972
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="shoplist.aspx.cs" Inherits="TREC.Web.Suppler.shop.shoplist" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); }) </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable"> <tr> <th width="40px" align="center">选择</th> <th width="40px" align="center">编号</th> <th align="left" width="160px">&nbsp;&nbsp;店铺图片</th> <th align="left" width="200px">&nbsp;&nbsp;店铺名称</th> <th align="left">&nbsp;&nbsp;店铺地址</th> </tr> <asp:Repeater ID="rptList" runat="server"> <ItemTemplate> <tr> <td align="center" style="height:100px; line-height:100px;"><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="shopinfo.aspx?edit=1&id=<%#Eval("id") %>"><img src="<%#TREC.Entity.EnFilePath.GetShopThumbPath(Eval("Id")!=null?Eval("Id").ToString():"",Eval("thumb")!=null?Eval("thumb").ToString():"") %>" width="140" height="80"/></a> </td> <td align="left" class="edit l"><a href="shopinfo.aspx?edit=1&id=<%#Eval("id") %>"><%#Eval("title") %></a></td> <td align="left" class="l"><%#Eval("address") %></td> </tr> </ItemTemplate> </asp:Repeater> </table> <div class="listButtom"> <span class="btn_all" onclick="checkAll(this);"><a href="javascript:;">全选</a></span> <span class="btn_bg"> <asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗? ');" OnClick="lbtnDel_Click" >删 除</asp:LinkButton>&nbsp;&nbsp; </span> <div class="pages"> <webdiyer:AspNetPager ID="AspNetPager1" runat="server" UrlPaging="true" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"> </webdiyer:AspNetPager> </div> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/shop/shoplist.aspx
ASP.NET
oos
3,166
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TREC.ECommerce; using TREC.Entity; using TRECommon; namespace TREC.Web.Suppler.shop { public partial class shoplist : SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (ECommon.QueryEdit == "2" && ECommon.QueryId != "") { ECShop.DeletEnShop(TypeConverter.StrToInt(ECommon.QueryId)); } string strWhere = ""; switch (memberInfo.type) { case (int)EnumMemberType.工厂企业: strWhere += " cid=" + companyInfo.id + " and ctype=" + memberInfo.type; break; case (int)EnumMemberType.经销商: strWhere += " cid=" + dealerInfo.id + " and ctype=" + memberInfo.type; break; } rptList.DataSource = ECShop.GetShopList(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) { ECShop.DeletEnShopByIdList(idlist.EndsWith(",") ? idlist.Substring(0, idlist.Length - 1) : idlist); UiCommon.JscriptPrint(this.Page, "批量删除成功!", "shoplist.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/shop/shoplist.aspx.cs
C#
oos
2,179
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="createsmarket.aspx.cs" Inherits="TREC.Web.Suppler.shop.createsmarket" %> <%@ Import Namespace="TREC.ECommerce" %><%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>新建卖场</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.inputlabel.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/shopaddmarket.js"></script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table class="formTable"> <tr> <th colspan="2">&nbsp;&nbsp;卖场信息:<asp:HiddenField ID="hfcompanyid" runat="server" /></th> </tr> <tr> <td align="right" width="70">卖场名称:</td> <td><asp:TextBox ID="txtmarkettitle" runat="server" CssClass="input"></asp:TextBox> <div id="txtmarkettitleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right">联系人:</td> <td><asp:TextBox ID="txtlinkman" runat="server" CssClass="input"></asp:TextBox> </td> </tr> <tr> <td align="right">联系电话:</td> <td><asp:TextBox ID="txtphone" runat="server" CssClass="input"></asp:TextBox> <div id="txtphoneTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right">卖场介绍:</td> <td><asp:TextBox ID="txtdescript" runat="server" CssClass="textarea" TextMode="MultiLine" Height="80px" Width="500"></asp:TextBox></td> </tr> </table> <div style="margin-top:10px; margin-left:80px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" onclick="btnSave_Click" /><input name="重置" type="reset" class="submit" value="重置" /> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/shop/createsmarket.aspx
ASP.NET
oos
3,415
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="supplerindex.aspx.cs" Inherits="TREC.Web.Suppler.supplerindex" %> <%@ Import Namespace="TREC.ECommerce" %><%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>供应商系统第一步</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> <link rel="stylesheet" type="text/css" href=<%="\""+TREC.ECommerce.ECommon.WebResourceUrl%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.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 () { $("#div1").animate({ opacity: 0.5 }); // if ('<%=memberInfo.logincount %>' == "0") { // art.dialog.open('html/f1.htm', { // title: '帮助中心', // padding: '1px', // width: '920px', // height: '768px', // fixed: true, // resize: false, // drag: false // }); // } }); function openLink(i, v) { $(".aui_state_focus").hide(); $("#mainaui_state_focus").show(); art.dialog.open('supplermemberinfo.aspx?sid=' + i + '&v=' + encodeURI(v), { title: '第一次进入系统--(第②步)完善 ' + v + ' 联系信息', width: '520px', height: '320px', padding: '1px' }); } </script> <style type="text/css"> .aui_buttons button{float:none; } </style> </head> <body style="background:#f1f9ff"> <div style="width: 100%; height: 100%; position: fixed; z-index: 1985; top: 0pt; left: 0pt; overflow: hidden;"><div style="height: 100%; background: #ccc; opacity: 0.7;" id="div1"></div></div> <form id="form1" runat="server"> <div id="top"> <div class="Fcon"> <span class="f_r"><a href="javascript:;"> <img src="images/kjdh.gif" /></a> </span><a href="javascript:;">您好:</a> <a href="javascript:;" style="color: #282828"><%=memberInfo.username %></a> | <a href="javascript:;" > 资金(0.00)</a> | <a href="javascript:;" >积分(0.00)</a> | <a href="memberInfo.aspx">修改资料</a> | <a href="editPwd.aspx">修改密码</a> | <a href="javascript:;">退出</a> </div> </div> <div class="head headFrame" style="height: 65px;"> <div class="Fcon"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td width="195" height="55"> <a href="supplerindex.aspx"> <img src="images/logo.jpg" title="商务中心首页" /></a> </td> <td> <div class="head_user"> <strong class="px14" style="color: #555555;">(<%=memberInfo.username %>)</strong>(<%=memberTypeName %> <a href="#" title="点击隐身"><span class="f_green">在线</span></a>) &nbsp;&nbsp;&nbsp; [ <a href="supplerindex.aspx" class="b">我的商务室</a> ] </div> </td> <td class="head_sch"> </td> </tr> </table> </div> </div> <div style="position: absolute; left: 50%; top: 50%; margin: -195px 0px 0px -360px; display: block; width: auto; z-index: 1986;" class="aui_state_focus aui_state_lock" id="mainaui_state_focus"> <div class="aui_outer"> <table class="aui_border"> <tbody> <tr> <td class="aui_nw"> </td> <td class="aui_n"> </td> <td class="aui_ne"> </td> </tr> <tr> <td class="aui_w"> </td> <td class="aui_c"> <div class="aui_inner"> <table class="aui_dialog"> <tbody> <tr> <td class="aui_header" colspan="2"> <div class="aui_titleBar"> <div class="aui_title" style="cursor: auto; display: block;"> 第一次进入系统--(第①步)选择您想注册的企业类型</div> </div> </td> </tr> <tr> <td class="aui_icon" style="display: none;"> <div class="aui_iconBg" style="background: none repeat scroll 0% 0% transparent;"> </div> </td> <td class="aui_main" style="width: 680px; height: 350px;"> <div class="aui_content" style="padding: 1px;"> <div id="btnAdd" style="display: block;" class="Fcon"> <div style="background: #f1f9ff; background: url('images/supplerindex_bg.gif') repeat-x;" class="supplerindex"> <ul> <li><a onclick="openLink('<%=(int)EnumMemberType.工厂企业 %>','工厂')" title="点击完善品牌厂家联系信息" class="txtTip" href="#"> <img height="269" width="169" src="images/1-1.gif"></a></li> <li><a onclick="openLink('<%=(int)EnumMemberType.经销商 %>','经销商')" title="点击完善经销商联系信息" class="txtTip" id="top1" href="#"> <img height="269" width="169" src="images/2-1.gif"></a></li> <li><a onclick="openLink('<%=(int)EnumMemberType.卖场 %>','卖场')" title="点击完善经卖场联系信息" class="txtTip" href="#"> <img height="269" width="169" src="images/3-1.gif"></a></li> </ul> </div> </div> </div> </td> </tr> <tr> <td class="aui_footer" colspan="2"> <div class="aui_buttons" style="display: none;"> </div> </td> </tr> </tbody> </table> </div> </td> <td class="aui_e"> </td> </tr> <tr> <td class="aui_sw"> </td> <td class="aui_s"> </td> <td class="aui_se" style="cursor: auto;"> </td> </tr> </tbody> </table> </div> </div> <style type="text/css"> #btnAdd{float:left; width:680px; height:348px; background:#f1f9ff;} .supplerindex ul{margin-top:20px;} .supplerindex ul li{float:left; margin:0px 15px 0px 35px; width:170px;} .supplerindex ul li a{display:block;} #linkInfo{display:none;} </style> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/supplerindex.aspx
ASP.NET
oos
9,654
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="memberinfo.aspx.cs" Inherits="TREC.Web.Suppler.memberinfo" %> <!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="<%=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/jquery.validate.min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/additional-methods.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/messages_cn.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.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="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { //表单验证JS $("#form1").validate({ //出错时添加的标签 errorElement: "span", showErrors: function (errorMap, errorList) { if (errorList.length > 0) { if ($("#" + errorList[0].element.id).next() != null) { $("#" + errorList[0].element.id).next().remove(); } } this.defaultShowErrors(); }, success: function (label) { //正确时的样式 label.text(" ").addClass("success"); } }); }) </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table cellpadding="6" cellspacing="1" class="formTable"> <tr> <td class="tl" align="right" width="160px">真实姓名:</td> <td class="tr"><asp:TextBox ID="txtTruename" runat="server" CssClass="input required w250"></asp:TextBox></td> </tr> <tr> <td class="tl" align="right">性别:</td> <td class="tr"> <asp:RadioButtonList ID="raGender" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow"> <asp:ListItem Text="保密" Value="0" Selected="True"></asp:ListItem> <asp:ListItem Text="男" Value="1"></asp:ListItem> <asp:ListItem Text="女" Value="2"></asp:ListItem> </asp:RadioButtonList> </td> </tr> <tr style="display:none"> <td class="tl" align="right">出生日期:</td> <td class="tr"><asp:TextBox ID="txtBirthDate" runat="server" CssClass="input Wdate w250" onfocus="WdatePicker()"></asp:TextBox></td> </tr> <tr> <td class="tl" align="right">Email:</td> <td class="tr"><asp:TextBox ID="txtEmail" runat="server" CssClass="input w250"></asp:TextBox></td> </tr> <tr> <td class="tl" align="right">手机:</td> <td class="tr"><asp:TextBox ID="txtMobile" runat="server" CssClass="input required number"></asp:TextBox></td> </tr> <tr> <td class="tl" align="right">电话:</td> <td class="tr"><asp:TextBox ID="txtPhone" runat="server" CssClass="input required w250"></asp:TextBox></td> </tr> <tr style="display:none"> <td class="tl" align="right">收款银行:</td> <td class="tr"><asp:TextBox ID="txtBank" runat="server" CssClass="input w250"></asp:TextBox></td> </tr> <tr style="display:none"> <td class="tl" align="right">银行账号:</td> <td class="tr"><asp:TextBox ID="txtAccount" runat="server" CssClass="input number w250"></asp:TextBox></td> </tr> <tr style="display:none"> <td class="tl" align="right">地址:</td> <td class="tr"> <div class="_droparea" id="ddlareacode" title="<%=memberInfo.areacode%>"></div> </td> </tr> <tr style="display:none"> <td class="tl" align="right">详细地址:</td> <td class="tr"> <asp:TextBox ID="txtAddress" runat="server" CssClass="input required w380"></asp:TextBox> </td> </tr> <tr style="display:none"> <td class="tl" align="right">支付宝:</td> <td class="tr"><asp:TextBox ID="txtAlipay" runat="server" CssClass="input w250"></asp:TextBox></td> </tr> <tr style="display:none"> <td class="tl" align="right">Msn:</td> <td class="tr"><asp:TextBox ID="txtMsn" runat="server" CssClass="input w250"></asp:TextBox></td> </tr> <tr style="display:none"> <td class="tl" align="right">QQ:</td> <td class="tr"><asp:TextBox ID="txtQQ" runat="server" CssClass="input w250"></asp:TextBox></td> </tr> <tr style="display:none"> <td class="tl" align="right">ali:</td> <td class="tr"><asp:TextBox ID="txtAli" runat="server" CssClass="input w250"></asp:TextBox></td> </tr> <tr style="display:none"> <td class="tl" align="right">skype:</td> <td class="tr"><asp:TextBox ID="txtSkype" runat="server" CssClass="input w250"></asp:TextBox></td> </tr> <tr style="display:none"> <td class="tl" align="right">部门:</td> <td class="tr"><asp:TextBox ID="txtDepartment" runat="server" CssClass="input "></asp:TextBox></td> </tr> <tr> <td class="tl" align="right">职位:</td> <td class="tr"><asp:TextBox ID="txtCareer" runat="server" CssClass="input"></asp:TextBox></td> </tr> <tr> <td class="tl" align="right"> &nbsp; </td> <td height="30"> <asp:Button ID="btnEdit" runat="server" CssClass="submit" Text="保 存" onclick="btnEdit_Click" /> &nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="submit" onclick="history.back(-1);" /> </td> </tr> </table> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/member/memberinfo.aspx
ASP.NET
oos
6,906
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler { public partial class memberinfo :SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowData(); } } protected void ShowData() { if (memberInfo != null) { this.txtTruename.Text = memberInfo.tname; this.txtEmail.Text = memberInfo.email; raGender.SelectedValue = memberInfo.gender.ToString(); this.txtMobile.Text = memberInfo.mobile; this.txtPhone.Text = memberInfo.phone; this.txtMsn.Text = memberInfo.msn; this.txtQQ.Text = memberInfo.qq; this.txtAli.Text = memberInfo.ali; this.txtBirthDate.Text = memberInfo.birthdate.ToShortDateString(); this.txtAddress.Text = memberInfo.address; this.txtSkype.Text = memberInfo.skype; this.txtDepartment.Text = memberInfo.department; this.txtCareer.Text = memberInfo.career; this.txtBank.Text = memberInfo.bank; this.txtAccount.Text = memberInfo.account; this.txtAlipay.Text = memberInfo.alipay; } } protected void btnEdit_Click(object sender, EventArgs e) { string truename = txtTruename.Text; string email = txtEmail.Text; int gender = TypeConverter.StrToInt(raGender.SelectedValue); string mobile = txtMobile.Text; string phone = txtPhone.Text; string msn = txtMsn.Text; string qq = txtQQ.Text; string ali = txtAli.Text; DateTime birthdate = DateTime.Parse(txtBirthDate.Text); string address = txtAddress.Text; string skype = txtSkype.Text; string department = this.txtDepartment.Text; string career = this.txtCareer.Text; int admin = 0; string areacode = Request.Form["ddlareacode_value"] == null ? Request.Params["ddlareacode_value"] == null ? "" : Request.Params["ddlareacode_value"].ToString() : Request.Form["ddlareacode_value"]; string bank = this.txtBank.Text; string account = this.txtAccount.Text; string alipay = txtAlipay.Text; string auth = ""; string authvalue = ""; DateTime authtime = DateTime.Parse("1900-01-01 00:00:00"); DateTime lastedittime = DateTime.Now; memberInfo.tname = truename; memberInfo.email = email; memberInfo.gender = gender; memberInfo.mobile = mobile; memberInfo.phone = phone; memberInfo.msn = msn; memberInfo.qq = qq; memberInfo.ali = ali; memberInfo.birthdate = birthdate; memberInfo.address = address; memberInfo.skype = skype; memberInfo.department = department; memberInfo.career = career; memberInfo.areacode = areacode; memberInfo.bank = bank; memberInfo.account = account; memberInfo.alipay = alipay; memberInfo.auth = auth; memberInfo.authvalue = authvalue; memberInfo.authtime = authtime; memberInfo.lastedittime = lastedittime; int mid = ECMember.EditMember(memberInfo); if (mid > 0) { ScriptUtils.ShowAndRedirect("编辑成功!", "memberInfo.aspx"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/member/memberinfo.aspx.cs
C#
oos
3,940
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.Entity; using TREC.ECommerce; namespace TREC.Web.Suppler { public partial class editpwd :SupplerPageBase { protected void Page_Load(object sender, EventArgs e) { } protected void btnEdit_Click(object sender, EventArgs e) { if (memberInfo.password != MyMD5.GetMD5(txtOldPwd.Text)) { UiCommon.JscriptPrint(this.Page, "旧密码不正确!", "editpwd.aspx", "Error"); return; } if (txtNewPwd.Text != "") { memberInfo.password = MyMD5.GetMD5(txtOldPwd.Text); } if (ECMember.EditMember(memberInfo) > 0) { UiCommon.JscriptPrint(this.Page, "密码修改成功!", "editpwd.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/member/editpwd.aspx.cs
C#
oos
1,035
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="editpwd.aspx.cs" Inherits="TREC.Web.Suppler.editpwd" %> <!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="<%=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/jquery.validate.min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/additional-methods.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/messages_cn.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript"> $(function () { //表单验证JS $("#form1").validate({ //出错时添加的标签 errorElement: "span", showErrors: function (errorMap, errorList) { if (errorList.length > 0) { if ($("#" + errorList[0].element.id).next() != null) { $("#" + errorList[0].element.id).next().remove(); } } this.defaultShowErrors(); }, success: function (label) { //正确时的样式 label.text(" ").addClass("success"); } }); }) </script> </head> <body style="height:auto"> <form id="form1" runat="server"> <table cellpadding="6" cellspacing="1" class="formTable"> <tbody id="Tabs1"> <tr> <td class="tl" align="right"> 旧密码: </td> <td class="tr f_red"> <asp:TextBox ID="txtOldPwd" runat="server" Width="180" CssClass="required input"></asp:TextBox>&nbsp; <span class="lbInfo">*输入您原来的密码!</span> </td> </tr> <tr> <td class="tl" align="right" > 新密码: </td> <td class="tr f_red"> <asp:TextBox ID="txtNewPwd" runat="server" Width="180" CssClass="required input"></asp:TextBox> <span id="dpassword" class="f_red"></span> </td> </tr> <tr> <td class="tl" align="right"> 重复新密码: </td> <td class="tr f_red"> <asp:TextBox ID="txtCheckPwd" runat="server" Width="180" CssClass="required input"></asp:TextBox>&nbsp; <span id="dcpassword" class="f_red"></span> </td> </tr> </tbody> <tr> <td class="tl"> &nbsp; </td> <td class="tr f_red" height="30"> <asp:Button ID="btnEdit" runat="server" Text="保 存" CssClass="submit" onclick="btnEdit_Click" />&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value=" 返 回 " class="submit" onclick="history.back(-1);" /> </td> </tr> </table> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/member/editpwd.aspx
ASP.NET
oos
3,770
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="supplermemberinfo.aspx.cs" Inherits="TREC.Web.Suppler.supplermemberinfo" %> <%@ 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%>/altdialog/skins/default.css" /> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/artDialog.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/altdialog/plugins/iframeTools.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> <style> .aui_buttons{padding:3px 0px;} </style> </head> <body style=" background:url(images/kefu.gif) no-repeat; background-position:bottom; background-position:right;"> <form id="form1" runat="server"> <table class="formTable" style="width:520px; height:280px; border:0px;"> <tr> <td valign="top" align="right" width="90px" style="height:28px;"> <%if (Request.QueryString["v"] != null) { %><%=TRECommon.WebRequest.UrlDecode(Request.QueryString["v"]).ToString()%><%} %>名称:</td> <td valign="top"><asp:TextBox ID="txtctitle" runat="server" CssClass="input required"></asp:TextBox></td> </tr> <tr> <td valign="top" align="right" width="90px" style="height:28px;">电话:</td> <td valign="top"><asp:TextBox ID="txtphone" runat="server" CssClass="input isTel"></asp:TextBox>(格式:区号-号码021-1111)</td> </tr> <tr> <td valign="top" align="right" width="90px" style="height:28px;">手机:</td> <td valign="top"><asp:TextBox ID="txtmphone" runat="server" CssClass="input digits" maxlength="11" MinLength="11"></asp:TextBox></td> </tr> <tr> <td valign="top" align="right" width="90px" style="height:28px;">邮箱:</td> <td valign="top"><asp:TextBox ID="txtemail" runat="server" CssClass="input email"></asp:TextBox></td> </tr> <tr> <td valign="top" align="right" width="90px" style="height:28px;">联系人:</td> <td><asp:TextBox ID="txtlinkman" runat="server" CssClass="input required"></asp:TextBox></td> </tr> <tr> <td valign="top" align="right">职位:</td> <td valign="top"><asp:TextBox ID="txtzhiwei" runat="server" CssClass="input required"></asp:TextBox></td> </tr> </table> <div class="aui_buttons"><asp:Button ID="btn" runat="server" Text="提交" CssClass="aui_state_highlight" onclick="btn_Click" /></div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/supplermemberinfo.aspx
ASP.NET
oos
4,558
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Text; using TREC.ECommerce; using TRECommon; using TREC.Entity; using TREC.Config; namespace TREC.Web.Suppler.ajax { /// <summary> /// ajaxSupplerValidator 的摘要说明 /// </summary> public class ajaxSupplerValidator : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; //context.Response.Write("Hello World"); switch (GetParams("type",context)) { case "checkcompanytitle": context.Response.Write(GetCompanyTitle(GetParams("txttitle", context))); break; case "checkcompanytitle2": context.Response.Write(GetCompanyTitle(GetParams("txtcompanytitle", context))); break; case "checkbrandtitle": context.Response.Write(GetBrandTitle(GetParams("txttitle", context))); break; case "checkbrandtitle2": context.Response.Write(GetBrandTitle(GetParams("txtbrandtitle", context))); break; case "checkbrandtitleletter": context.Response.Write(GetBrandTitleLetter(GetParams("txtletter", context))); break; case "checkbrandtitleletter2": context.Response.Write(GetBrandTitleLetter(GetParams("txtbrandletter", context))); break; case "checkbrandstitle": context.Response.Write(GetBrandsTitle(GetParams("txttitle", context))); break; case "checkproductsku": context.Response.Write(GetProductSku(GetParams("txtsku", context))); break; case "checkshoptitle": context.Response.Write(GetShopTitle(GetParams("txttitle", context))); break; case "checkdealer": context.Response.Write(GetDealerTitle(GetParams("txttitle", context))); break; case "checkmarkettitle": context.Response.Write(GetMarketTitle(GetParams("txtmarkettitle", context))); break; case "checkmarkettitle2": context.Response.Write(GetMarketTitle(GetParams("txttitle", context))); break; case "checkmarketletter": context.Response.Write(GetMarketLetter(GetParams("txtletter", context))); break; default: context.Response.Write("找不到数据读取类型"); break; } context.Response.End(); } protected string GetMarketLetter(string letter) { if (ECMarket.ExitMarketLetter(letter) == 0) return letter + " 卖场索引可以添加"; return letter + " 卖场索引存在!"; } protected string GetMarketTitle(string title) { if (ECMarket.ExitMarket(title) == 0) return title + " 卖场名称可以添加"; return title + " 卖场名称存在!"; } protected string GetDealerTitle(string title) { if (ECDealer.ExitDealer(title) == 0) return title + " 经销商名称可以添加"; return title+" 经销商名称被占用!"; } protected string GetCompanyTitle(string title) { if (ECCompany.ExitComapnyTitle(title) == 0) return "该厂商名称可以注册!"; return "该用厂商名称己存在!"; } protected string GetBrandTitle(string title) { if (ECBrand.ExitBrandTitle(title) == 0) return "该品牌名称可以添加!"; return "该品牌名称己存在!"; } protected string GetBrandTitleLetter(string letter) { if (ECBrand.ExitBrandTitleLetter(letter) == 0) return "该品牌索引可以添加!"; return "该品牌索引己存在!"; } protected string GetBrandsTitle(string title) { if (ECBrand.ExitBrandsTitle(title) == 0) return "该系列名称可以添加!"; return "该系列名称己存在!"; } protected string GetProductSku(string sku) { if (ECProduct.ExitProductSku(sku) == 0) return sku+" 产品编号可以添加!"; return sku + " 产品编号己被占用!"; } protected string GetShopTitle(string title) { if (ECShop.ExitShopTitle(title) == 0) return title + " 店铺名称可以添加!"; return title + " 店铺名称己被占用!"; } protected string GetParams(string name,HttpContext context) { return context.Request.QueryString[name] == null ? context.Request.Params[name] == null ? context.Request.Form[name] == null ? "" : context.Request.Form[name].ToString() : context.Request.Params[name].ToString() : context.Request.QueryString[name].ToString(); } public bool IsReusable { get { return false; } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/ajax/ajaxSupplerValidator.ashx.cs
C#
oos
5,689
<%@ WebHandler Language="C#" CodeBehind="ajaxSupplerValidator.ashx.cs" Class="TREC.Web.Suppler.ajax.ajaxSupplerValidator" %>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/ajax/ajaxSupplerValidator.ashx
ASP.NET
oos
129
/* [Destoon B2B System] Copyright (c) 2008-2011 Destoon.COM This is NOT a freeware, use is subject to license.txt */ /* global */ * {word-break:break-all;font-family:Verdana,Arial;} body {background:#f1f9ff;color:#000000;font-size:12px;margin:0px;height:100%;} input,textarea,select,button,td {font-size:12px; } input,textarea,select,button{float:left; display:block;} input[type="text"]{width:160px;} textarea{width:380px;} img {border:none;} ul li {list-style-type:none;} ol li {list-style-type:decimal;} ul,form {margin:0px;padding:0px;} html {height:100%;} a:link,a:visited,a:active {text-decoration:none;color:#000000;} a:hover {color:#FF0000;text-decoration:none;} a.t:link,a.t:visited,a.t:active {text-decoration:none;color:#0240A3;} a.t:hover {color:#FF0000;} a.w:link,a.w:visited,a.w:active {text-decoration:none;color:#FFFFFF;} a.w:hover {color:#FAFAFA;} a.b:link,a.b:visited,a.b:active {text-decoration:none;color:#005590;} a.b:hover{color:#FF0000;} a.l:link,a.l:visited,a.l:active {text-decoration:underline;color:#005590;} a.l:hover{color:#FF0000;} a.n:link,a.n:visited,a.n:active {text-decoration:none;display:block;width:125px;color:#005590;font-size:14px;} a.n:hover{color:#FF6600;} a.m:link,a.m:visited,a.m:active {color:#666666;text-decoration:none;} a.m:hover {color:#FF6600;} a.f:link,a.f:visited,a.f:active,a.f:hover {text-decoration:none;display:block;width:125px;color:#888888;font-size:14px;} .helpBox{ position:absolute; width:800px; height:auto; left:50%; margin-left:-400px; margin-top:20px; background:#f1f9ff;} .helpBox .boxTitle{ position:relative; float:left; line-height:30px; width:100%;} .helpBox .boxTitle span{font-size:14px; font-weight:bold; display:block; float:left; width:100%; line-height:14px; height:14px; margin-bottom:10px;} .helpBox .boxTitle span.d{font-size:12px; font-weight:normal; color:#282828;width:100%;} .helpBox .boxTitle span.d strong{font-size:14px; color:#f60;} .helpBox .boxCon{ position:relative; width:800px; float:left;} .clear{ clear:both; float:left; width:100%; height:20px;}
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/html/style.css
CSS
oos
2,092
<!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> <title></title> <link rel="Stylesheet" type="text/css" href="style.css" /> <link rel="Stylesheet" type="text/css" href="../../resource/joyride/joyride-1.0.2.css" /> <script type="text/javascript" src="../../resource/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../../resource/joyride/jquery.joyride-1.0.2.min.js"></script> <script type="text/javascript" src="../../resource/joyride/jquery.poshytip.min.js"></script> <script type="text/javascript"> $(function () { $(this).joyride(); }) </script> </head> <body> <div class="helpBox"> <div class="boxTitle"> <span>亲爱的新会员您好:欢迎使用家具快搜供应商系统。</span> <span class="d">描述: 该页面用于<strong style="color:#f60; font-size:14px;">您新建登陆账号后,完善信息,以便家具快搜客服为您服务!</strong></span> </div> <div class="boxCon"> <img src="images/main.png" width="797px" height="607px" style="position:relative" /> <div id="t1" style=" position:absolute; top:493px; left:120px; width:100px; height:30px; z-index:100000;" ></div> <div id="t2" style=" position:absolute; top:193px; left:480px; width:100px; height:30px; z-index:100000;" ></div> <div id="t3" style=" position:absolute; top:337px; left:649px; width:100px; height:30px; z-index:100000;" ></div> </div> </div> <ol id="joyRideTipContent"> <li data-id="t1" data-text="下一步" class="custom"> <h2>第一步</h2> <p>选择您的商户分类,不同商户分类所对应得功能不同。</p> </li> <li data-id="t2" data-text="下一步"> <h2>第二步</h2> <p>录入您的账户联系信息,此处联系信息为对内联系方式,便于家具快搜与您快速取得联系,不对外公开。</p> </li> <li data-id="t3" data-text="下一步"> <h2>第三步</h2> <p>输入好内容之后,请选择提交!</p> </li> </ol> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/html/f1.htm
HTML
oos
2,272
<!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> <title></title> <link rel="Stylesheet" type="text/css" href="style.css" /> <link rel="Stylesheet" type="text/css" href="../../resource/joyride/joyride-1.0.2.css" /> <script type="text/javascript" src="../../resource/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../../resource/joyride/jquery.joyride-1.0.2.min.js"></script> <script type="text/javascript"> $(function () { $(this).joyride(); }) </script> </head> <body> <div class="helpBox"> <div class="boxTitle"> <span>亲爱的新会员您好:欢迎使用家具快搜供应商系统。</span> <span class="d">描述: 该页面用于您新建账号后,将您的账号关联企业</span> </div> <div class="boxCon" style="background:url(images/l1.png); width:1010px; height:731px;"> <div class="clear" style="margin-top:50px;"><div id="t1">1</div></div> <div class="clear"><div id="t2">2</div></div> <div class="clear"><div id="t3">3</div></div> </div> </div> <ol id="joyRideTipContent"> <li data-id="t1" data-text="Next" class="custom"> <h2>Stop #1</h2> <p>You can control all the details for you tour stop. Any valid HTML will work inside of Joyride.</p> </li> <li data-id="t2" data-text="Next"> <h2>Stop #2</h2> <p>Get the details right by styling Joyride with a custom stylesheet!</p> </li> <li data-id="t3" data-text="Close"> <h2>Stop #3</h2> <p>Now what are you waiting for? Add this to your projects and get the most out of your apps!</p> </li> </ol> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/html/l1.htm
HTML
oos
1,863
<!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> <title></title> <link rel="Stylesheet" type="text/css" href="style.css" /> </head> <body> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/html/index.htm
HTML
oos
301
<!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> <title></title> <link rel="Stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="../script/easytabs.js"></script> <script type="text/javascript"> </script> <style type="text/css"> .boxTitle ul{width:100%;background:#3399CC;} .boxTitle ul li{float:left; padding:5px; background:#3399CC; color:#ffffff; font-weight:bold; width:146px;} .boxTitle ul li a{color:#fff; padding-left:5px;} .boxTitle ul li a.tabactive{color:#3399CC; background:#ffffff; display:block;} </style> </head> <body> <div class="helpBox"> <div class="boxTitle menus"> <ul> <li><a href="#" onmouseover="easytabs('1', '1');" onfocus="easytabs('1', '1');" onclick="return false;" title="" id="tablink1">品牌厂家</a></li> <li><a href="#" onmouseover="easytabs('1', '2');" onfocus="easytabs('1', '2');" onclick="return false;" title="" id="tablink2">经销店铺</a></li> <li><a href="#" onmouseover="easytabs('1', '3');" onfocus="easytabs('1', '3');" onclick="return false;" title="" id="tablink3">产品</a></li> <li><a href="#" onmouseover="easytabs('1', '4');" onfocus="easytabs('1', '4');" onclick="return false;" title="" id="tablink4">卖场</a></li> </ul> </div> <div id="tabcontent1"> <img src="images/company.png" width="624" height="427" /> </div> <div id="tabcontent2"> <img src="images/shop1.png" width="624" height="421" /> </div> <div id="tabcontent3"> <img src="images/product.jpg" width="624" height="440" /> </div> <div id="tabcontent4"> <img src="images/company.png" width="624" height="" /> </div> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/html/pic.htm
HTML
oos
1,958
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.company { public partial class companyinfo : SupplerPageBase { public string areaCode = ""; public EnMember _memberInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlstaffsize.Items.Clear(); ddlstaffsize.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.企业配置 + " and type="+(int)EnumConfigByEnterprise.人员规模); ddlstaffsize.DataTextField = "title"; ddlstaffsize.DataValueField = "value"; ddlstaffsize.DataBind(); ddlstaffsize.Items.Insert(0, new ListItem("请选择", "")); ddlPro.Items.Clear(); ddlPro.DataSource = ECArea.GetAreaList(" parentcode=0"); ddlPro.DataTextField = "areaname"; ddlPro.DataValueField = "areacode"; ddlPro.DataBind(); ddlPro.Items.Insert(0, new ListItem("请选择", "")); ddlregcity.Items.Clear(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlauditstatus.Items.Clear(); WebControlBind.DrpBind(typeof(EnumAuditStatus), ddlauditstatus); ddlauditstatus.Items.Insert(0, new ListItem("请选择", "")); ShowData(); } } protected void ShowData() { EnCompany model = ECCompany.GetCompanyInfo(" where id=" + companyInfo.id); if (model != null) { txttitle.Text = model.title; areaCode = model.areacode; this.txtaddress.Text = model.address; this.ddlstaffsize.SelectedValue = model.staffsize.ToString(); this.txtregyear.Text = model.regyear; if (!string.IsNullOrEmpty(model.regcity)) { this.ddlregcity.SelectedValue = model.regcity; this.ddlPro.SelectedValue = model.regcity.Substring(0, 2) + "0000"; if (model.regcity != model.regcity.Substring(0, 2) + "0000") { ddlregcity.Items.Clear(); ddlregcity.DataSource = ECArea.GetAreaList(" parentcode=" + ddlPro.SelectedValue); ddlregcity.DataTextField = "areaname"; ddlregcity.DataValueField = "areacode"; ddlregcity.DataBind(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlregcity.SelectedValue = model.regcity; } } this.txtlinkman.Text = model.linkman; this.txtphone.Text = model.phone; this.txtmphone.Text = model.mphone; this.txtfax.Text = model.fax; this.txtemail.Text = model.email; this.txtpostcode.Text = model.postcode; this.txthomepage.Text = model.homepage; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.txtdescript.Text = model.descript; this.ddlauditstatus.SelectedValue = model.auditstatus.ToString(); } } protected void btnSave_Click(object sender, EventArgs e) { EnCompany model = ECCompany.GetCompanyInfo(" where id=" + companyInfo.id); if (model == null) { model = new EnCompany(); model.mapapi = ""; model.createmid = 0; } int mid = memberInfo.id; string title = txttitle.Text; string areacode = Request.Form["ddlareacode_value"] == null ? Request.Params["ddlareacode_value"] == null ? "" : Request.Params["ddlareacode_value"].ToString() : Request.Form["ddlareacode_value"]; string address = this.txtaddress.Text; int staffsize = TypeConverter.StrToInt(Request.Params["ddlstaffsize"].ToString()); string regyear = this.txtregyear.Text; string regcity = Request.Form["ddlregcity"] == null ? Request.Form["ddlregcity"] == null ? "" : Request.Form["ddlregcity"].ToString() : Request.Form["ddlregcity"].ToString(); string sell = ""; string linkman = this.txtlinkman.Text; string phone = this.txtphone.Text; string mphone = this.txtmphone.Text; string fax = this.txtfax.Text; string email = this.txtemail.Text; string postcode = this.txtpostcode.Text; string homepage = this.txthomepage.Text; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string descript = this.txtdescript.Text; DateTime lastedittime = DateTime.Now; int auditstatus = TypeConverter.StrToInt(ddlauditstatus.SelectedValue); model.mid = mid; model.title = title; model.areacode = areacode; model.address = address; model.staffsize = staffsize; model.regyear = regyear; model.regcity = regcity; model.sell = sell; model.linkman = linkman; model.phone = phone; model.mphone = mphone; model.fax = fax; model.email = email; model.postcode = postcode; model.homepage = homepage; model.thumb = thumb; model.bannel = bannel; model.descript = descript; model.lastedid = model.mid; model.lastedittime = lastedittime; model.auditstatus = auditstatus; int aid = ECCompany.EditCompany(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Company, aid, EnFilePath.Thumb)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Company, 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) { 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, "编辑成功!", "companyinfo.aspx", "Success"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/company/companyinfo.aspx.cs
C#
oos
8,031
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="companyinfo.aspx.cs" Inherits="TREC.Web.Suppler.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="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/company-setup1.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=company&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); }); $("#btnSearch").click(function () { $.ajax({ url: "<%=ECommon.WebUrl %>/ajax/ajaxuser.ashx", data: "type=getnoaddmember&v=" + $("#txtSearch").val(), dataType: "json", success: function (data) { if (data != "") { $("#ddlmember").html(); $("#ddlmember").html("<option value=\"\">请选择</option>"); $.each(data, function (i) { $("#ddlmember").append("<option value=\"" + data[i].id + "\">" + data[i].name + "</option>"); }); } } }) }) $("#ddlPro").live("change", function () { if ($(this).val() != "" && $(this).val() != "0") { $.ajax({ url: "<%=ECommon.WebUrl %>/ajaxtools/ajaxarea.ashx", data: "type=c&p=" + $(this).val(), success: function (data) { $("#ddlregcity").html(data) }, error: function (d, m) { alert(m); } }); } }) }); </script> </head> <body style="height: auto"> <form id="form1" runat="server"> <table class="formTable"> <tr> <td align="right" width="80"> 工厂名称: </td> <td width="340"> <asp:TextBox ID="txttitle" runat="server" CssClass="input w160"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div> <label>&nbsp;&nbsp;(名称系统默认第一次为联系人名称,请修改)</label> </td> </tr> <tr> <td align="right"> 缩&nbsp;略&nbsp;图:<a href="javascript:;" class="helper" title="点击查看图片位置示意"><img src="../images/d1.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Company, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>"> <asp:HiddenField ID="hfthumb" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File3" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right" valign="top"> 工厂展示:<a href="javascript:;" class="helper" title="点击查看图片位置示意"><img src="../images/d2.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Company, ECommon.QueryId, TREC.Entity.EnFilePath.Banner)%>"> <asp:HiddenField ID="hfbannel" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File4" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 人员规格 : </td> <td> <asp:DropDownList ID="ddlstaffsize" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> </td> </tr> <tr style="display: none"> <td align="right"> 注册年份: </td> <td> <asp:TextBox ID="txtregyear" runat="server" CssClass="input w160 required digits"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 注册城市: </td> <td> <asp:DropDownList ID="ddlPro" runat="server" CssClass="select"> </asp:DropDownList> <asp:DropDownList ID="ddlregcity" runat="server" CssClass="select"> </asp:DropDownList> </td> </tr> <tr style="display: none"> <td align="right"> 联系人: </td> <td> <asp:TextBox ID="txtlinkman" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 手机 : </td> <td> <asp:TextBox ID="txtmphone" runat="server" CssClass="input w160 digits"></asp:TextBox> </td> </tr> <tr> <td align="right"> 电话 : </td> <td> <asp:TextBox ID="txtphone" runat="server" CssClass="input w160"></asp:TextBox> <div id="txtphoneTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 传真 : </td> <td> <asp:TextBox ID="txtfax" runat="server" CssClass="input w160"></asp:TextBox> <div id="txtfaxTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 邮箱 : </td> <td> <asp:TextBox ID="txtemail" runat="server" CssClass="input w160 email"></asp:TextBox> <div id="txtemailTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right" 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 required w380"></asp:TextBox> </td> </tr> <tr> <td align="right"> 邮编 : </td> <td> <asp:TextBox ID="txtpostcode" runat="server" CssClass="input w160 digits"></asp:TextBox> </td> </tr> <tr> <td align="right"> 网址 : </td> <td> <asp:TextBox ID="txthomepage" runat="server" CssClass="input w160"></asp:TextBox><label>&nbsp;&nbsp;(以http://开始, 例:http://www.baidu.com)</label> </td> </tr> <tr> <td align="right" valign="top"> 介绍 : </td> <td colspan="2"> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="660" Height="220"></asp:TextBox> </td> </tr> <tr style="display: none"> <td width="70px" align="right"> 审核: </td> <td colspan="2"> <asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select" Width="160" Enabled="false"> </asp:DropDownList> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 100px"> <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="submit" OnClick="btnSave_Click" /><input name="重置" type="reset" class="submit" value="重置" /> </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/company/companyinfo.aspx
ASP.NET
oos
12,635
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace TREC.Web.Suppler { public partial class main : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/main.aspx.cs
C#
oos
334
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_company { public partial class setup2 : SupplerPageBase { public string areaCode = ""; public EnCompany _companyInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlcompany.Items.Clear(); ddlcompany.DataSource = ECCompany.GetCompanyList(1, 20, "", out tmpPageCount); ddlcompany.DataTextField = "title"; ddlcompany.DataValueField = "id"; ddlcompany.DataBind(); ddlcompany.Items.Insert(0, new ListItem("选择厂商", "")); ddlcompany.Items.Insert(1, new ListItem("无关联工厂", "0")); ddlstyle.Items.Clear(); ddlstyle.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品风格); ddlstyle.DataTextField = "title"; ddlstyle.DataValueField = "value"; ddlstyle.DataBind(); ddlstyle.Items.Insert(0, new ListItem("选择风格", "")); ddlmaterial.Items.Clear(); ddlmaterial.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品选材); ddlmaterial.DataTextField = "title"; ddlmaterial.DataValueField = "value"; ddlmaterial.DataBind(); ddlmaterial.Items.Insert(0, new ListItem("选择选材", "")); ddlspread.Items.Clear(); ddlspread.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品价位); ddlspread.DataTextField = "title"; ddlspread.DataValueField = "value"; ddlspread.DataBind(); ddlspread.Items.Insert(0, new ListItem("选择价位", "")); ddlcolor.Items.Clear(); ddlcolor.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.产品配置 + " and type=" + (int)EnumConfigByProduct.产品颜色); ddlcolor.DataTextField = "title"; ddlcolor.DataValueField = "value"; ddlcolor.DataBind(); ddlcolor.Items.Insert(0, new ListItem("选择颜色", "")); ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnBrand model = ECBrand.GetBrandInfo(" where id=" + ECommon.QueryId); if (model != null) { if (model != null && model.companyid != 0) { _companyInfo = ECCompany.GetCompanyInfo(" where id=" + model.companyid); this.ddlcompany.Items.Clear(); this.ddlcompany.Items.Insert(0, new ListItem(_companyInfo.title, model.companyid.ToString())); this.ddlcompany.Enabled = false; } txttitle.Text = model.title; this.txtletter.Text = model.letter; this.ddlstyle.SelectedValue = model.style; this.ddlmaterial.SelectedValue = model.material; this.ddlspread.SelectedValue = model.spread; this.ddlcolor.SelectedValue = model.color; this.hfsurface.Value = model.surface; this.hflogo.Value = model.logo; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.hfdesimage.Value = model.desimage; this.txtdescript.Text = model.descript; //SetPermission(model.createmid, model.companyid, 0, 0, 0, model.id, (System.Web.UI.WebControls.WebControl)btnSave, (System.Web.UI.HtmlControls.HtmlControl)btnRequest); } } } protected void btnSave_Click(object sender, EventArgs e) { EnBrand model = null; string strErr = ""; if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECBrand.GetBrandInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); if (model == null) if (model == null) { model = new EnBrand(); } } else { model = new EnBrand(); model.createmid = 0; model.productcount = 0; model.createmid = memberInfo.id; model.attribute = ""; model.keywords = ""; model.template = "default"; model.homepage = ""; model.hits = 0; model.sort = 0; model.auditstatus = 0; model.linestatus = 0; } int companyid = 0; if (memberInfo.type == (int)EnumMemberType.工厂企业) { companyid = companyInfo.id; } else { companyid = TypeConverter.StrToInt(ddlcompany.SelectedValue); } string title = txttitle.Text; string letter = this.txtletter.Text; string productcategory = ""; string style = ddlstyle.SelectedValue; string material = ddlmaterial.SelectedValue; string spread = ddlspread.SelectedValue; string color = ddlcolor.SelectedValue; string surface = this.hfsurface.Value; string logo = this.hflogo.Value; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string desimage = this.hfdesimage.Value; string descript = this.txtdescript.Text; DateTime lastedittime = DateTime.Now; model.companyid = companyid; model.title = title; model.letter = letter; model.productcategory = productcategory; model.style = style; model.material = material; model.spread = spread; model.color = color; model.surface = surface; model.logo = logo; model.thumb = thumb; model.bannel = bannel; model.desimage = desimage; model.descript = descript; model.lastedittime = lastedittime; int aid = ECBrand.EditBrand(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (surface.Length > 0) { surface = surface.StartsWith(",") ? surface.Substring(1, surface.Length - 1) : surface; surface = surface.EndsWith(",") ? surface.Substring(0, surface.Length - 1) : surface; ecUpload.MoveFiles(surface.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.Surface)); } if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.Thumb)); } if (logo.Length > 0) { ecUpload.MoveFiles(logo.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.Logo)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.Banner)); } if (desimage.Length > 0) { ecUpload.MoveFiles(desimage.Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.DesImage)); } StringBuilder imglist = Utils.GetImgUrl(model.descript); if (Utils.GetImgUrl(model.descript).Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ECBrand.UpConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Brand, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Brand, aid, EnFilePath.ConImage)); } } Response.Redirect("setup3.aspx"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_company/setup2.aspx.cs
C#
oos
9,765
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setup3.aspx.cs" Inherits="TREC.Web.Suppler.f_company.setup3" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Collections.Generic" %> <%@ Register src="../ascx/head.ascx" tagname="head" tagprefix="uc1" %> <%@ Register src="nav.ascx" tagname="nav" tagprefix="uc2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title><%=ECommon.WebTitle%>-商务中心</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/company-brands.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=brands&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'link', 'fullscreen'] }); }); }); </script> </head> <body> <form id="form1" runat="server"> <uc1:head ID="head1" runat="server" /> <div class="Fcon setup"> <div class="setupTitle"> &nbsp;&nbsp;欢迎您进入家具快搜供应商管理系统,请先按顺序添加完成以下内容,以便正式上传产品。 </div> <div class="setupNext"> <uc2:nav ID="nav1" runat="server" /> </div> <div class="setupCon"> <%if (listbrands != null && listbrands.Count > 0) { %> <div class="info" style="width:727px"><span class="ico">&nbsp;</span>您己创建过品牌系列 <%foreach (EnBrands bs in listbrands) { %> &nbsp;<b><a href="javascript:;">[<%=GetBrandTitle(bs.brandid)%><%=bs.title%>]</a></b>&nbsp; <%} %> &nbsp;&nbsp;&nbsp;可&nbsp;<b><a href="../index.aspx" class="next">点击这里</a></b>&nbsp;进入下一步 </div> <%} %> <table width="100%" class="formTable"> <tr> <td align="right" width="70"> 选择品牌: </td> <td> <asp:DropDownList ID="ddlbrand" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlbrandTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 系列名称: </td> <td> <asp:TextBox ID="txttitle" runat="server" CssClass="input w160"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right" valign="top"> 介绍: </td> <td> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea " TextMode="MultiLine" Rows="5" Width="660" Height="200"></asp:TextBox> </td> </tr> <tr> <td align="right"> 排序 : </td> <td> <asp:TextBox ID="txtsort" runat="server" CssClass="input w160 digits">0</asp:TextBox> <div id="txtsortTip" style="width:280px; float:left"></div> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 120px"> <asp:Button ID="btnSave" runat="server" CssClass="submit" OnClick="btnSave_Click" /> </div> </div> </div> <div class="clear"></div> <div class="foot" style=" position:static; left:0px; background:#f4f4f4; bottom:0px; right:0px; width:100%; height:30px; display:none"> 底部 </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_company/setup3.aspx
ASP.NET
oos
6,139
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setup1.aspx.cs" Inherits="TREC.Web.Suppler.f_company.setup1" %> <%@ Import Namespace="TREC.Entity" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Register src="../ascx/head.ascx" tagname="head" tagprefix="uc1" %> <%@ Register src="nav.ascx" tagname="nav" tagprefix="uc2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title><%=ECommon.WebTitle%>-商务中心</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" language="javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.poshytip.min.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/company-setup1.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=company&id=<%=TREC.ECommerce.ECommon.QueryId %>", <%} %> allowMediaUpload: true, items: [ 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist', 'insertunorderedlist', '|', 'image', 'flash', 'media', 'link', 'fullscreen'] }); }); $("#btnSearch").click(function () { $.ajax({ url: "<%=ECommon.WebUrl %>/ajax/ajaxuser.ashx", data: "type=getnoaddmember&v=" + $("#txtSearch").val(), dataType: "json", success: function (data) { if (data != "") { $("#ddlmember").html(); $("#ddlmember").html("<option value=\"\">请选择</option>"); $.each(data, function (i) { $("#ddlmember").append("<option value=\"" + data[i].id + "\">" + data[i].name + "</option>"); }); } } }) }); $("#ddlPro").live("change", function () { if ($(this).val() != "" && $(this).val() != "0") { $.ajax({ url: "<%=ECommon.WebUrl %>/ajaxtools/ajaxarea.ashx", data: "type=c&p=" + $(this).val(), success: function (data) { $("#ddlregcity").html(data) }, error: function (d, m) { alert(m); } }); } }) }); </script> </head> <body> <form id="form1" runat="server"> <uc1:head ID="head1" runat="server" /> <div class="Fcon setup"> <div class="setupTitle"> &nbsp;&nbsp;欢迎您进入家具快搜供应商管理系统,请先按顺序添加完成以下内容,以便正式上传产品。 </div> <div class="setupNext"> <uc2:nav ID="nav1" runat="server" /> </div> <div class="setupCon"> <table class="formTable"> <tr> <td align="right" width="80"> 工厂名称: </td> <td width="340"> <asp:TextBox ID="txttitle" runat="server" CssClass="input w160"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div> <label>&nbsp;&nbsp;(名称系统默认第一次为联系人名称,请修改)</label> </td> </tr> <tr> <td align="right"> 缩&nbsp;略&nbsp;图:<a href="javascript:;" class="helper" title="点击查看图片位置示意"><img src="../images/d1.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Company, ECommon.QueryId, TREC.Entity.EnFilePath.Thumb)%>"> <asp:HiddenField ID="hfthumb" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File3" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right" valign="top"> 工厂展示:<a href="javascript:;" class="helper" title="点击查看图片位置示意"><img src="../images/d2.gif" width="515px" height="582px" /></a> </td> <td> <div class="fileUpload m" path="<%=string.Format(TREC.Entity.EnFilePath.Company, ECommon.QueryId, TREC.Entity.EnFilePath.Banner)%>"> <asp:HiddenField ID="hfbannel" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File4" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 人员规格 : </td> <td> <asp:DropDownList ID="ddlstaffsize" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> </td> </tr> <tr style="display: none"> <td align="right"> 注册年份: </td> <td> <asp:TextBox ID="txtregyear" runat="server" CssClass="input w160 required digits"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 注册城市: </td> <td> <asp:DropDownList ID="ddlPro" runat="server" CssClass="select"> </asp:DropDownList> <asp:DropDownList ID="ddlregcity" runat="server" CssClass="select"> </asp:DropDownList> </td> </tr> <tr style="display: none"> <td align="right"> 联系人: </td> <td> <asp:TextBox ID="txtlinkman" runat="server" CssClass="input w160"></asp:TextBox> </td> </tr> <tr style="display: none"> <td align="right"> 手机 : </td> <td> <asp:TextBox ID="txtmphone" runat="server" CssClass="input w160 digits"></asp:TextBox> </td> </tr> <tr> <td align="right"> 电话 : </td> <td> <asp:TextBox ID="txtphone" runat="server" CssClass="input w160"></asp:TextBox> <div id="txtphoneTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 传真 : </td> <td> <asp:TextBox ID="txtfax" runat="server" CssClass="input w160"></asp:TextBox> <div id="txtfaxTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 邮箱 : </td> <td> <asp:TextBox ID="txtemail" runat="server" CssClass="input w160 email"></asp:TextBox> <div id="txtemailTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right" 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 required w380"></asp:TextBox> </td> </tr> <tr> <td align="right"> 邮编 : </td> <td> <asp:TextBox ID="txtpostcode" runat="server" CssClass="input w160 digits"></asp:TextBox> </td> </tr> <tr> <td align="right"> 网址 : </td> <td> <asp:TextBox ID="txthomepage" runat="server" CssClass="input w160"></asp:TextBox><label>&nbsp;&nbsp;(以http://开始, 例:http://www.baidu.com)</label> </td> </tr> <tr> <td align="right" valign="top"> 介绍 : </td> <td colspan="2"> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea required" TextMode="MultiLine" Rows="5" Width="660" Height="220"></asp:TextBox> </td> </tr> <tr style="display: none"> <td width="70px" align="right"> 审核: </td> <td colspan="2"> <asp:DropDownList ID="ddlauditstatus" runat="server" CssClass="select" Width="160" Enabled="false"> </asp:DropDownList> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 120px"> <asp:Button ID="btnSave" runat="server" CssClass="submit" OnClick="btnSave_Click" /> </div> </div> </div> <div class="clear"></div> <div class="foot" style=" position:static; left:0px; background:#f4f4f4; bottom:0px; right:0px; width:100%; height:30px; display:none"> 底部 </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_company/setup1.aspx
ASP.NET
oos
13,307
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_company { public partial class setup3 : SupplerPageBase { public string areaCode = ""; public EnBrand _brandInfo = null; public List<EnBrands> listbrands = new List<EnBrands>(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { listbrands = ECBrand.GetBrandsList(" brandid in (" + SupplerPageBase.brandidlist + ")"); string strWhere = ""; switch (memberInfo.type) { case (int)EnumMemberType.工厂企业: strWhere = " companyid=" + companyInfo.id; break; case (int)EnumMemberType.经销商: strWhere = " id in (select brandid from " + TableName.TBAppBrand + " where dealerid=" + dealerInfo.id + " and apptype=" + (int)EnumAppBrandType.申请新建品牌 + ") "; break; } ddlbrand.Items.Clear(); ddlbrand.DataSource = ECBrand.GetBrandList(1, 20, strWhere, out tmpPageCount); ddlbrand.DataTextField = "title"; ddlbrand.DataValueField = "id"; ddlbrand.DataBind(); ddlbrand.Items.Insert(0, new ListItem("请选择", "")); if (tmpPageCount == 0) { ScriptUtils.ShowAndRedirect("请选添加品牌", "appbrand.aspx"); } ShowData(); } } protected void ShowData() { if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { EnBrands model = ECBrand.GetBrandsInfo(" where id=" + ECommon.QueryId); if (model != null) { if (model != null && model.brandid != 0) { _brandInfo = ECBrand.GetBrandInfo(" where id=" + model.brandid); this.ddlbrand.Items.Clear(); this.ddlbrand.Items.Insert(0, new ListItem(_brandInfo.title, model.brandid.ToString())); this.ddlbrand.Enabled = false; } txttitle.Text = model.title; this.txtdescript.Text = model.descript; this.txtsort.Text = model.sort.ToString(); //SetPermission(model.createmid, 0, 0, 0, 0, model.brandid, (System.Web.UI.WebControls.WebControl)btnSave, (System.Web.UI.HtmlControls.HtmlControl)btnRequest); } } } protected string GetBrandTitle(int bid) { if (brandList == null || brandList.Count == 0) return ""; return brandList.Single(x => x.id == bid).title + "-"; } protected void btnSave_Click(object sender, EventArgs e) { EnBrands model = null; string strErr = ""; if (strErr != "") { //MessageBox.Show(this, strErr); return; } if (ECommon.QueryId != "" && ECommon.QueryEdit != "") { model = ECBrand.GetBrandsInfo(" where id=" + ECommon.QueryId); model.id = TypeConverter.StrToInt(ECommon.QueryId); if (model == null) { model = new EnBrands(); } } else { model = new EnBrands(); model.createmid = 0; model.productcount = 0; model.style = ""; model.spread = ""; model.material = ""; model.createmid = memberInfo.id; model.attribute = ""; model.surface = ""; model.logo = ""; model.thumb = ""; model.bannel = ""; model.desimage = ""; model.keywords = ""; model.template = ""; model.hits = 0; model.auditstatus = 0; model.linestatus = 0; model.letter = ""; } int brandid = TypeConverter.StrToInt(ddlbrand.SelectedValue); string title = txttitle.Text; string descript = this.txtdescript.Text; int sort = TypeConverter.StrToInt(this.txtsort.Text); DateTime lastedittime = DateTime.Now; model.brandid = brandid; model.title = title; model.descript = descript; model.sort = sort; model.lastedittime = lastedittime; int aid = ECBrand.EditBrands(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); StringBuilder imglist = Utils.GetImgUrl(model.descript); if (Utils.GetImgUrl(model.descript).Length > 0) { string strConFilePath = ""; foreach (string s in imglist.ToString().Split(',')) { if (s.Contains(TREC.Entity.EnFilePath.tmpRootPath)) { strConFilePath += s + ","; } } if (strConFilePath.Length > 0) { ECBrand.UpBrandsConFilePath(ECommon.RepFilePathContent(model.descript, TREC.Entity.EnFilePath.tmpRootPath, string.Format(EnFilePath.Brands, aid, EnFilePath.ConImage)), aid); ecUpload.MoveContentFiles(strConFilePath.Replace(TREC.Entity.EnFilePath.tmpRootPath, "").Split(','), string.Format(EnFilePath.Brands, aid, EnFilePath.ConImage)); } } Response.Redirect("../index.aspx"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_company/setup3.aspx.cs
C#
oos
6,376
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_company { public partial class nav : System.Web.UI.UserControl { protected string s1css = "", s2css = "", s3css = "", s4css = "", s1url = "javascript:;", s2url = "javascript:;", s3url = "javascript:;", s4url = "javascript:;"; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (SupplerPageBase.companyInfo != null && SupplerPageBase.companyInfo.id != 0) { bool hasCompany = false, hasBrand = false, hasBrands = false; s1css = "now"; s1url = "javascript:;"; if (SupplerPageBase.companyInfo.title != null && SupplerPageBase.companyInfo.title != "" && SupplerPageBase.companyInfo.phone != null && SupplerPageBase.companyInfo.phone != "" && SupplerPageBase.companyInfo.areacode != null && SupplerPageBase.companyInfo.areacode != "" && SupplerPageBase.companyInfo.address != null && SupplerPageBase.companyInfo.address != "") { hasCompany = true; s1css = "has"; s1url = "setup1.aspx"; s2css = "now"; s2url = "setup2.aspx"; } if (WebUtils.GetPageName() != "setup1.aspx" && (SupplerPageBase.companyInfo.title == null || SupplerPageBase.companyInfo.title == "" || SupplerPageBase.companyInfo.phone == null || SupplerPageBase.companyInfo.phone == "" || SupplerPageBase.companyInfo.address == null || SupplerPageBase.companyInfo.address == "")) { Response.Redirect("setup1.aspx"); return; } if (SupplerPageBase.brandidlist != "0" && SupplerPageBase.brandList != null && SupplerPageBase.brandList.Count > 0) { hasBrand = true; s2css = "has"; s3css = "now"; s3url = "setup3.aspx"; } if (WebUtils.GetPageName() != "setup2.aspx" && WebUtils.GetPageName() != "setup1.aspx" && (SupplerPageBase.brandList == null || SupplerPageBase.brandList.Count <= 0)) { Response.Redirect("setup2.aspx"); return; } if (SupplerPageBase.brandList != null && SupplerPageBase.brandidlist != "0" && ECBrand.GetBrandsList(" brandid in (" + SupplerPageBase.brandidlist + ")").Count > 0) { hasBrands = true; s3url = "setup3.aspx"; s3css = "has"; s4css = "now"; s4url = "../index.aspx"; } } else { Response.Redirect("../supplerindex"); return; } } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_company/nav.ascx.cs
C#
oos
3,377
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Text; using TRECommon; using TREC.ECommerce; using TREC.Entity; namespace TREC.Web.Suppler.f_company { public partial class setup1 : SupplerPageBase { public string areaCode = ""; public EnMember _memberInfo = null; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ddlstaffsize.Items.Clear(); ddlstaffsize.DataSource = ECConfig.GetConfigList(" module=" + (int)EnumConfigModule.企业配置 + " and type=" + (int)EnumConfigByEnterprise.人员规模); ddlstaffsize.DataTextField = "title"; ddlstaffsize.DataValueField = "value"; ddlstaffsize.DataBind(); ddlstaffsize.Items.Insert(0, new ListItem("请选择", "")); ddlPro.Items.Clear(); ddlPro.DataSource = ECArea.GetAreaList(" parentcode=0"); ddlPro.DataTextField = "areaname"; ddlPro.DataValueField = "areacode"; ddlPro.DataBind(); ddlPro.Items.Insert(0, new ListItem("请选择", "")); ddlregcity.Items.Clear(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlauditstatus.Items.Clear(); WebControlBind.DrpBind(typeof(EnumAuditStatus), ddlauditstatus); ddlauditstatus.Items.Insert(0, new ListItem("请选择", "")); ShowData(); } } protected void ShowData() { EnCompany model = ECCompany.GetCompanyInfo(" where id=" + companyInfo.id); if (model != null) { txttitle.Text = model.title; areaCode = model.areacode; this.txtaddress.Text = model.address; this.ddlstaffsize.SelectedValue = model.staffsize.ToString(); this.txtregyear.Text = model.regyear; if (!string.IsNullOrEmpty(model.regcity)) { this.ddlregcity.SelectedValue = model.regcity; this.ddlPro.SelectedValue = model.regcity.Substring(0, 2) + "0000"; if (model.regcity != model.regcity.Substring(0, 2) + "0000") { ddlregcity.Items.Clear(); ddlregcity.DataSource = ECArea.GetAreaList(" parentcode=" + ddlPro.SelectedValue); ddlregcity.DataTextField = "areaname"; ddlregcity.DataValueField = "areacode"; ddlregcity.DataBind(); ddlregcity.Items.Insert(0, new ListItem("请选择省份", "")); ddlregcity.SelectedValue = model.regcity; } } this.txtlinkman.Text = model.linkman; this.txtphone.Text = model.phone; this.txtmphone.Text = model.mphone; this.txtfax.Text = model.fax; this.txtemail.Text = model.email; this.txtpostcode.Text = model.postcode; this.txthomepage.Text = model.homepage; this.hfthumb.Value = model.thumb; this.hfbannel.Value = model.bannel; this.txtdescript.Text = model.descript; this.ddlauditstatus.SelectedValue = model.auditstatus.ToString(); } } protected void btnSave_Click(object sender, EventArgs e) { EnCompany model = ECCompany.GetCompanyInfo(" where id=" + companyInfo.id); if (model == null) { model = new EnCompany(); model.mapapi = ""; model.createmid = 0; } int mid = memberInfo.id; string title = txttitle.Text; string areacode = Request.Form["ddlareacode_value"] == null ? Request.Params["ddlareacode_value"] == null ? "" : Request.Params["ddlareacode_value"].ToString() : Request.Form["ddlareacode_value"]; string address = this.txtaddress.Text; int staffsize = TypeConverter.StrToInt(Request.Params["ddlstaffsize"].ToString()); string regyear = this.txtregyear.Text; string regcity = Request.Form["ddlregcity"] == null ? Request.Form["ddlregcity"] == null ? "" : Request.Form["ddlregcity"].ToString() : Request.Form["ddlregcity"].ToString(); string sell = ""; string linkman = this.txtlinkman.Text; string phone = this.txtphone.Text; string mphone = this.txtmphone.Text; string fax = this.txtfax.Text; string email = this.txtemail.Text; string postcode = this.txtpostcode.Text; string homepage = this.txthomepage.Text; string thumb = this.hfthumb.Value; string bannel = this.hfbannel.Value; string descript = this.txtdescript.Text; DateTime lastedittime = DateTime.Now; int auditstatus = TypeConverter.StrToInt(ddlauditstatus.SelectedValue); model.mid = mid; model.title = title; model.areacode = areacode; model.address = address; model.staffsize = staffsize; model.regyear = regyear; model.regcity = regcity; model.sell = sell; model.linkman = linkman; model.phone = phone; model.mphone = mphone; model.fax = fax; model.email = email; model.postcode = postcode; model.homepage = homepage; model.thumb = thumb; model.bannel = bannel; model.descript = descript; model.lastedid = model.mid; model.lastedittime = lastedittime; model.auditstatus = auditstatus; int aid = ECCompany.EditCompany(model); if (aid > 0) { ECUpLoad ecUpload = new ECUpLoad(); if (thumb.Length > 0) { ecUpload.MoveFiles(thumb.Split(','), string.Format(EnFilePath.Company, aid, EnFilePath.Thumb)); } if (bannel.Length > 0) { ecUpload.MoveFiles(bannel.Split(','), string.Format(EnFilePath.Company, 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) { 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)); } } Response.Redirect("setup2.aspx"); } } } }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_company/setup1.aspx.cs
C#
oos
7,865
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="nav.ascx.cs" Inherits="TREC.Web.Suppler.f_company.nav" %> <ul> <li class="<%=s1css %>"><a href="<%=s1url %>"><p>第一步</p><p>添加供应商基本信息</p></a></li> <li class="<%=s2css %>"><a href="<%=s2url %>"><p>第二步</p><p>添加品牌信息</p></a></li> <li class="<%=s3css %>"><a href="<%=s3url %>"><p>第三步</p><p>添加系列</p></a></li> <li class="<%=s4css %>"><a href="<%=s4url %>"><p>第四步</p><p>可以正常使用供应商管理系统</p></a></li> </ul>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_company/nav.ascx
ASP.NET
oos
569
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="setup2.aspx.cs" Inherits="TREC.Web.Suppler.f_company.setup2" %> <%@ Register src="../ascx/head.ascx" tagname="head" tagprefix="uc1" %> <%@ Register src="nav.ascx" tagname="nav" tagprefix="uc2" %> <%@ Import Namespace="TREC.ECommerce" %> <%@ Import Namespace="TREC.Entity" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title><%=ECommon.WebTitle%>-商务中心</title> <link rel="stylesheet" type="text/css" href="../css/style.css" /> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="../script/formValidator-4.1.1.js" charset="UTF-8"></script> <script type="text/javascript" src="../script/formValidatorRegex.js" charset="UTF-8"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/script/jquery.form.js"></script> <script type="text/javascript" src="<%=ECommon.WebResourceUrl %>/My97DatePicker/WdatePicker.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/jquery.area.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/kindeditor-min.js"></script> <script type="text/javascript" src="<%=TREC.ECommerce.ECommon.WebResourceUrl %>/script/fileupload.js"></script> <script type="text/javascript" src="../script/supplercommon.js"></script> <script type="text/javascript" src="../script/pageValitator/company-brand.js"></script> <script type="text/javascript"> $(function () { var editor; KindEditor.ready(function (K) { editor = K.create('#txtdescript', { allowPreviewEmoticons: true, allowImageUpload: true, allowFileManager: true, <%if (TREC.ECommerce.ECommon.QueryId != "" && TREC.ECommerce.ECommon.QueryEdit != "") { %> fileManagerJson:"<%=TREC.ECommerce.ECommon.WebResourceUrl %>/editor/kindeditor/ashx/file_manager_json.ashx?m=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=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> <form id="form1" runat="server"> <uc1:head ID="head1" runat="server" /> <div class="Fcon setup"> <div class="setupTitle"> &nbsp;&nbsp;欢迎您进入家具快搜供应商管理系统,请先按顺序添加完成以下内容,以便正式上传产品。 </div> <div class="setupNext"> <uc2:nav ID="nav1" runat="server" /> </div> <div class="setupCon"> <%if (TREC.ECommerce.SupplerPageBase.brandList != null && TREC.ECommerce.SupplerPageBase.brandList.Count > 0) { %> <div class="info" style="width:727px"><span class="ico">&nbsp;</span><b>您己创建过</b> <%foreach (EnBrand b in TREC.ECommerce.SupplerPageBase.brandList) { %> &nbsp;&nbsp;<b><a href="javascript:;">[<%=b.title %>]</a></b>&nbsp; <%} %> <b><a href="setup3.aspx" class="next">点击这里</a></b>&nbsp;进入下一步 </div> <%} %> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable"> <%if (memberInfo.type != (int)TREC.Entity.EnumMemberType.工厂企业) { %> <tr> <th colspan="2"> 品牌所属工厂: </th> </tr> <tr> <td align="right" width="100"> 工厂查找: </td> <td> <asp:TextBox ID="txtSearch" runat="server" CssClass="w160 input"></asp:TextBox>&nbsp;<input type="button" class="submit" value="查找" id="btnSearch" /> </td> </tr> <tr> <td align="right"> 选择工厂: </td> <td> <asp:DropDownList ID="ddlcompany" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> (如果没有找到品牌工厂请选择<b>无关联工厂</b>) </td> </tr> <%} %> <tr> <td align="right" width="100"> 品牌名称: </td> <td> <asp:TextBox ID="txttitle" runat="server" CssClass="input w160"></asp:TextBox> <div id="txttitleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 名称索引: </td> <td> <asp:TextBox ID="txtletter" runat="server" CssClass="input w160"></asp:TextBox> <div id="txtletterTip" style="width:280px; float:left"></div> <label>(品牌英文名或拼音字母)</label> </td> </tr> <tr> <td align="right"> <asp:HiddenField ID="hfthumb" runat="server" /> <asp:HiddenField ID="hfbannel" runat="server" /> <asp:HiddenField ID="hfdesimage" runat="server" /> <asp:HiddenField ID="hfsurface" runat="server" /> 品牌标志: </td> <td> <div class="fileUpload" path="<%=string.Format(TREC.Entity.EnFilePath.Brand, ECommon.QueryId, TREC.Entity.EnFilePath.Logo)%>"> <asp:HiddenField ID="hflogo" runat="server" /> <div class="fileTools"> <input type="text" class="input w160 filedisplay" /> <a href="javascript:;" class="files"> <input id="File2" type="file" class="upload" onchange="_upfile(this)" runat="server" /></a> <span class="uploading">正在上传,请稍后……</span> </div> </div> </td> </tr> <tr> <td align="right"> 品牌档位: </td> <td> <asp:DropDownList ID="ddlspread" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlspreadTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 品牌材质: </td> <td> <asp:DropDownList ID="ddlmaterial" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlmaterialTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 品牌风格: </td> <td> <asp:DropDownList ID="ddlstyle" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlstyleTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right"> 品牌色系: </td> <td> <asp:DropDownList ID="ddlcolor" runat="server" CssClass="select selectNone" Width="160"> </asp:DropDownList> <div id="ddlcolorTip" style="width:280px; float:left"></div> </td> </tr> <tr> <td align="right" valign="top"> 品牌介绍: </td> <td> <asp:TextBox ID="txtdescript" runat="server" CssClass="textarea " TextMode="MultiLine" Rows="8" Width="98%" Height="220"></asp:TextBox> </td> </tr> </table> <div style="margin-top: 10px; margin-left: 100px"> <asp:Button ID="btnSave" runat="server" CssClass="submit" OnClick="btnSave_Click" /> </div> </div> </div> <div class="clear"></div> <div class="foot" style=" position:static; left:0px; background:#f4f4f4; bottom:0px; right:0px; width:100%; height:30px; display:none"> 底部 </div> </form> </body> </html>
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/f_company/setup2.aspx
ASP.NET
oos
10,718
.tip-yellowsimple { z-index:1000; text-align:left; border:1px solid #c7bf93; border-radius:4px; -moz-border-radius:4px; -webkit-border-radius:4px; padding:6px 8px; min-width:50px; max-width:300px; color:#000; background-color:#fff9c9; /** * - If you set a background-image, border/padding/background-color will be ingnored. * You can set any padding to .tip-inner instead if you need. * - If you want a tiled background-image and border/padding for the tip, * set the background-image to .tip-inner instead. */ } .tip-yellowsimple .tip-inner { font:12px/16px arial,helvetica,sans-serif; } /* Configure an arrow image - the script will automatically position it on the correct side of the tip */ .tip-yellowsimple .tip-arrow-top { margin-top:-6px; margin-left:-5px; /* approx. half the width to center it */ top:0; left:50%; width:9px; height:6px; background:url(tip-yellowsimple_arrows.gif) no-repeat; } .tip-yellowsimple .tip-arrow-right { margin-top:-4px; /* approx. half the height to center it */ margin-left:0; top:50%; left:100%; width:6px; height:9px; background:url(tip-yellowsimple_arrows.gif) no-repeat -9px 0; } .tip-yellowsimple .tip-arrow-bottom { margin-top:0; margin-left:-5px; /* approx. half the width to center it */ top:100%; left:50%; width:9px; height:6px; background:url(tip-yellowsimple_arrows.gif) no-repeat -18px 0; } .tip-yellowsimple .tip-arrow-left { margin-top:-4px; /* approx. half the height to center it */ margin-left:-6px; top:50%; left:0; width:6px; height:9px; background:url(tip-yellowsimple_arrows.gif) no-repeat -27px 0; }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/images/tip-yellowsimple.css
CSS
oos
1,617
$(document).ready(function () { $.formValidator.initConfig({ formID: "form1", theme: "ArrowSolidBox", submitOnce: false, onError: function (msg, obj, errorlist) { $("#errorlist").empty(); $.map(errorlist, function (msg) { $("#errorlist").append("<li>" + msg + "</li>") }); alert(msg); }, ajaxPrompt: '有数据正在异步验证,请稍等...' }); //验证工厂名 $("#txtmarkettitle").formValidator({ onShow: "请输入卖场名称,例:金盛国际家居广场(上海)", onFocus: "卖场名称至少3个字符,最多25个字符", onCorrect: "该卖场名称可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的卖场名称非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkmarkettitle", success: function (data) { if (data.indexOf("卖场名称可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用卖场名称不可用,请更换用卖场名称", onWait: "正在对用卖场名称进行合法性校验,请稍候..." }).defaultPassed(); $("#txtphone").formValidator({ empty: true, onShow: "请输入你的联系电话,可以为空哦", onFocus: "格式例如:0577-88888888", onCorrect: "谢谢你的合作", onEmpty: "你真的不想留联系电话了吗?" }).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的联系电话格式不正确" }); });
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/pageValitator/shopaddmarket.js
JavaScript
oos
1,960
$(document).ready(function () { $.formValidator.initConfig({ formID: "form1", theme: "ArrowSolidBox", submitOnce: false, onError: function (msg, obj, errorlist) { $("#errorlist").empty(); $.map(errorlist, function (msg) { $("#errorlist").append("<li>" + msg + "</li>") }); alert(msg); }, ajaxPrompt: '有数据正在异步验证,请稍等...' }); //验证工厂名 $("#txtsku").formValidator({ onShow: "请输入产品编号", onFocus: "产品编号至少3个字符,最多25个字符", onCorrect: "该产品编号可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的产品编号非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkproductsku", success: function (data) { if (data.indexOf("产品编号可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用产品编号不可用,请更换用产品编号", onWait: "正在对用产品编号进行合法性校验,请稍候..." }).defaultPassed(); $("#ddlbrand").formValidator({ onShow: "请选择品牌名称", onFocus: "品牌名称选择", onCorrect: "请择正确", defaultValue: "" }).inputValidator({ min: 1, onError: "请选择品牌名称!" }).defaultPassed(); });
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/pageValitator/productinfo.js
JavaScript
oos
1,763
$(document).ready(function () { $.formValidator.initConfig({ formID: "form1", theme: "ArrowSolidBox", submitOnce: false, onError: function (msg, obj, errorlist) { $("#errorlist").empty(); $.map(errorlist, function (msg) { $("#errorlist").append("<li>" + msg + "</li>") }); alert(msg); }, ajaxPrompt: '有数据正在异步验证,请稍等...' }); //验证工厂名 $("#txttitle").formValidator({ onShow: "请输入店铺名称,例:红星美凯隆全友店", onFocus: "店铺名称至少3个字符,最多25个字符", onCorrect: "该店铺名称可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的店铺名称非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkshoptitle", success: function (data) { if (data.indexOf("店铺名称可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用店铺名称不可用,请更换用店铺名称", onWait: "正在对用店铺名称进行合法性校验,请稍候..." }).defaultPassed(); //$("z").formValidator({ tipID: "test3Tip", onShow: "请选择你的兴趣爱好(至少选一个)", onFocus: "你至少选择1个", onCorrect: "恭喜你,你选对了" }).inputValidator({ min: 1, onError: "你选的个数不对" }); $(":checkbox").formValidator({ tipID: "chkbrandlistTip", onShow: "选择店铺销售产品品牌(至少选一个)", onFocus: "你至少选择1个", onCorrect: "正确" }).inputValidator(); $("#txtphone").formValidator({ empty: true, onShow: "请输入你的联系电话,可以为空哦", onFocus: "格式例如:0577-88888888", onCorrect: "谢谢你的合作", onEmpty: "你真的不想留联系电话了吗?" }).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的联系电话格式不正确" }); $("#ddlmarket").formValidator({ onShow: "选择卖场,单独店铺选择 未加入卖场 ", onFocus: "请选择卖场,单独店铺选择 未加入卖场", onCorrect: "请择正确", defaultValue: "" }).inputValidator({ min: 0, onError: "选择卖场,单独店铺选择 未加入卖场" }).defaultPassed(); $("#txtaddress").formValidator({ onShow: "请输入详细街道地址", onFocus: "请输入详细街道地址", onCorrect: "正确" }).inputValidator({ min: 3, onError: "街道地址输入不正确" }); });
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/pageValitator/shopinfo.js
JavaScript
oos
2,904
$(document).ready(function () { $.formValidator.initConfig({ formID: "form1", theme: "ArrowSolidBox", submitOnce: false, onError: function (msg, obj, errorlist) { $("#errorlist").empty(); $.map(errorlist, function (msg) { $("#errorlist").append("<li>" + msg + "</li>") }); alert(msg); }, ajaxPrompt: '有数据正在异步验证,请稍等...' }); //验证工厂名 $("#txttitle").formValidator({onShow: "请输入厂商名称", onFocus: "厂商名称至少3个字符,最多25个字符", onCorrect: "该厂商名称可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的厂商名称非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkcompanytitle", success: function (data) { if (data.indexOf("该厂商名称可以注册") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用厂商名称不可用,请更换用厂商名称", onWait: "正在对用厂商名称进行合法性校验,请稍候..." }).defaultPassed(); $("#txtphone").formValidator({ onShow: "请输入你的联系电话", onFocus: "格式例如:0577-88888888", onCorrect: "输入正确" }).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的联系电话格式不正确" }); $("#txtfax").formValidator({ onShow: "请输入你的联系传真", onFocus: "格式例如:0577-88888888", onCorrect: "输入正确" }).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的联系传真格式不正确" }); $("#txtemail").formValidator({ empty: true, onShow: "请输入邮箱", onFocus: "邮箱6-100个字符,输入正确了才能离开焦点", onCorrect: "恭喜你,你输对了"}).inputValidator({ min: 6, max: 100, onError: "你输入的邮箱长度非法,请确认" }).regexValidator({ regExp: "^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$", onError: "你输入的邮箱格式不正确" }); });
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/pageValitator/company-setup1.js
JavaScript
oos
2,558
$(document).ready(function () { $.formValidator.initConfig({ formID: "form1", theme: "ArrowSolidBox", submitOnce: false, onError: function (msg, obj, errorlist) { $("#errorlist").empty(); $.map(errorlist, function (msg) { $("#errorlist").append("<li>" + msg + "</li>") }); alert(msg); }, ajaxPrompt: '有数据正在异步验证,请稍等...' }); //验证工厂名 $("#txttitle").formValidator({onShow: "请输入品牌名称", onFocus: "品牌名称至少3个字符,最多25个字符", onCorrect: "该品牌名称可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的品牌名称非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkbrandtitle", success: function (data) { if (data.indexOf("该品牌名称可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用品牌名称不可用,请更换用品牌名称", onWait: "正在对用品牌名称进行合法性校验,请稍候..." }).defaultPassed(); $("#txtletter").formValidator({onShow: "请输入品牌索引", onFocus: "品牌索引至少3个字符,最多15个字符", onCorrect: "该品牌索引可以注册" }).inputValidator({ min: 1, max: 25, onError: "你输入的品牌索引非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkbrandtitleletter", success: function (data) { if (data.indexOf("该品牌索引可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用品牌索引不可用,请更换用品牌索引", onWait: "正在对用品牌索引进行合法性校验,请稍候..." }).defaultPassed(); $("#ddlspread").formValidator({ onShow: "请选择品牌档位", onFocus: "品牌档位选择", onCorrect: "请择正确", defaultValue: "" }).inputValidator({ min: 1, onError: "请选择品牌档位!" }).defaultPassed(); $("#ddlmaterial").formValidator({ onShow: "请选择品牌材质", onFocus: "品牌牌材选择", onCorrect: "请择正确", defaultValue: "" }).inputValidator({ min: 1, onError: "请选择品牌材质!" }).defaultPassed(); $("#ddlstyle").formValidator({ onShow: "请选择品牌风格", onFocus: "品牌风格选择", onCorrect: "请择正确", defaultValue: "" }).inputValidator({ min: 1, onError: "请选择品牌风格!" }).defaultPassed(); $("#ddlcolor").formValidator({ onShow: "请选择品牌色系", onFocus: "品牌色系选择", onCorrect: "请择正确", defaultValue: "" }).inputValidator({ min: 1, onError: "请选择品牌色系!" }).defaultPassed(); });
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/pageValitator/company-brand.js
JavaScript
oos
3,513
$(document).ready(function () { $.formValidator.initConfig({ formID: "form1", theme: "ArrowSolidBox", submitOnce: false, onError: function (msg, obj, errorlist) { $("#errorlist").empty(); $.map(errorlist, function (msg) { $("#errorlist").append("<li>" + msg + "</li>") }); alert(msg); }, ajaxPrompt: '有数据正在异步验证,请稍等...' }); //验证工厂名 $("#txtcompanytitle").formValidator({ onShow: "请输入厂商名称", onFocus: "厂商名称至少3个字符,最多25个字符", onCorrect: "该厂商名称可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的厂商名称非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkcompanytitle2", success: function (data) { if (data.indexOf("该厂商名称可以注册") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用厂商名称不可用,请更换用厂商名称", onWait: "正在对用厂商名称进行合法性校验,请稍候..." }).defaultPassed(); $("#txtcphone").formValidator({ onShow: "请输入工厂联系电话", onFocus: "格式例如:0577-88888888", onCorrect: "谢谢你的合作" }).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的联系电话格式不正确" }); $("#txtbrandtitle").formValidator({ onShow: "请输入品牌名称", onFocus: "品牌名称至少3个字符,最多25个字符", onCorrect: "该品牌名称可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的品牌名称非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkbrandtitle2", success: function (data) { if (data.indexOf("该品牌名称可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用品牌名称不可用,请更换用品牌名称", onWait: "正在对用品牌名称进行合法性校验,请稍候..." }).defaultPassed(); $("#txtbrandletter").formValidator({ onShow: "请输入品牌索引", onFocus: "品牌索引至少3个字符,最多15个字符", onCorrect: "该品牌索引可以注册" }).inputValidator({ min: 1, max: 25, onError: "你输入的品牌索引非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkbrandtitleletter2", success: function (data) { if (data.indexOf("该品牌索引可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用品牌索引不可用,请更换用品牌索引", onWait: "正在对用品牌索引进行合法性校验,请稍候..." }).defaultPassed(); });
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/pageValitator/dealeraddbrand.js
JavaScript
oos
3,979
$(document).ready(function () { $.formValidator.initConfig({ formID: "form1", theme: "ArrowSolidBox", submitOnce: false, onError: function (msg, obj, errorlist) { $("#errorlist").empty(); $.map(errorlist, function (msg) { $("#errorlist").append("<li>" + msg + "</li>") }); alert(msg); }, ajaxPrompt: '有数据正在异步验证,请稍等...' }); //验证工厂名 $("#txttitle").formValidator({onShow: "请输入经销商名称", onFocus: "经销商名称至少3个字符,最多25个字符", onCorrect: "该经销商名称可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的经销商名称非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkdealer", success: function (data) { if (data.indexOf("经销商名称可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用经销商名称不可用,请更换用经销商名称", onWait: "正在对用经销商名称进行合法性校验,请稍候..." }).defaultPassed(); $("#txtletter").formValidator({onShow: "请输入经销商索引", onFocus: "经销商索引至少3个字符,最多15个字符", onCorrect: "该经销商索引可以注册" }).inputValidator({ min: 1, max: 25, onError: "你输入的经销商索引非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkbrandtitleletter", success: function (data) { if (data.indexOf("该经销商索引可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用经销商索引不可用,请更换用经销商索引", onWait: "正在对用经销商索引进行合法性校验,请稍候..." }).defaultPassed(); $("#txtaddress").formValidator({ onShow: "请输入详细街道地址", onFocus: "请输入详细街道地址", onCorrect: "正确" }).inputValidator({ min: 3, onError: "街道地址输入不正确" }); $("#txtphone").formValidator({ onShow: "请输入你的联系电话", onFocus: "格式例如:0577-88888888", onCorrect: "输入正确" }).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的联系电话格式不正确" }); $("#txtfax").formValidator({ empty: true, onShow: "请输入你的联系传真", onFocus: "格式例如:0577-88888888", onCorrect: "输入正确" }).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的联系传真格式不正确" }); $("#txtemail").formValidator({ empty: true, onShow: "请输入邮箱", onFocus: "邮箱6-100个字符,输入正确了才能离开焦点", onCorrect: "恭喜你,你输对了" }).inputValidator({ min: 6, max: 100, onError: "你输入的邮箱长度非法,请确认" }).regexValidator({ regExp: "^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$", onError: "你输入的邮箱格式不正确" }); });
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/pageValitator/dealer.js
JavaScript
oos
3,882
$(document).ready(function () { $.formValidator.initConfig({ formID: "form1", theme: "ArrowSolidBox", submitOnce: false, onError: function (msg, obj, errorlist) { $("#errorlist").empty(); $.map(errorlist, function (msg) { $("#errorlist").append("<li>" + msg + "</li>") }); alert(msg); }, ajaxPrompt: '有数据正在异步验证,请稍等...' }); //验证工厂名 $("#txttitle").formValidator({ onShow: "请输入系列名称", onFocus: "系列名称至少3个字符,最多25个字符", onCorrect: "该系列名称可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的系列名称非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkbrandstitle", success: function (data) { if (data.indexOf("该系列名称可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用系列名称不可用,请更换用系列名称", onWait: "正在对用系列名称进行合法性校验,请稍候..." }).defaultPassed(); $("#ddlbrand").formValidator({ onShow: "请选择品牌名称", onFocus: "品牌名称选择", onCorrect: "请择正确", defaultValue: "" }).inputValidator({ min: 1, onError: "请选择品牌名称!" }).defaultPassed(); });
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/pageValitator/company-brands.js
JavaScript
oos
1,769
$(document).ready(function () { $.formValidator.initConfig({ formID: "form1", theme: "ArrowSolidBox", submitOnce: false, onError: function (msg, obj, errorlist) { $("#errorlist").empty(); $.map(errorlist, function (msg) { $("#errorlist").append("<li>" + msg + "</li>") }); alert(msg); }, ajaxPrompt: '有数据正在异步验证,请稍等...' }); //验证工厂名 $("#txttitle").formValidator({ onShow: "请输入卖场名称,例:金盛国际家居广场(上海)", onFocus: "卖场名称至少3个字符,最多25个字符", onCorrect: "该卖场名称可以注册" }).inputValidator({ min: 3, max: 25, onError: "你输入的卖场名称非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkmarkettitle2", success: function (data) { if (data.indexOf("卖场名称可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用卖场名称不可用,请更换用卖场名称", onWait: "正在对用卖场名称进行合法性校验,请稍候..." }).defaultPassed(); $("#txtletter").formValidator({ onShow: "请输入卖场索引,索引为英文名或拼音", onFocus: "卖场索引至少3个字符,最多25个字符,索引为英文名或拼音", onCorrect: "该卖场索引可以使用" }).inputValidator({ min: 3, max: 25, onError: "你输入的卖场索引非法,请确认" })//.regexValidator({regExp:"username",dataType:"enum",onError:"用户名格式不正确"}) .ajaxValidator({ dataType: "html", async: true, url: "../ajax/ajaxSupplerValidator.ashx?type=checkmarketletter", success: function (data) { if (data.indexOf("卖场索引可以添加") > -1) { return true; } else { return data; } }, buttons: $("#btnSave"), error: function (jqXHR, textStatus, errorThrown) { alert("服务器没有返回数据,可能服务器忙,请重试" + errorThrown); }, onError: "该用卖场索引不可用,请更换用卖场索引", onWait: "正在对用卖场索引进行合法性校验,请稍候..." }).defaultPassed(); //,,, $("#txtlphone").formValidator({ empty: true, onShow: "请输入卖场投诉服务电话", onFocus: "格式例如:0577-88888888", onCorrect: "谢谢你的合作" ,onEmpty: "" }).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的卖场投诉服务电话格式不正确" }); //$("#txtphone").formValidator({ onShow: "请输入你的联系电话,可以为空哦", onFocus: "格式例如:0577-88888888", onCorrect: "谢谢你的合作"}).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的联系电话格式不正确" }); $("#txtzphone").formValidator({ onShow: "请输入卖场招商电话", onFocus: "格式例如:0577-88888888", onCorrect: "谢谢你的合作" }).regexValidator({ regExp: "^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", onError: "你输入的卖场招商格式不正确" }); $("#txtaddress").formValidator({ onShow: "请输入详细街道地址", onFocus: "请输入详细街道地址", onCorrect: "正确" }).inputValidator({ min: 3, onError: "街道地址输入不正确" }); });
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/pageValitator/marketinfo.js
JavaScript
oos
3,862
$(function () { $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色 $(".msgtable tr").hover( function () { $(this).addClass("tr_hover_col"); }, function () { $(this).removeClass("tr_hover_col"); } ); $("input[type='text'].input").focus(function () { if (!$(this).hasClass("tcal")) { $(this).addClass("focus"); } }).blur(function () { $(this).removeClass("focus"); }); }); //设置为自动高 function SetWinHeight(obj) { var win = obj; if (document.getElementById) { if (win && !window.opera) { if (win.contentDocument && win.contentDocument.body.offsetHeight) win.height = win.contentDocument.body.offsetHeight + 50; else if (win.Document && win.Document.body.scrollHeight) win.height = win.Document.body.scrollHeight + 50; } } } //全选取消按钮函数,调用样式如: function checkAll(chkobj) { if ($(chkobj).text() == "全选") { $(chkobj).text("取消"); $(".checkall").each(function () { if ($(this).attr("disabled") != 'disabled') { $(this).find("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") { mainFrame.history.back(-1); } else if (url != "") { mainFrame.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") { mainFrame.history.back(-1); } else if (url != "") { mainFrame.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); } function SetPermission() { $("#SetPermission").remove(); var str = "<div id='SetPermission' style='width:100%; position:fixed; z-index:99999999; background:#000; left:0px; top:0px; bottom:0px; right:0px; display:none;'></div>"; $("body").append(str); $("#SetPermission").css("display", "block").animate({ opacity: 0.1 }); }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/supplercommon.js
JavaScript
oos
5,878
var regexEnum = { intege:"^-?[1-9]\\d*$", //整数 intege1:"^[1-9]\\d*$", //正整数 intege2:"^-[1-9]\\d*$", //负整数 num:"^([+-]?)\\d*\\.?\\d+$", //数字 num1:"^[1-9]\\d*|0$", //正数(正整数 + 0) num2:"^-[1-9]\\d*|0$", //负数(负整数 + 0) decmal:"^([+-]?)\\d*\\.\\d+$", //浮点数 decmal1:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*$",   //正浮点数 decmal2:"^-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*)$",  //负浮点数 decmal3:"^-?([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0)$",  //浮点数 decmal4:"^[1-9]\\d*.\\d*|0.\\d*[1-9]\\d*|0?.0+|0$",   //非负浮点数(正浮点数 + 0) decmal5:"^(-([1-9]\\d*.\\d*|0.\\d*[1-9]\\d*))|0?.0+|0$",  //非正浮点数(负浮点数 + 0) email:"^\\w+((-\\w+)|(\\.\\w+))*\\@[A-Za-z0-9]+((\\.|-)[A-Za-z0-9]+)*\\.[A-Za-z0-9]+$", //邮件 color:"^[a-fA-F0-9]{6}$", //颜色 url:"^http[s]?:\\/\\/([\\w-]+\\.)+[\\w-]+([\\w-./?%&=]*)?$", //url chinese:"^[\\u4E00-\\u9FA5\\uF900-\\uFA2D]+$", //仅中文 ascii:"^[\\x00-\\xFF]+$", //仅ACSII字符 zipcode:"^\\d{6}$", //邮编 mobile:"^13[0-9]{9}|15[012356789][0-9]{8}|18[0256789][0-9]{8}|147[0-9]{8}$", //手机 ip4:"^(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)\\.(25[0-5]|2[0-4]\\d|[0-1]\\d{2}|[1-9]?\\d)$", //ip地址 notempty:"^\\S+$", //非空 picture:"(.*)\\.(jpg|bmp|gif|ico|pcx|jpeg|tif|png|raw|tga)$", //图片 rar:"(.*)\\.(rar|zip|7zip|tgz)$", //压缩文件 date:"^\\d{4}(\\-|\\/|\.)\\d{1,2}\\1\\d{1,2}$", //日期 qq:"^[1-9]*[1-9][0-9]*$", //QQ号码 tel:"^(([0\\+]\\d{2,3}-)?(0\\d{2,3})-)?(\\d{7,8})(-(\\d{3,}))?$", //电话号码的函数(包括验证国内区号,国际区号,分机号) username:"^\\w+$", //用来用户注册。匹配由数字、26个英文字母或者下划线组成的字符串 letter:"^[A-Za-z]+$", //字母 letter_u:"^[A-Z]+$", //大写字母 letter_l:"^[a-z]+$", //小写字母 idcard:"^[1-9]([0-9]{14}|[0-9]{17})$" //身份证 } var aCity={11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"} function isCardID(sId){ var iSum=0 ; var info="" ; if(!/^\d{17}(\d|x)$/i.test(sId)) return "你输入的身份证长度或格式错误"; sId=sId.replace(/x$/i,"a"); if(aCity[parseInt(sId.substr(0,2))]==null) return "你的身份证地区非法"; sBirthday=sId.substr(6,4)+"-"+Number(sId.substr(10,2))+"-"+Number(sId.substr(12,2)); var d=new Date(sBirthday.replace(/-/g,"/")) ; if(sBirthday!=(d.getFullYear()+"-"+ (d.getMonth()+1) + "-" + d.getDate()))return "身份证上的出生日期非法"; for(var i = 17;i>=0;i --) iSum += (Math.pow(2,i) % 11) * parseInt(sId.charAt(17 - i),11) ; if(iSum%11!=1) return "你输入的身份证号非法"; return true;//aCity[parseInt(sId.substr(0,2))]+","+sBirthday+","+(sId.substr(16,1)%2?"男":"女") } //短时间,形如 (13:04:06) function isTime(str) { var a = str.match(/^(\d{1,2})(:)?(\d{1,2})\2(\d{1,2})$/); if (a == null) {return false} if (a[1]>24 || a[3]>60 || a[4]>60) { return false; } return true; } //短日期,形如 (2003-12-05) function isDate(str) { var r = str.match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/); if(r==null)return false; var d= new Date(r[1], r[3]-1, r[4]); return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]); } //长时间,形如 (2003-12-05 13:04:06) function isDateTime(str) { var reg = /^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/; var r = str.match(reg); if(r==null) return false; var d= new Date(r[1], r[3]-1,r[4],r[5],r[6],r[7]); return (d.getFullYear()==r[1]&&(d.getMonth()+1)==r[3]&&d.getDate()==r[4]&&d.getHours()==r[5]&&d.getMinutes()==r[6]&&d.getSeconds()==r[7]); } function chkboxlistSelected() { var a = $(":checkbox:checked"); if (a == null) return false; if (a.length < 1)return "至少选一个"; return true; }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/formValidatorRegex.js
JavaScript
oos
4,421
//==================================================================================================== // [插件名称] jQuery formValidator //---------------------------------------------------------------------------------------------------- // [描 述] jQuery formValidator表单验证插件,它是基于jQuery类库,实现了js脚本于页面的分离。对一个表 // 单对象,你只需要写一行代码就可以轻松实现20种以上的脚本控制。现支持一个表单元素累加很多种 // 校验方式,采用配置信息的思想,而不是把信息写在表单元素上,能比较完美的实现ajax请求。 //---------------------------------------------------------------------------------------------------- // [作者网名] 猫冬 // [邮 箱] wzmaodong@126.com // [作者博客] http://wzmaodong.cnblogs.com // [插件主页] http://www.yhuan.com // [QQ群交流] 72280458、74106519 // [更新日期] 2011-07-24 // [版 本 号] ver4.1.1 内部测试版 // [开源协议] LGPL //==================================================================================================== (function($) { $.formValidator = { //全局配置 initConfig : function(controlOptions) { var settings = {}; $.extend(true, settings, initConfig_setting, controlOptions || {}); //如果是精简模式,发生错误的时候,第一个错误的控件就不获得焦点 if(settings.mode == "SingleTip"){settings.errorFocus=false}; //如果填写了表单和按钮,就注册验证事件 if(settings.formID!=""){ $("#"+settings.formID).submit(function(){ if(settings.ajaxForm!=null){ $.formValidator.ajaxForm(settings.validatorGroup,settings.ajaxForm); return false; } else{ return $.formValidator.bindSubmit(settings); } }); } validatorGroup_setting.push( settings ); //读取主题对应的脚步 var scriptSrcArray = fv_scriptSrc.split('/'); var jsName = scriptSrcArray[scriptSrcArray.length-1]; var themedir = fv_scriptSrc.replace(jsName,''); $.ajax({async:false,type: "GET",url: themedir + "themes/"+settings.theme+"/js/theme.js",dataType: "script", error :function(){alert('当前皮肤加载出错,请确认皮肤【'+settings.theme+'】是否存在')} }); //读取主题对应的样式 if($.browser.msie) { var css=document.createElement("link"); css.rel="stylesheet"; css.type="text/css"; css.href=themedir+"themes/"+settings.theme+"/style/style.css"; document.getElementsByTagName("head")[0].appendChild(css); } else { var style=document.createElement('style'); style.setAttribute("type", "text/css"); var styCss = "@import url('"+themedir+"themes/"+settings.theme+"/style/style.css');"; if (style.styleSheet) {style.styleSheet.cssText=styCss;} else {style.appendChild(document.createTextNode(styCss));} document.getElementsByTagName("head")[0].appendChild(style); } }, //调用验证函数 bindSubmit : function(settings) { if (settings.ajaxCountValid > 0 && settings.ajaxPrompt != "") { alert(settings.ajaxPrompt); return false; } return $.formValidator.pageIsValid(settings.validatorGroup); }, //各种校验方式支持的控件类型 sustainType : function(elem,validateType) { var srcTag = elem.tagName; var stype = elem.type; switch(validateType) { case "formValidator": return true; case "inputValidator": return (srcTag == "INPUT" || srcTag == "TEXTAREA" || srcTag == "SELECT"); case "compareValidator": return ((srcTag == "INPUT" || srcTag == "TEXTAREA") ? (stype != "checkbox" && stype != "radio") : false); case "ajaxValidator": return (stype == "text" || stype == "textarea" || stype == "file" || stype == "password" || stype == "select-one"); case "regexValidator": return ((srcTag == "INPUT" || srcTag == "TEXTAREA") ? (stype != "checkbox" && stype != "radio") : false); case "functionValidator": return true; case "passwordValidator": return stype == "password"; } }, //如果validator对象对应的element对象的validator属性追加要进行的校验。 appendValid : function(id, setting ) { //如果是各种校验不支持的类型,就不追加到。返回-1表示没有追加成功 var elem = $("#"+id).get(0); var validateType = setting.validateType; if(!$.formValidator.sustainType(elem,validateType)) return -1; //重新初始化 if (validateType=="formValidator" || elem.settings == undefined ){elem.settings = new Array();} var len = elem.settings.push( setting ); elem.settings[len - 1].index = len - 1; return len - 1; }, //获取校验组信息。 getInitConfig : function(validatorGroup) { var config=null; $.each( validatorGroup_setting, function(i, n){ if(validatorGroup_setting[i].validatorGroup==validatorGroup){ config = validatorGroup_setting[i]; return false; } }); return config; }, //设置显示信息 setTipState : function(elem,showclass,showmsg) { var initConfig = $.formValidator.getInitConfig(elem.validatorGroup); var tip = $("#"+elem.settings[0].tipID); if(showmsg==null || showmsg=="") { tip.hide(); } else { if(initConfig.mode == "SingleTip") { //显示和保存提示信息 $("#fv_content").html(showmsg); elem.Tooltip = showmsg; if(showclass!="onError"){tip.hide();} } else { var html = showclass == "onShow" ? onShowHtml : (showclass == "onFocus" ? onFocusHtml : (showclass == "onCorrect" ? onCorrectHtml : onErrorHtml)); if(html.length = 0 || showmsg == "") { tip.hide(); } else { if(elem.validatorPasswordIndex > 0 && showclass =="onCorrect"){ var setting = elem.settings[elem.validatorPasswordIndex]; var level = $.formValidator.passwordValid(elem); showmsg = "" if(level==-1 && setting.onErrorContinueChar!=""){ showmsg=setting.onErrorContinueChar; }else if(level==-2 && setting.onErrorSameChar!=""){ showmsg=setting.onErrorSameChar; }else if(level==-3 && setting.onErrorCompareSame!=""){ showmsg=setting.onErrorCompareSame; } if(showmsg!="") { $.formValidator.setTipState(elem,'onError',showmsg); return; } showmsg = passwordStrengthText[level<=0?0:level - 1]; } html = html.replace(/\$class\$/g, showclass).replace(/\$data\$/g, showmsg); tip.html(html).show(); } var stype = elem.type; if(stype == "password" || stype == "text" || stype == "file") { jqobj = $(elem); if(onShowClass!="" && showclass == "onShow"){jqobj.removeClass().addClass(onShowClass)}; if(onFocusClass!="" && showclass == "onFocus"){jqobj.removeClass().addClass(onFocusClass)}; if(onCorrectClass!="" && showclass == "onCorrect"){jqobj.removeClass().addClass(onCorrectClass)}; if(onErrorClass!="" && showclass == "onError"){jqobj.removeClass().addClass(onErrorClass)}; } } } }, //把提示层重置成原始提示(如果有defaultPassed,应该设置为onCorrect) resetTipState : function(validatorGroup) { if(validatorGroup == undefined){validatorGroup = "1"}; var initConfig = $.formValidator.getInitConfig(validatorGroup); $.each(initConfig.validObjects,function(){ var setting = this.settings[0]; var passed = setting.defaultPassed; $.formValidator.setTipState(this, passed ? "onCorrect" : "onShow", passed ? $.formValidator.getStatusText(this,setting.onCorrect) : setting.onShow ); }); }, //设置错误的显示信息 setFailState : function(tipID,showmsg) { $.formValidator.setTipState($("#"+tipID).get(0), "onError", showmsg); }, //根据单个对象,正确:正确提示,错误:错误提示 showMessage : function(returnObj) { var id = returnObj.id; var elem = $("#"+id).get(0); var isValid = returnObj.isValid; var setting = returnObj.setting;//正确:setting[0],错误:对应的setting[i] var showmsg = "",showclass = ""; var intiConfig = $.formValidator.getInitConfig(elem.validatorGroup); if (!isValid) { showclass = "onError"; if(setting.validateType=="ajaxValidator") { if(setting.lastValid=="") { showclass = "onLoad"; showmsg = setting.onWait; } else { showmsg = $.formValidator.getStatusText(elem,setting.onError); } } else { showmsg = (returnObj.errormsg==""? $.formValidator.getStatusText(elem,setting.onError) : returnObj.errormsg); } if(intiConfig.mode == "AlertTip") { if(elem.validValueOld!=$(elem).val()){alert(showmsg);} } else { $.formValidator.setTipState(elem,showclass,showmsg); } } else { //验证成功后,如果没有设置成功提示信息,则给出默认提示,否则给出自定义提示;允许为空,值为空的提示 showmsg = $.formValidator.isEmpty(id) ? setting.onEmpty : $.formValidator.getStatusText(elem,setting.onCorrect); $.formValidator.setTipState(elem,"onCorrect",showmsg); } return showmsg; }, showAjaxMessage : function(returnObj) { var elem = $("#"+returnObj.id).get(0); var setting = elem.settings[returnObj.ajax]; var validValueOld = elem.validValueOld; var validvalue = $(elem).val(); returnObj.setting = setting; //defaultPassed还未处理 if(validValueOld!= validvalue || validValueOld == validvalue && elem.onceValided == undefined) { $.formValidator.ajaxValid(returnObj); } else { if(setting.isValid!=undefined && !setting.isValid){ elem.lastshowclass = "onError"; elem.lastshowmsg = $.formValidator.getStatusText(elem,setting.onError); } $.formValidator.setTipState(elem,elem.lastshowclass,elem.lastshowmsg); } }, //获取指定字符串的长度 getLength : function(id) { var srcjo = $("#"+id); var elem = srcjo.get(0); var sType = elem.type; var len = 0; switch(sType) { case "text": case "hidden": case "password": case "textarea": case "file": var val = srcjo.val(); var setting = elem.settings[0]; //如果有显示提示内容的,要忽略掉 if(elem.isInputControl && elem.value == setting.onShowText){val=""} var initConfig = $.formValidator.getInitConfig(elem.validatorGroup); if (initConfig.wideWord) { for (var i = 0; i < val.length; i++) { len = len + ((val.charCodeAt(i) >= 0x4e00 && val.charCodeAt(i) <= 0x9fa5) ? 2 : 1); } } else{ len = val.length; } break; case "checkbox": case "radio": len = $("input[type='"+sType+"'][name='"+srcjo.attr("name")+"']:checked").length; break; case "select-one": len = elem.options ? elem.options.selectedIndex : -1; break; case "select-multiple": len = $("select[name="+elem.name+"] option:selected").length; break; } return len; }, //结合empty这个属性,判断仅仅是否为空的校验情况。 isEmpty : function(id) { return ($("#"+id).get(0).settings[0].empty && $.formValidator.getLength(id)==0); }, //对外调用:判断单个表单元素是否验证通过,不带回调函数 isOneValid : function(id) { return $.formValidator.oneIsValid(id).isValid; }, //验证单个是否验证通过,正确返回settings[0],错误返回对应的settings[i] oneIsValid : function (id) { var returnObj = new Object(); var elem = $("#"+id).get(0); var initConfig = $.formValidator.getInitConfig(elem.validatorGroup); returnObj.initConfig = initConfig; returnObj.id = id; returnObj.ajax = -1; returnObj.errormsg = ""; //自定义错误信息 var settings = elem.settings; var settingslen = settings.length; var validateType; //只有一个formValidator的时候不检验 if (settingslen==1){settings[0].bind=false;} if(!settings[0].bind){return null;} $.formValidator.resetInputValue(true,initConfig,id); for ( var i = 0 ; i < settingslen ; i ++ ) { if(i==0){ //如果为空,直接返回正确 if($.formValidator.isEmpty(id)){ returnObj.isValid = true; returnObj.setting = settings[0]; break; } continue; } returnObj.setting = settings[i]; validateType = settings[i].validateType; //根据类型触发校验 switch(validateType) { case "inputValidator": $.formValidator.inputValid(returnObj); break; case "compareValidator": $.formValidator.compareValid(returnObj); break; case "regexValidator": $.formValidator.regexValid(returnObj); break; case "functionValidator": $.formValidator.functionValid(returnObj); break; case "ajaxValidator": //如果是ajax校验,这里直接取上次的结果值 returnObj.ajax = i break; case "passwordValidator": break; } //校验过一次 elem.onceValided = true; if(!settings[i].isValid) { returnObj.isValid = false; returnObj.setting = settings[i]; break; }else{ returnObj.isValid = true; returnObj.setting = settings[0]; if (settings[i].validateType == "ajaxValidator"){break}; } } $.formValidator.resetInputValue(false,initConfig,id); return returnObj; }, //验证所有需要验证的对象,并返回是否验证成功(如果曾经触发过ajaxValidator,提交的时候就不触发校验,直接读取结果) pageIsValid : function (validatorGroup) { if(validatorGroup == undefined){validatorGroup = "1"}; var isValid = true,returnObj,firstErrorMessage="",errorMessage; var error_tip = "^",thefirstid,name,name_list="^"; var errorlist = new Array(); //设置提交状态、ajax是否出错、错误列表 var initConfig = $.formValidator.getInitConfig(validatorGroup); initConfig.status = "sumbiting"; initConfig.ajaxCountSubmit = 0; //遍历所有要校验的控件,如果存在ajaxValidator就先直接触发 $.each(initConfig.validObjects,function() { if($(this).length==0){return true}; if (this.settings[0].bind && this.validatorAjaxIndex!=undefined && this.onceValided == undefined) { returnObj = $.formValidator.oneIsValid(this.id); if (returnObj.ajax == this.validatorAjaxIndex) { initConfig.status = "sumbitingWithAjax"; $.formValidator.ajaxValid(returnObj); } } }); //如果有提交的时候有触发ajaxValidator,所有的处理都放在ajax里处理 if(initConfig.ajaxCountSubmit > 0){return false} //遍历所有要校验的控件 $.each(initConfig.validObjects,function() { //只校验绑定的控件 if($(this).length==0){return true}; if(this.settings[0].bind){ name = this.name; //相同name只校验一次 if (name_list.indexOf("^"+name+"^") == -1) { onceValided = this.onceValided == undefined ? false : this.onceValided; if(name){name_list = name_list + name + "^"}; returnObj = $.formValidator.oneIsValid(this.id); if (returnObj) { //校验失败,获取第一个发生错误的信息和ID if (!returnObj.isValid) { //记录不含ajaxValidator校验函数的校验结果 isValid = false; errorMessage = returnObj.errormsg == "" ? returnObj.setting.onError : returnObj.errormsg; errorlist[errorlist.length] = errorMessage; if (thefirstid == null) {thefirstid = returnObj.id}; if(firstErrorMessage==""){firstErrorMessage=errorMessage}; } //为了解决使用同个TIP提示问题:后面的成功或失败都不覆盖前面的失败 if (initConfig.mode != "AlertTip") { var tipID = this.settings[0].tipID; if (error_tip.indexOf("^" + tipID + "^") == -1) { if (!returnObj.isValid) {error_tip = error_tip + tipID + "^"}; $.formValidator.showMessage(returnObj); } } } } } }); //成功或失败进行回调函数的处理,以及成功后的灰掉提交按钮的功能 if(isValid) { if(!initConfig.onSuccess()){return false}; if(initConfig.submitOnce){$(":submit,:button,:reset").attr("disabled",true);} } else { initConfig.onError(firstErrorMessage, $("#" + thefirstid).get(0), errorlist); if (thefirstid && initConfig.errorFocus) {$("#" + thefirstid).focus()}; } initConfig.status="init"; if(isValid && initConfig.debug){alert("现在正处于调试模式(debug:true),不能提交");} return !initConfig.debug && isValid; }, //整个表单 ajaxForm : function(validatorGroup,option,formid) { if(validatorGroup == undefined){validatorGroup = "1"}; var setting = {}; $.extend(true, setting, ajaxForm_setting, option || {}); var initConfig = $.formValidator.getInitConfig(validatorGroup); if(formid==undefined){ formid = initConfig.formID; if(formid==""){alert('表单ID未传入');return false;}; }; if(!$.formValidator.pageIsValid(validatorGroup)){return false}; var ls_url = setting.url; var parm = $.formValidator.serialize('#'+formid); ls_url = ls_url + (ls_url.indexOf("?") > -1 ? ("&" + parm) : ("?" + parm)); alert(ls_url); $.ajax( { type : setting.type, url : ls_url, cache : setting.cache, data : setting.data, async : setting.async, timeout : setting.timeout, dataType : setting.dataType, beforeSend : function(jqXHR, configs){//再服务器没有返回数据之前,先回调提交按钮 if(setting.buttons && setting.buttons.length > 0){setting.buttons.attr({"disabled":true})}; return setting.beforeSend(jqXHR, configs); }, success : function(data, textStatus, jqXHR){setting.success(data, textStatus, jqXHR);}, complete : function(jqXHR, textStatus){ if(setting.buttons && setting.buttons.length > 0){setting.buttons.attr({"disabled":false})}; setting.complete(jqXHR, textStatus); }, error : function(jqXHR, textStatus, errorThrown){setting.error(jqXHR, textStatus, errorThrown);} }); }, //把编码decodeURIComponent反转之后,再escape serialize : function(objs,initConfig) { if(initConfig!=undefined){$.formValidator.resetInputValue(true,initConfig)}; var parmString = $(objs).serialize(); if(initConfig!=undefined){$.formValidator.resetInputValue(false,initConfig)}; var parmArray = parmString.split("&"); var parmStringNew=""; $.each(parmArray,function(index,data){ var li_pos = data.indexOf("="); if(li_pos >0){ var name = data.substring(0,li_pos); var value = escape(decodeURIComponent(data.substr(li_pos+1))); var parm = name+"="+value; parmStringNew = parmStringNew=="" ? parm : parmStringNew + '&' + parm; } }); return parmStringNew; }, //ajax校验 ajaxValid : function(returnObj) { var id = returnObj.id; var srcjo = $("#"+id); var elem = srcjo.get(0); var initConfig = returnObj.initConfig; var settings = elem.settings; var setting = settings[returnObj.ajax]; var ls_url = setting.url; //获取要传递的参数 var validatorGroup = elem.validatorGroup; var initConfig = $.formValidator.getInitConfig(validatorGroup); var parm = $.formValidator.serialize(initConfig.ajaxObjects); //添加触发的控件名、随机数、传递的参数 parm = "clientid=" + id + "&" +(setting.randNumberName ? setting.randNumberName+"="+((new Date().getTime())+Math.round(Math.random() * 10000)) : "") + (parm.length > 0 ? "&" + parm : ""); ls_url = ls_url + (ls_url.indexOf("?") > -1 ? ("&" + parm) : ("?" + parm)); //发送ajax请求 $.ajax( { type : setting.type, url : ls_url, cache : setting.cache, data : setting.data, async : setting.async, timeout : setting.timeout, dataType : setting.dataType, success : function(data, textStatus, jqXHR){ var lb_ret,ls_status,ls_msg,lb_isValid = false; $.formValidator.dealAjaxRequestCount(validatorGroup,-1); //根据业务判断设置显示信息 lb_ret = setting.success(data, textStatus, jqXHR); if((typeof lb_ret)=="string") { ls_status = "onError"; ls_msg = lb_ret; } else if(lb_ret){ lb_isValid = true; ls_status = "onCorrect"; ls_msg = settings[0].onCorrect; }else{ ls_status = "onError"; ls_msg = $.formValidator.getStatusText(elem,setting.onError); alert(ls_msg) } setting.isValid = lb_isValid; $.formValidator.setTipState(elem,ls_status,ls_msg); //提交的时候触发了ajax校验,等ajax校验完成,无条件重新校验 if(returnObj.initConfig.status=="sumbitingWithAjax" && returnObj.initConfig.ajaxCountSubmit == 0) { if (initConfig.formID != "") { $('#' + initConfig.formID).trigger('submit'); } } }, complete : function(jqXHR, textStatus){ if(setting.buttons && setting.buttons.length > 0){setting.buttons.attr({"disabled":false})}; setting.complete(jqXHR, textStatus); }, beforeSend : function(jqXHR, configs){ //本控件如果正在校验,就中断上次 if (this.lastXMLHttpRequest) {this.lastXMLHttpRequest.abort()}; this.lastXMLHttpRequest = jqXHR; //再服务器没有返回数据之前,先回调提交按钮 if(setting.buttons && setting.buttons.length > 0){setting.buttons.attr({"disabled":true})}; var lb_ret = setting.beforeSend(jqXHR,configs); var isValid = false; //无论是否成功都当做失败处理 setting.isValid = false; if((typeof lb_ret)=="boolean" && lb_ret) { isValid = true; $.formValidator.setTipState(elem,"onLoad",settings[returnObj.ajax].onWait); }else { isValid = false; $.formValidator.setTipState(elem,"onError",lb_ret); } setting.lastValid = "-1"; if(isValid){$.formValidator.dealAjaxRequestCount(validatorGroup,1);} return isValid; }, error : function(jqXHR, textStatus, errorThrown){ $.formValidator.dealAjaxRequestCount(validatorGroup,-1); $.formValidator.setTipState(elem,"onError",$.formValidator.getStatusText(elem,setting.onError)); setting.isValid = false; setting.error(jqXHR, textStatus, errorThrown); }, processData : setting.processData }); }, //处理ajax的请求个数 dealAjaxRequestCount : function(validatorGroup,val) { var initConfig = $.formValidator.getInitConfig(validatorGroup); initConfig.ajaxCountValid = initConfig.ajaxCountValid + val; if (initConfig.status == "sumbitingWithAjax") { initConfig.ajaxCountSubmit = initConfig.ajaxCountSubmit + val; } }, //对正则表达式进行校验(目前只针对input和textarea) regexValid : function(returnObj) { var id = returnObj.id; var setting = returnObj.setting; var srcTag = $("#"+id).get(0).tagName; var elem = $("#"+id).get(0); var isValid; //如果有输入正则表达式,就进行表达式校验 if(elem.settings[0].empty && elem.value==""){ setting.isValid = true; } else { var regexArray = setting.regExp; setting.isValid = false; if((typeof regexArray)=="string") regexArray = [regexArray]; $.each(regexArray, function() { var r = this; if(setting.dataType=="enum"){r = eval("regexEnum."+r);} if(r==undefined || r=="") { return false; } isValid = (new RegExp(r, setting.param)).test($(elem).val()); if(setting.compareType=="||" && isValid) { setting.isValid = true; return false; } if(setting.compareType=="&&" && !isValid) { return false } }); if(!setting.isValid) setting.isValid = isValid; } }, //函数校验。返回true/false表示校验是否成功;返回字符串表示错误信息,校验失败;如果没有返回值表示处理函数,校验成功 functionValid : function(returnObj) { var id = returnObj.id; var setting = returnObj.setting; var srcjo = $("#"+id); var lb_ret = setting.fun(srcjo.val(),srcjo.get(0)); if(lb_ret != undefined) { if((typeof lb_ret) === "string"){ setting.isValid = false; returnObj.errormsg = lb_ret; }else{ setting.isValid = lb_ret; } }else{ setting.isValid = true; } }, //对input和select类型控件进行校验 inputValid : function(returnObj) { var id = returnObj.id; var setting = returnObj.setting; var srcjo = $("#"+id); var elem = srcjo.get(0); var val = srcjo.val(); var sType = elem.type; var len = $.formValidator.getLength(id); var empty = setting.empty,emptyError = false; switch(sType) { case "text": case "hidden": case "password": case "textarea": case "file": if (setting.type == "size") { empty = setting.empty; if(!empty.leftEmpty){ emptyError = (val.replace(/^[ \s]+/, '').length != val.length); } if(!emptyError && !empty.rightEmpty){ emptyError = (val.replace(/[ \s]+$/, '').length != val.length); } if(emptyError && empty.emptyError){returnObj.errormsg= empty.emptyError} } case "checkbox": case "select-one": case "select-multiple": case "radio": var lb_go_on = false; if(sType=="select-one" || sType=="select-multiple"){setting.type = "size";} var type = setting.type; if (type == "size") { //获得输入的字符长度,并进行校验 if(!emptyError){lb_go_on = true} if(lb_go_on){val = len} } else if (type =="date" || type =="datetime") { var isok = false; if(type=="date"){lb_go_on = isDate(val)}; if(type=="datetime"){lb_go_on = isDate(val)}; if(lb_go_on){val = new Date(val);setting.min=new Date(setting.min);setting.max=new Date(setting.max);}; }else{ stype = (typeof setting.min); if(stype =="number") { val = (new Number(val)).valueOf(); if(!isNaN(val)){lb_go_on = true;} } if(stype =="string"){lb_go_on = true;} } setting.isValid = false; if(lb_go_on) { if(val < setting.min || val > setting.max){ if(val < setting.min && setting.onErrorMin){ returnObj.errormsg= setting.onErrorMin; } if(val > setting.min && setting.onErrorMax){ returnObj.errormsg= setting.onErrorMax; } } else{ setting.isValid = true; } } break; } }, //对两个控件进行比较校验 compareValid : function(returnObj) { var id = returnObj.id; var setting = returnObj.setting; var srcjo = $("#"+id); var desjo = $("#"+setting.desID ); var ls_dataType = setting.dataType; curvalue = srcjo.val(); ls_data = desjo.val(); if(ls_dataType=="number") { if(!isNaN(curvalue) && !isNaN(ls_data)){ curvalue = parseFloat(curvalue); ls_data = parseFloat(ls_data); } else{ return; } } if(ls_dataType=="date" || ls_dataType=="datetime") { var isok = false; if(ls_dataType=="date"){isok = (isDate(curvalue) && isDate(ls_data))}; if(ls_dataType=="datetime"){isok = (isDateTime(curvalue) && isDateTime(ls_data))}; if(isok){ curvalue = new Date(curvalue); ls_data = new Date(ls_data) } else{ return; } } switch(setting.operateor) { case "=": setting.isValid = (curvalue == ls_data); break; case "!=": setting.isValid = (curvalue != ls_data); break; case ">": setting.isValid = (curvalue > ls_data); break; case ">=": setting.isValid = (curvalue >= ls_data); break; case "<": setting.isValid = (curvalue < ls_data); break; case "<=": setting.isValid = (curvalue <= ls_data); break; default : setting.isValid = false; break; } }, //获取密码校验等级 passwordValid : function(elem) { var setting = elem.settings[elem.validatorPasswordIndex]; var pwd = elem.value; //是否为连续字符 function isContinuousChar(str){ var str = str.toLowerCase(); var flag = 0; for(var i=0;i<str.length;i++){ if(str.charCodeAt(i) != flag+1 && flag!=0) return false; else flag = str.charCodeAt(i); } return true; } //是否字符都相同 function isSameChar(str){ var str = str.toLowerCase(); var flag = 0; for(var i=0;i<str.length;i++){ if(str.charCodeAt(i) != flag && flag!=0) return false; else flag = str.charCodeAt(i); } return true; } //获取标记所在的位置,用1表示 function getFlag(val,sum,index) { if(sum==undefined){sum=[0,0,0,0]} if(index==undefined){index=-1}; index ++; sum[index] = val % 2; val = Math.floor(val / 2); if(val==1 || val==0){sum[index+1] = val;return sum} sum = getFlag(val,sum,index); return sum; } //判断密码各个位置的组成情况 if(pwd==""){return 0}; if(setting.onErrorContinueChar!="" && isContinuousChar(pwd)){return -1}; if(setting.onErrorSameChar!="" && isSameChar(pwd)){return -2}; if(setting.compareID!="" && $("#"+setting.compareID).val()==pwd){return -3}; var sum1 = [0, 0, 0, 0]; var specicalChars = "!,@,#,$,%,\^,&,*,?,_,~"; var len = pwd.length; for (var i=0; i< len; i++) { var c = pwd.charCodeAt(i); if (c >=48 && c <=57){ //数字 sum1[0] += 1; }else if (c >=97 && c <=122){ //小写字母 sum1[1] += 1; }else if (c >=65 && c <=90){ //大写字母 sum1[2] += 1; }else if(specicalChars.indexOf(pwd.substr(i,1))>=0){ //特殊字符 sum1[3] += 1; } } //遍历json变量获取字符串 var returnLevel = 0; var hasFind = true; $.each(passwordStrengthRule,function(j,n){ var level = n.level; var rules = n.rule; $.each(rules,function(i,rule){ var index = 0; //依次编译所有的、有配置(该位置==1)的节点 hasFind = true; $.each(getFlag(rule.flag),function(k,value){ if(value==1){ val = rule.value[index++]; var val = val == 0 ? len : (val > len ? len : val); if(sum1[k] < val){hasFind = false;return false;} } }); if(hasFind){returnLevel = level;return false;} }) if(hasFind){returnLevel = level;} }); return returnLevel; }, //定位漂浮层 localTooltip : function(e) { e = e || window.event; var mouseX = e.pageX || (e.clientX ? e.clientX + document.body.scrollLeft : 0); var mouseY = e.pageY || (e.clientY ? e.clientY + document.body.scrollTop : 0); $("#fvtt").css({"top":(mouseY+2)+"px","left":(mouseX-40)+"px"}); }, reloadAutoTip : function(validatorGroup) { if(validatorGroup == undefined) validatorGroup = "1"; var initConfig = $.formValidator.getInitConfig(validatorGroup); $.each(initConfig.validObjects,function() { if(initConfig.mode == "AutoTip") { //获取层的ID、相对定位控件的ID和坐标 var setting = this.settings[0]; var relativeID = "#"+setting.relativeID; var offset = $(relativeID ).offset(); var y = offset.top; var x = $(relativeID ).width() + offset.left; $("#"+setting.tipID).parent().show().css({left: x+"px", top: y+"px"}); } }); }, getStatusText : function(elem,obj) { return ($.isFunction(obj) ? obj($(elem).val()) : obj); }, resetInputValue : function(real,initConfig,id) { var showTextObjects; if(id){ showTextObjects = $("#"+id); }else{ showTextObjects = $(initConfig.showTextObjects); } showTextObjects.each(function(index,elem){ if(elem.isInputControl){ var showText = elem.settings[0].onShowText; if(real && showText==elem.value){elem.value = ""}; if(!real && showText!="" && elem.value == ""){elem.value = showText}; } }); } }; //每个校验控件必须初始化的 $.fn.formValidator = function(cs) { cs = cs || {}; var setting = {}; //获取该校验组的全局配置信息 if(cs.validatorGroup == undefined){cs.validatorGroup = "1"}; //先合并整个配置(深度拷贝) $.extend(true,setting, formValidator_setting); var initConfig = $.formValidator.getInitConfig(cs.validatorGroup); //校验索引号,和总记录数 initConfig.validCount += 1; //如果为精简模式,tipCss要重新设置初始值 if(initConfig.mode == "SingleTip"){setting.tipCss = {left:10,top:1,width:22,height:22,display:"none"}}; //弹出消息提示模式,自动修复错误 if(initConfig.mode == "AlertTip"){setting.autoModify=true}; //先合并整个配置(深度拷贝) $.extend(true,setting, cs || {}); return this.each(function(e) { //记录该控件的校验顺序号和校验组号 this.validatorIndex = initConfig.validCount - 1; this.validatorGroup = cs.validatorGroup; var jqobj = $(this); //自动形成TIP var setting_temp = {}; $.extend(true,setting_temp, setting); //判断是否有ID var id = jqobj.attr('id'); if(!id) { id = Math.ceil(Math.random()*50000000); jqobj.attr('id', id); } var tip = setting_temp.tipID ? setting_temp.tipID : id+"Tip"; if(initConfig.mode == "AutoTip" || initConfig.mode == "FixTip") { var tipDiv = $("#"+tip); //获取层的ID、相对定位控件的ID和坐标 if(initConfig.mode == "AutoTip" && tipDiv.length==0) { tipDiv = $("<div style='position:absolute;' id='"+tip+"'></div>"); var relativeID = setting_temp.relativeID ? setting_temp.relativeID : id; var offset = $("#"+relativeID ).offset(); setting_temp.tipCss.top = offset.top + setting_temp.tipCss.top; setting_temp.tipCss.left = $("#"+relativeID ).width() + offset.left + setting_temp.tipCss.left; var formValidateTip = $("<div style='position:absolute;' id='"+tip+"'></div>").appendTo($("body")); formValidateTip.css(setting_temp.tipCss); setting.relativeID = relativeID ; } tipDiv.css("margin","0px").css("padding","0px").css("background","transparent"); }else if(initConfig.mode == "SingleTip"){ jqobj.showTooltips(); } //每个控件都要保存这个配置信息、为了取数方便,冗余一份控件总体配置到控件上 setting.tipID = tip; setting.pwdTipID = setting_temp.pwdTipID ? setting_temp.pwdTipID : setting.tipID; setting.fixTipID = setting_temp.fixTipID ? setting_temp.fixTipID : id+"FixTip"; $.formValidator.appendValid(id,setting); //保存控件ID var validIndex = $.inArray(jqobj,initConfig.validObjects); if(validIndex == -1) { if (setting_temp.ajax) { var ajax = initConfig.ajaxObjects; initConfig.ajaxObjects = ajax + (ajax != "" ? ",#" : "#") + id; } initConfig.validObjects.push(this); }else{ initConfig.validObjects[validIndex] = this; } //初始化显示信息 if(initConfig.mode != "AlertTip"){ $.formValidator.setTipState(this,"onShow",setting.onShow); } var srcTag = this.tagName.toLowerCase(); var stype = this.type; var defaultval = setting.defaultValue; var isInputControl = stype == "password" || stype == "text" || stype == "textarea"; this.isInputControl = isInputControl; //处理默认值 if(defaultval){ jqobj.val(defaultval); } //固定提示内容 var fixTip = $("#"+setting.fixTipID); var showFixText = setting.onShowFixText; if(fixTip.length==1 && onMouseOutFixTextHtml!="" && onMouseOnFixTextHtml!="" && showFixText != "") { jqobj.hover( function () { fixTip.html(onMouseOnFixTextHtml.replace(/\$data\$/g, showFixText)); }, function () { fixTip.html(onMouseOutFixTextHtml.replace(/\$data\$/g, showFixText)); } ); fixTip.css("padding","0px 0px 0px 0px").css("margin","0px 0px 0px 0px").html(onMouseOutFixTextHtml.replace(/\$data\$/g, setting.onShowFixText)); } //获取输入框内的提示内容 var showText = setting.onShowText; if(srcTag == "input" || srcTag=="textarea") { if (isInputControl) { if(showText !=""){ showObjs = initConfig.showTextObjects; initConfig.showTextObjects = showObjs + (showObjs != "" ? ",#" : "#") + id; jqobj.val(showText); jqobj.css("color",setting.onShowTextColor.mouseOutColor); } } //注册获得焦点的事件。改变提示对象的文字和样式,保存原值 jqobj.focus(function() { if (isInputControl) { var val = jqobj.val(); this.validValueOld = val; if(showText==val){ this.value = ""; jqobj.css("color",setting.onShowTextColor.mouseOnColor); } }; if(initConfig.mode != "AlertTip"){ //保存原来的状态 var tipjq = $("#"+tip); this.lastshowclass = tipjq.attr("class"); this.lastshowmsg = tipjq.text(); $.formValidator.setTipState(this,"onFocus",setting.onFocus); }; if(this.validatorPasswordIndex > 0){$("#"+setting.pwdTipID).show();jqobj.trigger('keyup');} }); //按键时候触发校验 jqobj.bind("keyup",function(){ if(this.validatorPasswordIndex > 0) { try{ var returnObj = $.formValidator.oneIsValid(id); var level = $.formValidator.passwordValid(this) if(level < 0){level=0}; if(!returnObj.isValid){level = 0}; $("#"+setting.pwdTipID).show(); $("#"+setting.pwdTipID).html(passwordStrengthStatusHtml[level]); }catch(e) { alert("密码强度校验失败,错误原因:变量passwordStrengthStatusHtml语法错误或者为设置)"); } } }); //注册失去焦点的事件。进行校验,改变提示对象的文字和样式;出错就提示处理 jqobj.bind(setting.triggerEvent, function(){ var settings = this.settings; //根据配置截掉左右的空格 if(settings[0].leftTrim){this.value = this.replace(/^\s*/g, "");} if(settings[0].rightTrim){this.value = this.replace(/\s*$/g, "");} //恢复默认值 if(isInputControl){ if(this.value == "" && showText != ""){this.value = showText} if(this.value == showText){jqobj.css("color",setting.onShowTextColor.mouseOutColor)} } //进行有效性校验 var returnObj = $.formValidator.oneIsValid(id); if(returnObj==null){return} if(returnObj.ajax >= 0) { $.formValidator.showAjaxMessage(returnObj); } else { var showmsg = $.formValidator.showMessage(returnObj); if(!returnObj.isValid) { //自动修正错误 var auto = setting.autoModify && isInputControl; if(auto) { $(this).val(this.validValueOld); if(initConfig.mode != "AlertTip"){$.formValidator.setTipState(this,"onShow",$.formValidator.getStatusText(this,setting.onCorrect))}; } else { if(initConfig.forceValid || setting.forceValid){ alert(showmsg);this.focus(); } } } } }); } else if (srcTag == "select") { jqobj.bind({ //获得焦点 focus: function(){ if (initConfig.mode != "AlertTip") { $.formValidator.setTipState(this, "onFocus", setting.onFocus) }; }, //失去焦点 blur: function(){ if(this.validValueOld==undefined || this.validValueOld==jqobj.val()){$(this).trigger("change")} }, //选择项目后触发 change: function(){ var returnObj = $.formValidator.oneIsValid(id); if(returnObj==null){return;} if ( returnObj.ajax >= 0){ $.formValidator.showAjaxMessage(returnObj); }else{ $.formValidator.showMessage(returnObj); } } }); } }); }; $.fn.inputValidator = function(controlOptions) { var settings = {}; $.extend(true, settings, inputValidator_setting, controlOptions || {}); return this.each(function(){ $.formValidator.appendValid(this.id,settings); }); }; $.fn.compareValidator = function(controlOptions) { var settings = {}; $.extend(true, settings, compareValidator_setting, controlOptions || {}); return this.each(function(){ $.formValidator.appendValid(this.id,settings); }); }; $.fn.regexValidator = function(controlOptions) { var settings = {}; $.extend(true, settings, regexValidator_setting, controlOptions || {}); return this.each(function(){ $.formValidator.appendValid(this.id,settings); }); }; $.fn.functionValidator = function(controlOptions) { var settings = {}; $.extend(true, settings, functionValidator_setting, controlOptions || {}); return this.each(function(){ $.formValidator.appendValid(this.id,settings); }); }; $.fn.ajaxValidator = function(controlOptions) { var settings = {}; $.extend(true, settings, ajaxValidator_setting, controlOptions || {}); return this.each(function() { var initConfig = $.formValidator.getInitConfig(this.validatorGroup); var ajax = initConfig.ajaxObjects; if((ajax+",").indexOf("#"+this.id+",") == -1) { initConfig.ajaxObjects = ajax + (ajax != "" ? ",#" : "#") + this.id; } this.validatorAjaxIndex = $.formValidator.appendValid(this.id,settings); }); }; $.fn.passwordValidator = function(controlOptions) { //默认配置 var settings = {}; $.extend(true, settings, passwordValidator_setting, controlOptions || {}); return this.each(function() { this.validatorPasswordIndex = $.formValidator.appendValid(this.id,settings); }); }; //指定控件显示通过或不通过样式 $.fn.defaultPassed = function(onShow) { return this.each(function() { var settings = this.settings; settings[0].defaultPassed = true; this.onceValided = true; for ( var i = 1 ; i < settings.length ; i ++ ) { settings[i].isValid = true; if(!$.formValidator.getInitConfig(settings[0].validatorGroup).mode == "AlertTip"){ var ls_style = onShow ? "onShow" : "onCorrect"; $.formValidator.setTipState(this,ls_style,settings[0].onCorrect); } } }); }; //指定控件不参加校验 $.fn.unFormValidator = function(unbind) { return this.each(function() { if(this.settings) { this.settings[0].bind = !unbind; if(unbind){ $("#"+this.settings[0].tipID).hide(); }else{ $("#"+this.settings[0].tipID).show(); } } }); }; //显示漂浮显示层 $.fn.showTooltips = function() { if($("body [id=fvtt]").length==0){ fvtt = $("<div id='fvtt' style='position:absolute;z-index:56002'></div>"); $("body").append(fvtt); fvtt.before("<iframe index=0 src='about:blank' class='fv_iframe' scrolling='no' frameborder='0'></iframe>"); } return this.each(function() { jqobj = $(this); s = $("<span class='top' id=fv_content style='display:block'></span>"); b = $("<b class='bottom' style='display:block' />"); this.tooltip = $("<span class='fv_tooltip' style='display:block'></span>").append(s).append(b).css({"filter":"alpha(opacity:95)","KHTMLOpacity":"0.95","MozOpacity":"0.95","opacity":"0.95"}); //注册事件 jqobj.bind({ mouseover : function(e){ $("#fvtt").empty().append(this.tooltip).show(); $("#fv_content").html(this.Tooltip); $.formValidator.localTooltip(e); }, mouseout : function(){ $("#fvtt").hide(); }, mousemove: function(e){ $.formValidator.localTooltip(e); } }); }); } })(jQuery); var initConfig_setting = { theme:"Default", validatorGroup : "1", //分组号 formID:"", //表单ID submitOnce:false, //页面是否提交一次,不会停留 ajaxForm : null, //如果不为null,表示整个表单ajax提交 mode : "FixTip", //显示模式 errorFocus:true, //第一个错误的控件获得焦点 wideWord:true, //一个汉字当做2个长 forceValid:false, //控件输入正确之后,才允许失去焦 debug:false, //调试模式点 inIframe:false, onSuccess: function() {return true;}, //提交成功后的回调函数 onError: $.noop, //提交失败的回调函数度 status:"", //提交的状态:submited、sumbiting、sumbitingWithAjax ajaxPrompt : "当前有数据正在进行服务器端校验,请稍候", //控件失去焦点后,触发ajax校验,没有返回结果前的错误提示 validCount:0, //含ajaxValidator的控件个数 ajaxCountSubmit:0, //提交的时候触发的ajax验证个数 ajaxCountValid:0, //失去焦点时候触发的ajax验证个数 validObjects:[], //参加校验的控件集合 ajaxObjects:"", //传到服务器的控件列表 showTextObjects:"", validateType : "initConfig" }; var formValidator_setting = { validatorGroup : "1", onShowText : "", onShowTextColor:{mouseOnColor:"#000000",mouseOutColor:"#999999"}, onShowFixText:"", onShow :"请输入内容", onFocus: "请输入内容", onCorrect: "输入正确", onEmpty: "输入内容为空", empty :false, autoModify : false, defaultValue : null, bind : true, ajax : false, validateType : "formValidator", tipCss : { left:10, top:-4, height:20, width:280 }, triggerEvent:"blur", forceValid : false, tipID : null, pwdTipID : null, fixTipID : null, relativeID : null, index : 0, leftTrim : false, rightTrim : false }; var inputValidator_setting = { isValid : false, type : "size", min : 0, max : 99999, onError:"输入错误", validateType:"inputValidator", empty:{leftEmpty:true,rightEmpty:true,leftEmptyError:null,rightEmptyError:null} }; var compareValidator_setting = { isValid : false, desID : "", operateor :"=", onError:"输入错误", validateType:"compareValidator" }; var regexValidator_setting = { isValid : false, regExp : "", param : "i", dataType : "string", compareType : "||", onError:"输入的格式不正确", validateType:"regexValidator" }; var ajaxForm_setting = { type : "GET", url : window.location.href, dataType : "html", timeout : 100000, data : null, async : true, cache : false, buttons : null, beforeSend : function(){return true;}, success : function(){return true;}, complete : $.noop, processData : true, error : $.noop }; var ajaxValidator_setting = { isValid : false, lastValid : "", oneceValid : false, randNumberName : "rand", onError:"服务器校验没有通过", onWait:"正在等待服务器返回数据", validateType:"ajaxValidator" }; $.extend(true,ajaxValidator_setting,ajaxForm_setting); var functionValidator_setting = { isValid : true, fun : function(){this.isValid = true;}, validateType:"functionValidator", onError:"输入错误" }; var passwordValidator_setting = { isValid : true, compareID : "", validateType:"passwordValidator", onErrorContinueChar:"密码字符为连续字符不被允许", onErrorSameChar:"密码字符都相同不被允许", onErrorCompareSame:"密码于用户名相同不被允许" }; var validatorGroup_setting = []; var fv_scriptSrc = document.getElementsByTagName('script')[document.getElementsByTagName('script').length - 1].src;
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/formValidator-4.1.1.js
JavaScript
oos
48,317
/* EASY TABS 1.2 Produced and Copyright by Koller Juergen www.kollermedia.at | www.austria-media.at Need Help? http:/www.kollermedia.at/archive/2007/07/10/easy-tabs-12-now-with-autochange You can use this Script for private and commercial Projects, but just leave the two credit lines, thank you. */ //EASY TABS 1.2 - MENU SETTINGS //Set the id names of your tablink (without a number at the end) var tablink_idname = new Array("tablink") //Set the id name of your tabcontentarea (without a number at the end) var tabcontent_idname = new Array("tabcontent") //Set the number of your tabs var tabcount = new Array("4") //Set the Tab wich should load at start (In this Example:Tab 2 visible on load) var loadtabs = new Array("2") //Set the Number of the Menu which should autochange (if you dont't want to have a change menu set it to 0) var autochangemenu = 1; //the speed in seconds when the tabs should change var changespeed = 3; //should the autochange stop if the user hover over a tab from the autochangemenu? 0=no 1=yes var stoponhover = 0; //END MENU SETTINGS /*Swich EasyTabs Functions - no need to edit something here*/ function easytabs(menunr, active) { if (menunr == autochangemenu){currenttab=active;}if ((menunr == autochangemenu)&&(stoponhover==1)) {stop_autochange()} else if ((menunr == autochangemenu)&&(stoponhover==0)) {counter=0;}menunr = menunr-1;for (i=1; i <= tabcount[menunr]; i++){document.getElementById(tablink_idname[menunr]+i).className='tab'+i;document.getElementById(tabcontent_idname[menunr]+i).style.display = 'none';}document.getElementById(tablink_idname[menunr]+active).className='tab'+active+' tabactive';document.getElementById(tabcontent_idname[menunr]+active).style.display = 'block';}var timer; counter=0; var totaltabs=tabcount[autochangemenu-1];var currenttab=loadtabs[autochangemenu-1];function start_autochange(){counter=counter+1;timer=setTimeout("start_autochange()",1000);if (counter == changespeed+1) {currenttab++;if (currenttab>totaltabs) {currenttab=1}easytabs(autochangemenu,currenttab);restart_autochange();}}function restart_autochange(){clearTimeout(timer);counter=0;start_autochange();}function stop_autochange(){clearTimeout(timer);counter=0;} window.onload=function(){ var menucount=loadtabs.length; var a = 0; var b = 1; do {easytabs(b, loadtabs[a]); a++; b++;}while (b<=menucount); if (autochangemenu!=0){start_autochange();} }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/easytabs.js
JavaScript
oos
2,427
var onShowHtml = "<div class='$class$'>$data$</div>"; var onFocusHtml = "<div class='$class$'>$data$</div>"; var onErrorHtml = "<div class='$class$'>$data$</div>"; var onCorrectHtml = "<div class='$class$'>$data$</div>"; var onShowClass = ""; var onFocusClass = ""; var onErrorClass = ""; var onCorrectClass = "";
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/themes/Default/js/theme.js
JavaScript
oos
320
.onShow { background:url(../images/onShow.gif) no-repeat; padding-left:25px; margin-left:10px; font-size: 12px; line-height:22px; vertical-align:middle; } .onFocus { background:#E9F0FF url(../images/onFocus.gif) no-repeat; padding-left:25px; margin-left:10px; font-size: 12px; line-height:22px; vertical-align:middle; } .onError { background:#FFF2E9 url(../images/onError.gif) no-repeat; padding-left:25px; margin-left:10px; font-size: 12px; line-height:22px; vertical-align:middle; } .onCorrect { background:#E9FFEB url(../images/onCorrect.gif) no-repeat; padding-left:25px; margin-left:10px; font-size: 12px; line-height:22px; vertical-align:middle; } .onLoad { background:#E9FFEB url(../images/onLoad.gif) no-repeat 3px 3px; padding-left:25px; margin-left:10px; font-size: 12px; line-height:22px; vertical-align:middle; } .inputOnShow { color: #999999 }
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/themes/Default/style/style.css
CSS
oos
977
//提示层的HTML var onShowHtml = ''; var onFocusHtml = ''; var onErrorHtml = '<P class="noticeWrap"><B class="ico-warning"></B><SPAN class=txt-err>$data$</SPAN></P>'; var onCorrectHtml = '<P class="noticeWrap"><B class="ico-succ"></B><SPAN class=txt-succ>$data$</SPAN></P>'; var onShowHtml = ''; //文本框的样式 var onShowClass = "g-ipt"; var onFocusClass = "g-ipt-active"; var onErrorClass = "g-ipt-err"; var onCorrectClass = "g-ipt"; //固定提示层的HTML var onMouseOnFixTextHtml = '<DIV class="txt-info-mouseon">$data$</DIV>'; var onMouseOutFixTextHtml = '<DIV class="txt-info-mouseout">$data$</DIV>'; //初始状态,加其它几种状态 var passwordStrengthStatusHtml = [ '<P id=passStrong class="pswState">强度:<EM class=st1>弱</EM><B class="progressImage prog0"></B><EM class=st2>强</EM></P>', '<P id=passStrong class="pswState">强度:<EM class=st1>弱</EM><B class="progressImage prog1"></B><EM class=st2>强</EM></P>', '<P id=passStrong class="pswState">强度:<EM class=st1>弱</EM><B class="progressImage prog2"></B><EM class=st2>强</EM></P>', '<P id=passStrong class="pswState">强度:<EM class=st1>弱</EM><B class="progressImage prog3"></B><EM class=st2>强</EM></P>' ]; var passwordStrengthText = ['密码强度:弱','密码强度:中','密码强度:强'] //密码强度校验规则(flag=1(数字)+2(小写)+4(大写)+8(特殊字符)的组合,value里的0表示跟密码一样长,1表示起码1个长度) var passwordStrengthRule = [ {level:1,rule:[ {flag:1,value:[0]}, //数字 {flag:2,value:[0]}, //小写字符 {flag:4,value:[0]} //大写字符 ] }, {level:2,rule:[ {flag:8,value:[0]}, //特符 {flag:9,value:[1,1]}, //数字(>=1)+特符>=1) {flag:10,value:[1,1]}, //小写(>=1)+特符>=1) {flag:12,value:[1,1]}, //大写(>=1)+特符>=1) {flag:3,value:[1,1]}, //数字(>=1)+小写(>=1) {flag:5,value:[1,1]}, //数字(>=1)+大写(>=1) {flag:6,value:[1,1]} //小写(>=1)+大写(>=1) ] }, {level:3,rule:[ {flag:11,value:[1,1,1]}, //数字(>=1)+小写(>=1)+特符(>=1) {flag:13,value:[1,1,1]}, //数字(>=1)+大写(>=1)+特符(>=1) {flag:14,value:[1,1,1]}, //小写(>=1)+大写(>=1)+特符(>=1) {flag:7,value:[1,1,1]} //数字(>=1)+小写(>=1)+大写(>=1) ] } ];
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/themes/126/js/theme.js
JavaScript
oos
2,416
var onShowHtml = "<div class='$class$'>$data$</div>"; var onFocusHtml = "<div class='$class$'>$data$</div>"; var onErrorHtml = "<div class='$class$'>$data$</div>"; var onCorrectHtml = "<div class='$class$'>$data$</div>"; var onShowClass = "input_show"; var onFocusClass = "input_focus"; var onErrorClass = "input_error"; var onCorrectClass = "input_correct";
10aaa-10aaa
trunk/TRECommerce/TREC.Web/suppler/script/themes/SolidBox/js/theme.js
JavaScript
oos
365