protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { B_Admin badmin = new B_Admin(); if (!B_ARoleAuth.Check(ZLEnum.Auth.user, "UserManage")) { function.WriteErrMsg("没有权限进行此项操作"); } int userNameLimit = 3; int userNameMax = 20; if (SiteConfig.UserConfig.UserNameLimit > 0) { userNameLimit = SiteConfig.UserConfig.UserNameLimit; } if (SiteConfig.UserConfig.UserNameMax >= userNameLimit) { userNameMax = SiteConfig.UserConfig.UserNameMax; } B_Group bgr = new B_Group(); this.DDLGroup.DataSource = bgr.GetGroupList(); this.DDLGroup.DataTextField = "GroupName"; this.DDLGroup.DataValueField = "GroupID"; this.DDLGroup.DataBind(); lblHtml.Text = ubfbll.GetHtml(); } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='AdminManage.aspx'>用户管理</a></li><li><a href='UserManage.aspx'>会员管理</a></li><li class='active'>添加会员</li>"); }
// 会员价 private void OtherBind() { repGroup.DataSource = bgroup.GetGroupList(); repGroup.DataBind(); FareTlp_Rad.DataSource = fareBll.Sel(); FareTlp_Rad.DataBind(); FareTlp_Rad.Items.Insert(0, new ListItem("免费", "0")); FareTlp_Rad.SelectedValue = "0"; }
// 会员价 private void OtherBind() { Price_Group_RPT.DataSource = gpBll.GetGroupList(); Price_Group_RPT.DataBind(); FareTlp_Rad.DataSource = fareBll.Sel(); FareTlp_Rad.DataBind(); FareTlp_Rad.Items.Insert(0, new ListItem("免费", "0")); FareTlp_Rad.SelectedValue = "0"; }
public VM_Product(M_Product proMod, HttpRequestBase Request) { groupList = JsonConvert.SerializeObject(DBCenter.SelWithField("ZL_Group", "GroupID,GroupName")); gpriceDT = gpBll.GetGroupList(); gpriceDT.Columns.Add(new DataColumn("gprice", typeof(string))); fareDT = fareBll.Sel(); this.proMod = proMod; if (proMod.ID > 0) { this.NodeID = proMod.Nodeid; this.ModelID = proMod.ModelID; this.ProGuid = proMod.ID.ToString(); //会员组价 if (proMod.UserType == 2 && proMod.UserPrice.Contains("[") && !proMod.UserPrice.Equals("[]")) { DataTable upDT = JsonConvert.DeserializeObject <DataTable>(proMod.UserPrice); foreach (DataRow dr in upDT.Rows) { DataRow[] drs = gpriceDT.Select("GroupID='" + dr["gid"] + "'"); if (drs.Length > 0) { drs[0]["gprice"] = DataConvert.CDouble(dr["price"]).ToString("F2"); } } } //捆绑商品 if (!string.IsNullOrEmpty(proMod.BindIDS)) { DataTable dt = proBll.SelByIDS(proMod.BindIDS, "id,Thumbnails,Proname,LinPrice"); bindList = JsonConvert.SerializeObject(dt); } if (!string.IsNullOrEmpty(proMod.TableName)) { DataTable valueDT = proBll.Getmodetable(proMod.TableName.ToString(), proMod.ItemID); if (valueDT != null && valueDT.Rows.Count > 0) { modelHtml = fieldBll.InputallHtml(ModelID, NodeID, new ModelConfig() { ValueDT = valueDT }); } } } else { this.NodeID = DataConvert.CLng(Request.QueryString["NodeID"]); this.ModelID = DataConvert.CLng(Request.QueryString["ModelID"]); this.ProGuid = System.Guid.NewGuid().ToString(); this.proMod.ProCode = B_Product.GetProCode(); modelHtml = fieldBll.InputallHtml(ModelID, NodeID, new ModelConfig() { Source = ModelConfig.SType.Admin }); } nodeMod = nodeBll.SelReturnModel(NodeID); }
//会员组等下拉框绑定 private void DPBind() { DataTable dt = groupBll.GetGroupList(); UserGroup_DP.DataSource = dt; UserGroup_DP.DataBind(); SelectGroup.DataSource = dt;//数据绑定 SelectGroup.DataBind(); this.SelectGroup.Items.Insert(0, new ListItem("选择等级", "0")); ddlGroup.DataSource = dt; ddlGroup.DataBind(); }
//会员组等下拉框绑定 private void DPBind() { DataTable dt = groupBll.GetGroupList(); UserGroup_DP.DataSource = dt; UserGroup_DP.DataBind(); SelectGroup.DataSource = dt;//数据绑定 SelectGroup.DataBind(); SelectGroup.Items.Insert(0, new ListItem(Resources.L.择等级, "0")); ddlGroup_DP.DataSource = dt; ddlGroup_DP.DataBind(); ddlGroup_DP.Items.Insert(0, new ListItem(Resources.L.全部会员, "0")); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { B_ARoleAuth.CheckEx(ZLEnum.Auth.model, "NodeEdit"); Call.SetBreadCrumb(Master, "<li><a href='../Config/SiteOption.aspx'>系统设置</a></li><li><a href='NodeManage.aspx'>节点管理</a></li><li class=\"active\">节点批量设置</li>" + Call.GetHelp(16)); UPromoDT = psll.Select_All(); //绑定模型 DataTable dt = this.bllmodel.GetList(); this.Model_RPT.DataSource = dt; this.Model_RPT.DataBind(); //绑定节点 this.LstNodes.DataSource = nodeBll.CreateForListBox(); this.LstNodes.DataTextField = "NodeName"; this.LstNodes.DataValueField = "NodeID"; this.LstNodes.DataBind(); //绑定权限 DataTable Rt = B_Role.GetRoleName(); this.Egv.DataSource = Rt; this.Egv.DataBind(); this.GridView1.DataSource = gpBll.GetGroupList(); this.GridView1.DataBind(); //用户组 DataTable tinfo = gpBll.GetGroupList(); for (int i = 0; i < tinfo.Rows.Count; i++) { ViewGroup.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); ViewGroup2.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); ViewGroup3.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); } } }
private void BindUserPrice(M_Product pinfo) { switch (pinfo.UserType) { case 1: Price_Member_T.Text = DataConverter.CDouble(pinfo.UserPrice).ToString("f2"); price_member_div.Attributes["style"] = ""; break; case 2: price_group_div.Attributes["style"] = ""; break; default: UserPri_L.Text = "未设置"; break; } DataTable gpdt = gpBll.GetGroupList(); //附加会员价,限购数,最低购买数等限制 gpdt.Columns.Add(new DataColumn("price", typeof(string))); if (pinfo != null && pinfo.ID > 0) { if (pinfo.UserPrice.Contains("[")) { DataTable dt = JsonConvert.DeserializeObject <DataTable>(pinfo.UserPrice); if (dt.Columns.Contains("price")) { dt.Columns["price"].ColumnName = "value"; } foreach (DataRow dr in dt.Rows) { DataRow[] gps = gpdt.Select("GroupID='" + dr["gid"] + "'"); if (gps.Length > 0) { gps[0]["price"] = DataConverter.CDouble(dr["value"]).ToString("F2"); } } } } Price_Group_RPT.DataSource = gpdt; Price_Group_RPT.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { B_ARoleAuth.CheckEx(ZLEnum.Auth.model, "NodeEdit"); if (function.isAjax()) { #region AJAX M_Node nodeMod = nodeBll.SelReturnModel(NodeID); if (NodeID < 1) { nodeMod.ParentID = ParentID; } string action = Request.Form["action"]; string value = Request.Form["value"]; int result = M_APIResult.Success; switch (action) { case "nodename": { nodeMod.NodeName = value; result = nodeBll.CheckNodeName(nodeMod)?M_APIResult.Success:M_APIResult.Failed; } break; case "nodedir": { nodeMod.NodeDir = value; result = nodeBll.CheckNodeDir(nodeMod) ? M_APIResult.Success : M_APIResult.Failed; } break; } Response.Write(result); Response.Flush(); Response.End(); #endregion } if (!IsPostBack) { M_AdminInfo adminMod = B_Admin.GetLogin(); M_Node nodeMod = nodeBll.SelReturnModel(NodeID); M_Node parentMod = nodeBll.SelReturnModel(ParentID > 0 ? ParentID : nodeMod.ParentID); LblNodeName.Text = parentMod.NodeName; if (NodeID < 1) { Title_T.Text = "添加节点"; CDate_T.Text = DateTime.Now.ToString(); CUser_T.Text = adminMod.AdminName; ModelArr += parentMod.ContentModel; function.Script(this, "BindPY();"); } else if (NodeID > 0) { Title_T.Text = "修改节点"; Release_Btn.Visible = true; #region 节点信息填充 if (nodeMod.IsNull) { function.WriteErrMsg("指定要编辑的节点不存在"); } //LblNodeName.Text = nodeMod.NodeName; //EDHid.Value = nodeMod.Viewinglimit; //HdnDepth.Value = nodeMod.Depth.ToString(); //HdnParentId.Value = nodeMod.ParentID.ToString(); //HdnOrderID.Value = nodeMod.OrderID.ToString(); //HdnChild.Value = nodeMod.Child.ToString(); TxtNodeName.Text = nodeMod.NodeName; TxtNodeDir.Text = nodeMod.NodeDir; TxtNodePicUrl.Text = nodeMod.NodePic; TxtTips.Text = nodeMod.Tips; TxtMetaKeywords.Text = nodeMod.Meta_Keywords; TxtMetaDescription.Text = nodeMod.Meta_Description; TxtDescription.Text = nodeMod.Description; //RBLOpenType.SelectedValue = DataConverter.CLng(node.OpenNew).ToString(); RBLPurviewType.SelectedValue = nodeMod.PurviewType ? "1" : "0"; SiteContentAudit_Rad.SelectedValue = nodeMod.SiteContentAudit.ToString(); RBLCommentType.SelectedValue = nodeMod.CommentType; TxtHitsOfHot.Text = nodeMod.HitsOfHot.ToString(); TxtTemplate_hid.Value = nodeMod.ListTemplateFile; IndexTemplate_hid.Value = nodeMod.IndexTemplate; LastinfoTemplate_hid.Value = nodeMod.LastinfoTemplate; ProposeTemplate_hid.Value = nodeMod.ProposeTemplate; HotinfoTemplate_hid.Value = nodeMod.HotinfoTemplate; ListPageHtmlEx_Rad.SelectedValue = nodeMod.ListPageHtmlEx.ToString(); ContentFileEx_Rad.SelectedValue = nodeMod.ContentFileEx.ToString(); ListPageEx_Rad.SelectedValue = nodeMod.ListPageEx.ToString(); LastinfoPageEx_Rad.SelectedValue = nodeMod.LastinfoPageEx.ToString(); HotinfoPageEx.SelectedValue = nodeMod.HotinfoPageEx.ToString(); ProposePageEx.SelectedValue = nodeMod.ProposePageEx.ToString(); DDLContentRule.SelectedValue = nodeMod.ContentPageHtmlRule.ToString(); RBLPosition.SelectedValue = nodeMod.HtmlPosition.ToString(); RBLItemOpenType.SelectedValue = nodeMod.ItemOpenTypeTrue.ToString(); RBLOpenType.SelectedValue = nodeMod.OpenTypeTrue.ToString(); TxtAddMoney.Text = nodeMod.AddMoney.ToString(); TxtAddPoint.Text = nodeMod.AddPoint.ToString(); ClickTimeout.SelectedValue = nodeMod.ClickTimeout.ToString(); txtAddExp.Text = nodeMod.AddUserExp.ToString(); txtDeducExp.Text = nodeMod.DeducUserExp.ToString(); ConsumeType_Hid.Value = nodeMod.ConsumeType.ToString(); CDate_T.Text = nodeMod.CDate.ToString(); CUser_T.Text = nodeMod.CUName; DataTable auitDt = nodeBll.GetNodeAuitDT(nodeMod.Purview); //组权限绑定 GroupAuthDT = psll.SelByNid(NodeID); DataTable tinfo = bGll.GetGroupList(); GroupAuth_EGV.DataSource = tinfo; GroupAuth_EGV.DataBind(); for (int i = 0; i < tinfo.Rows.Count; i++) { ViewGroup_Chk.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); ViewGroup2_Chk.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); input_Chk.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); } //节点权限 if (auitDt != null && auitDt.Rows.Count > 0) { DataRow auitdr = auitDt.Rows[0]; SelCheck_RadioList.SelectedValue = auitdr["View"].ToString(); string ViewGroup = auitdr["ViewGroup"].ToString(); string ViewSunGroup = auitdr["ViewSunGroup"].ToString(); string input = auitdr["input"].ToString(); string forum = auitdr["forum"].ToString(); foreach (ListItem item in ViewGroup_Chk.Items) { if (("," + ViewGroup + ",").Contains("," + item.Value + ",")) { item.Selected = true; } } foreach (ListItem item in ViewGroup2_Chk.Items) { if (("," + ViewSunGroup + ",").Contains("," + item.Value + ",")) { item.Selected = true; } } foreach (ListItem item in input_Chk.Items) { if (("," + input + ",").Contains("," + item.Value + ",")) { item.Selected = true; } } foreach (ListItem item in forum_Chk.Items) { if (("," + forum + ",").Contains("," + item.Value + ",")) { item.Selected = true; } } } TxtConsumeCount.Text = nodeMod.ConsumeCount.ToString(); TxtConsumePoint.Text = nodeMod.ConsumePoint.ToString(); TxtConsumeTime.Text = nodeMod.ConsumeTime.ToString(); TxtShares.Text = nodeMod.Shares.ToString(); SetCustom(nodeMod.Custom); ModelArr = nodeMod.ContentModel; isSimple_CH.Checked = nodeMod.Contribute == 1; SafeGuard.Checked = nodeMod.SafeGuard == 1 ? true : false; #endregion } //添加工作流 ddlState.DataSource = bf.GetFlowAll(); ddlState.DataTextField = "flowName"; ddlState.DataValueField = "id"; ddlState.DataBind(); ddlState.Items.Insert(0, new ListItem("不指定", "0")); droMod = droBll.SelByNodeID(NodeID); ddlState.SelectedValue = droMod == null ? "0" : droMod.FID.ToString(); BGroup.DataSource = bGll.GetGroupList(); BGroup.DataBind(); //内容模型列表 DataTable dt = bllmodel.GetList(); Model_RPT.DataSource = dt; Model_RPT.DataBind(); //角色列表 DataTable Rt = B_Role.SelectNodeRoleNode(NodeID); AdminRole_EGV.DataSource = Rt; AdminRole_EGV.DataBind(); #region 互动 DataTable dp = pll.GetPubModelPublic(); DropDownList1.DataSource = dp; DropDownList1.DataTextField = "PubName"; DropDownList1.DataValueField = "Pubid"; DropDownList1.DataBind(); DropDownList1.Items.Insert(0, new ListItem("选择绑定", "0")); M_Pub pp = pll.GetSelectNode(NodeID.ToString()); if (pp.Pubid > 0) { DropDownList1.SelectedValue = pp.Pubid.ToString(); } #endregion string bread = "<li><a href='" + customPath2 + "Config/SiteInfo.aspx'>系统设置</a></li><li><a href='NodeManage.aspx'>节点管理</a></li>"; bread += "<li class='active'><a href='" + Request.RawUrl + "'>" + Title_T.Text + "</a></li>"; bread += Call.GetHelp(103); bread += "<div class='pull-right' style='margin-right:10px;'><a href='" + Request.RawUrl + "' title='刷新'><i class='fa fa-refresh'></i></a></div>"; Call.SetBreadCrumb(Master, bread); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ShowPlatInfo(Convert.ToInt32(UserID)); ViewState["PageUrl"] = customPath2 + "User/Userinfo.aspx?id=" + UserID; ViewState["url"] = "/Manage/User/UserManage.aspx"; if (Request.QueryString["type"] == "x") { ViewState["PageUrl"] = System.Web.HttpContext.Current.Request.UrlReferrer.ToString(); ViewState["url"] = System.Web.HttpContext.Current.Request.UrlReferrer.ToString(); } if (UserID < 1) { function.WriteErrMsg("请指定会员ID", ViewState["PageUrl"].ToString()); } M_UserInfo uinfo = buser.SeachByID(DataConverter.CLng(UserID)); if (uinfo.IsNull) { function.WriteErrMsg("指定ID:" + UserID + "的用户不存在!可能已被删除!", ViewState["url"].ToString()); } M_Uinfo binfo = buser.GetUserBaseByuserid(UserID); DDLGroup.DataSource = gpBll.GetGroupList(); DDLGroup.DataTextField = "GroupName"; DDLGroup.DataValueField = "GroupID"; DDLGroup.DataBind(); lblUser.Text = uinfo.UserName; tbEmail.Text = uinfo.Email; OldEmail_Hid.Value = uinfo.Email; txtPurm.Text = uinfo.DummyPurse.ToString(); tbQuestion.Text = uinfo.Question; tbAnswer.Text = uinfo.Answer; tbTrueName.Text = uinfo.TrueName; tbUserSex.SelectedValue = binfo.UserSex ? "1" : "0"; tbBirthday.Text = binfo.BirthDay; tbOfficePhone.Text = binfo.OfficePhone; tbHomePhone.Text = binfo.HomePhone; tbMobile.Text = binfo.Mobile; tbPHS.Text = binfo.PHS; tbFax.Text = binfo.Fax; tbAddress.Text = binfo.Address; tbZipCode.Text = binfo.ZipCode; txtHoneyName.Text = uinfo.HoneyName; tbIDCard.Text = binfo.IDCard; tbQQ.Text = binfo.QQ; tbHomepage.Text = binfo.HomePage; UserFace_SFile.FileUrl = uinfo.UserFace; UserFace_Img.ImageUrl = uinfo.UserFace; tbFaceWidth.Text = binfo.FaceWidth.ToString(); tbFaceHeight.Text = binfo.FaceHeight.ToString(); tbSign.Text = binfo.Sign; tbPrivacy.SelectedValue = binfo.Privating.ToString(); DDLGroup.SelectedValue = uinfo.GroupID.ToString(); txtUserCrite.Text = uinfo.UserCreit.ToString(); txtMoney.Text = uinfo.Purse.ToString(); txtPoint.Text = uinfo.UserExp.ToString(); txtSilverCoin.Text = uinfo.SilverCoin.ToString(); txtUserPoint.Text = uinfo.UserPoint.ToString(); //点券 txtboffExp.Text = uinfo.boffExp.ToString(); //卖家积分 txtConsumeExp.Text = uinfo.ConsumeExp.ToString(); //消费积分 txtDeadLine.Text = uinfo.DeadLine.ToString(); //有效期截止时间 txtCerificateDeadLine.Text = uinfo.CerificateDeadLine.ToString(); VIPUser.SelectedValue = binfo.VIPUser.ToString(); Adress_Hid.Value = binfo.Province + "," + binfo.City + "," + binfo.County; tbParentUserID.Text = uinfo.ParentUserID.ToString(); CompanyNameT.Text = uinfo.CompanyName; CompanyDescribeT.Text = uinfo.CompanyDescribe; WorkNum_T.Text = uinfo.WorkNum; DataTable dtuser = buser.GetUserBaseByuserid(UserID.ToString()); lblHtml.Text = bub.GetUpdateHtml(dtuser); BindUserRole(uinfo); Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + customPath2 + "User/UserManage.aspx'>会员管理</a></li><li class='active'><a href='" + Request.RawUrl + "'>修改会员信息</a> 当前用户:" + uinfo.UserName + "</li>"); } }
protected void Page_Load(object sender, EventArgs e) { #region disuse //if (function.isAjax()) //{ // string action = Request.Form["action"]; // string value = Request.Form["val"]; // //{\"result\":\"This Is The JSON Data\"} // string jsonR = "{"; // switch (action) // { // case "NodeInfo": // M_Node node = this.bll.GetNodeXML(DataConverter.CLng(value)); // jsonR += "\"NodeName\":\""+node.NodeName+"\","; // jsonR += "\"IndexTemplate\":\"" + node.IndexTemplate + "\","; // jsonR += "\"ListTemplateFile\":\"" + node.ListTemplateFile + "\","; // jsonR += "\"LastinfoTemplate\":\"" + node.LastinfoTemplate + "\","; // jsonR += "\"ProposeTemplate\":\"" + node.ProposeTemplate + "\","; // jsonR += "\"HotinfoTemplate\":\"" + node.HotinfoTemplate + "\","; // //----模型块 // jsonR += "\"ContentModel\":\"" + node.ContentModel + "\""; // break; // } // jsonR += "}"; // //jsonR = "{\"NodeName\":\"This Is The JSON Data\"}"; // Response.Write(jsonR); Response.Flush(); Response.End(); //} #endregion if (!IsPostBack) { B_ARoleAuth.CheckEx(ZLEnum.Auth.model, "NodeEdit"); Call.SetBreadCrumb(Master, "<li><a href='../Config/SiteOption.aspx'>系统设置</a></li><li><a href='NodeManage.aspx'>节点管理</a></li><li class=\"active\">节点批量设置</li>" + Call.GetHelp(16)); UPromoDT = psll.Select_All(); //绑定模型 DataTable dt = this.bllmodel.GetList(); this.Model_RPT.DataSource = dt; this.Model_RPT.DataBind(); //绑定节点 this.LstNodes.DataSource = nodeBll.CreateForListBox(); this.LstNodes.DataTextField = "NodeName"; this.LstNodes.DataValueField = "NodeID"; this.LstNodes.DataBind(); //绑定权限 DataTable Rt = B_Role.GetRoleName(); this.Egv.DataSource = Rt; this.Egv.DataBind(); this.GridView1.DataSource = gpBll.GetGroupList(); this.GridView1.DataBind(); //用户组 DataTable tinfo = gpBll.GetGroupList(); for (int i = 0; i < tinfo.Rows.Count; i++) { ViewGroup.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); ViewGroup2.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); ViewGroup3.Items.Add(new ListItem(tinfo.Rows[i]["GroupName"].ToString(), tinfo.Rows[i]["GroupID"].ToString())); } } }
//保存 protected void EBtnSubmit_Click(object sender, EventArgs e) { string adminname = badmin.GetAdminLogin().AdminName; DataTable dt = fieldBll.GetModelFieldList(ModelID); DataTable gpdt = gpBll.GetGroupList(); DataTable table = new Call().GetDTFromPage(dt, Page, ViewState); M_CommonData CCate = new M_CommonData(); M_Product proMod = new M_Product(); if (ProID > 0) { proMod = proBll.GetproductByid(ProID); } CCate.Status = istrue_chk.Checked ? 99 : 0; CCate.NodeID = NodeID; CCate.ModelID = ModelID; CCate.TableName = modBll.GetModelById(ModelID).TableName; CCate.Title = Proname.Text; CCate.Inputer = adminname; CCate.PdfLink = ""; CCate.FirstNodeID = nodeBll.SelFirstNodeID(NodeID); CCate.EliteLevel = DataConverter.CLng(Dengji.SelectedValue) > 3 ? 1 : 0; CCate.InfoID = ""; CCate.SpecialID = ""; CCate.Template = ModeTemplate_hid.Value; CCate.DefaultSkins = 0; /*--------------proMod------------*/ proMod.Class = 0; proMod.Nodeid = NodeID; proMod.ModelID = ModelID; proMod.Properties = 0; proMod.Isgood = 0; proMod.MakeHtml = 0; proMod.AddUser = adminname; if (string.IsNullOrEmpty(proMod.ProCode)) { proMod.ProCode = B_Product.GetProCode(); } proMod.BarCode = BarCode.Text.Trim(); proMod.Proname = Proname.Text.Trim(); proMod.Kayword = Request.Form["tabinput"]; keyBll.AddKeyWord(proMod.Kayword, 1); proMod.ProUnit = ProUnit.Text; proMod.AllClickNum = DataConverter.CLng(Request.Form["AllClickNum"]); proMod.Weight = DataConverter.CLng(Weight.Text); proMod.ProClass = DataConverter.CLng(ProClass_Hid.Value); proMod.IDCPrice = IDC_Hid.Value; proMod.PointVal = DataConverter.CLng(PointVal_T.Text); proMod.Proinfo = Proinfo.Text; proMod.Procontent = procontent.Value; proMod.Clearimg = txt_Clearimg.Text; proMod.Thumbnails = txt_Thumbnails.Text; proMod.Producer = Producer.Text; proMod.Brand = Brand.Text; //proMod.Quota = DataConverter.CLng(Quota.Text); //proMod.DownQuota = DataConverter.CLng(DownQuota.Text); proMod.StockDown = DataConverter.CLng(StockDown.Text); proMod.JisuanFs = DataConverter.CLng(Request.Form["JisuanFs"]); proMod.Rate = DataConverter.CDouble(Rate.Text); proMod.Rateset = DataConverter.CLng(Rateset.SelectedValue); proMod.Dengji = DataConverter.CLng(Dengji.SelectedValue); proMod.ShiPrice = DataConverter.CDouble(ShiPrice.Text); proMod.LinPrice = DataConverter.CDouble(LinPrice.Text); proMod.LinPrice_Json = JsonHelper.AddVal("purse,sicon,point".Split(','), LinPrice_Purse_T.Text, LinPrice_Sicon_T.Text, LinPrice_Point_T.Text); proMod.Preset = (OtherProject.SelectedValue == null) ? "" : OtherProject.SelectedValue; //促销 //proMod.Integral = DataConverter.CLng(Integral.Text); proMod.Propeid = DataConverter.CLng(Propeid.Text); proMod.Recommend = DataConverter.CLng(Recommend_T.Text); proMod.Recommend = proMod.Recommend < 1 ? 0 : proMod.Recommend;//不允许负数 //proMod.Largesspirx = DataConverter.CLng(Largesspirx.Text); proMod.Largess = Largess.Checked?1:0; proMod.AllClickNum = DataConverter.CLng(AllClickNum_T.Text); //更新时间,若没有指定则为当前时间 proMod.UpdateTime = DataConverter.CDate(UpdateTime.Text); proMod.AddTime = DataConverter.CDate(AddTime.Text); proMod.ModeTemplate = ModeTemplate_hid.Value; proMod.FirstNodeID = CCate.FirstNodeID; proMod.bookDay = DataConverter.CLng(BookDay_T.Text); proMod.BookPrice = DataConverter.CDouble(BookPrice_T.Text); proMod.FarePrice = FareTlp_Rad.SelectedValue; proMod.UserType = DataConverter.CLng(Request.Form["UserPrice_Rad"]); proMod.Quota = DataConvert.CLng(Request.Form["Quota_Rad"]); proMod.DownQuota = DataConvert.CLng(Request.Form["DownQuota_Rad"]); switch (proMod.UserType) { case 1: proMod.UserPrice = Price_Member_T.Text.Trim(); break; case 2: proMod.UserPrice = Request.Form["Price_Group_Hid"]; break; } switch (proMod.Quota) { case 0: break; case 2: proMod.Quota_Json = Request.Form["Quota_Group_Hid"]; break; } switch (proMod.DownQuota) { case 0: break; case 2: proMod.DownQuota_Json = Request.Form["DownQuota_Group_Hid"]; break; } int ProjectTypeRad = 0; if (ProjectType2_Rad.Checked) { ProjectTypeRad = 2; } if (ProjectType3_Rad.Checked) { ProjectTypeRad = 3; } if (ProjectType4_Rad.Checked) { ProjectTypeRad = 4; } if (ProjectType5_Rad.Checked) { ProjectTypeRad = 5; } if (ProjectType6_Rad.Checked) { ProjectTypeRad = 6; } if (ProjectType7_Rad.Checked) { ProjectTypeRad = 7; } proMod.ProjectType = ProjectTypeRad; switch (proMod.ProjectType) { #region 促销 case 1: proMod.ProjectPronum = 0; proMod.ProjectMoney = 0; //proMod.IntegralNum = DataConverter.CLng(IntegralNum.Text); proMod.PesentNames = ""; proMod.PesentNameid = 0; break; case 2: proMod.ProjectPronum = DataConverter.CLng(ProjectPronum2.Text); proMod.ProjectMoney = 0; //proMod.IntegralNum = DataConverter.CLng(IntegralNum.Text); proMod.PesentNames = ""; proMod.PesentNameid = 0; break; case 3: proMod.ProjectPronum = DataConverter.CLng(ProjectPronum3.Text); proMod.ProjectMoney = 0; //proMod.IntegralNum = DataConverter.CLng(IntegralNum.Text); proMod.PesentNames = Productsname3.Text; proMod.PesentNameid = DataConverter.CLng(HiddenField3.Value); break; case 4: proMod.ProjectPronum = DataConverter.CLng(ProjectPronum4.Text); proMod.ProjectMoney = 0; //proMod.IntegralNum = DataConverter.CLng(IntegralNum.Text); proMod.PesentNames = ""; proMod.PesentNameid = 0; break; case 5: proMod.ProjectPronum = DataConverter.CLng(ProjectPronum5.Text); proMod.ProjectMoney = 0; //proMod.IntegralNum = DataConverter.CLng(IntegralNum.Text); proMod.PesentNames = Productsname5.Text; proMod.PesentNameid = DataConverter.CLng(HiddenField5.Value); break; case 6: proMod.ProjectPronum = 0; proMod.ProjectMoney = DataConverter.CDouble(ProjectMoney6.Text); //proMod.IntegralNum = DataConverter.CLng(IntegralNum.Text); proMod.PesentNames = Productsname6.Text; proMod.PesentNameid = DataConverter.CLng(HiddenField6.Value); break; case 7: proMod.ProjectPronum = 0; proMod.ProjectMoney = DataConverter.CDouble(ProjectMoney7.Text); //proMod.IntegralNum = DataConverter.CLng(IntegralNum.Text); proMod.PesentNames = Productsname7.Text; proMod.PesentNameid = DataConverter.CLng(HiddenField7.Value); break; #endregion } proMod.TableName = modBll.GetModelById(ModelID).TableName; proMod.Sales = Sales_Chk.Checked ? 1 : 2; proMod.Istrue = istrue_chk.Checked ? 1 : 0; proMod.Ishot = ishot_chk.Checked ? 1 : 0; proMod.Isnew = isnew_chk.Checked ? 1 : 0; proMod.Isbest = isbest_chk.Checked ? 1 : 0; proMod.Allowed = Allowed.Checked ? 1 : 0; proMod.GuessXML = Request.Form["GuessXML"]; proMod.Wholesalesinfo = ChildPro_Hid.Value; proMod.DownCar = DataConvert.CLng(DownCar_T.Text); //捆绑商品 if (!string.IsNullOrEmpty(Bind_Hid.Value)) { //获取绑定商品 DataTable binddt = JsonHelper.JsonToDT(Bind_Hid.Value); proMod.BindIDS = ""; foreach (DataRow dr in binddt.Rows) { proMod.BindIDS += dr["ID"] + ","; } proMod.BindIDS = proMod.BindIDS.TrimEnd(','); } else { proMod.BindIDS = ""; } string danju = proMod.UserShopID + DateTime.Now.ToString("yyyyMMddHHmmss"); if (proMod.ID < 1 || ClickType.Value.Equals("addasnew")) { proMod.Priority = 0; proMod.Nodeid = NodeID; proMod.AddTime = DateTime.Now; proMod.UpdateTime = DateTime.Now; proMod.ID = proBll.Add(table, proMod, CCate); proMod.Stock = DataConverter.CLng(Stock.Text); //多区域价格 SqlParameter[] sp = new SqlParameter[] { new SqlParameter("guid", ProGuid) }; SqlHelper.ExecuteSql("UPDATE ZL_Shop_RegionPrice SET [ProID]=" + proMod.ID + " WHERE [Guid]=@guid", sp); M_Stock stockMod = new M_Stock() { proid = proMod.ID, proname = proMod.Proname, adduser = adminname, StoreID = proMod.UserShopID, }; int proStock = DataConverter.CLng(Stock.Text); if (proStock > 0) { stockMod.proid = proMod.ID; stockMod.stocktype = 0; stockMod.Pronum = proStock; stockMod.danju = "RK" + danju; stockMod.content = "添加商品:" + proMod.Proname + "入库"; stockBll.AddStock(stockMod); } Response.Redirect("ContentShow.aspx?id=" + proMod.ID + "&ModelId=" + proMod.ModelID + "&NodeId=" + proMod.Nodeid); } else { proBll.Update(table, proMod, CCate); //int stock = proStock - DataConverter.CLng(Stock_Hid.Value); //if (stock != 0) //{ // stockMod.stocktype = stock > 0 ? 0 : 1; // stockMod.Pronum = Math.Abs(stock); // stockMod.danju = (stockMod.stocktype > 0 ? "RK" : "CK") + danju; // stockMod.content = stockMod.stocktype > 0 ? "添加商品:" + proMod.Proname + "入库" : "减少商品:" + proMod.Proname + "出库"; // stockBll.AddStock(stockMod); //} Response.Redirect("ContentShow.aspx?id=" + proMod.ID + "&ModelId=" + proMod.ModelID + "&NodeId=" + proMod.Nodeid); } }
protected void Page_Load(object sender, EventArgs e) { if (!B_ARoleAuth.Check(ZLEnum.Auth.other, "SiteConfig")) { function.WriteErrMsg("没有权限进行此项操作"); } m_RegFields = new Dictionary <string, ListItem>(); m_RegFields.Add("Permissions", new ListItem("真实姓名", "Permissions")); m_RegFields.Add("UserSex", new ListItem("性别", "UserSex")); m_RegFields.Add("Birthday", new ListItem("出生日期", "Birthday")); m_RegFields.Add("Address", new ListItem("联系地址", "Address")); m_RegFields.Add("ZipCode", new ListItem("邮政编码", "ZipCode")); m_RegFields.Add("Homepage", new ListItem("个人主页", "Homepage")); m_RegFields.Add("QQ", new ListItem("QQ号码", "QQ")); // m_RegFields.Add("ICQ", new ListItem("ICQ号码", "ICQ")); //m_RegFields.Add("MSN", new ListItem("MSN帐号", "MSN")); //m_RegFields.Add("UC", new ListItem("UC号码", "UC")); //m_RegFields.Add("Yahoo", new ListItem("雅虎通帐号", "Yahoo")); m_RegFields.Add("OfficePhone", new ListItem("办公电话", "OfficePhone")); m_RegFields.Add("HomePhone", new ListItem("家庭电话", "HomePhone")); m_RegFields.Add("Mobile", new ListItem("手机号码", "Mobile")); m_RegFields.Add("Fax", new ListItem("传真号码", "Fax")); //m_RegFields.Add("PHS", new ListItem("小灵通", "PHS")); m_RegFields.Add("IDCard", new ListItem("身份证号码", "IDCard")); m_RegFields.Add("salt", new ListItem("用户头像", "UserFace")); m_RegFields.Add("FaceWidth", new ListItem("头像宽度", "FaceWidth")); m_RegFields.Add("FaceHeight", new ListItem("头像高度", "FaceHeight")); m_RegFields.Add("Sign", new ListItem("签名档", "Sign")); m_RegFields.Add("Privacy", new ListItem("隐私设定", "Privacy")); m_RegFields.Add("Province", new ListItem("省市县", "Province")); //m_RegFields.Add("ParentUserID", new ListItem("推荐人", "ParentUserID")); m_RegFields.Add("ParentUser", new ListItem("推荐人", "ParentUser")); m_RegFields.Add("InvitCode", new ListItem("邀请码", "InvitCode")); //ZL_UserBaseField B_UserBaseField ufll = new B_UserBaseField(); DataTable uftable = ufll.Select_All(); if (uftable != null) { if (uftable.Rows.Count > 0) { for (int c = 0; c < uftable.Rows.Count; c++) { string FieldName = uftable.Rows[c]["FieldName"].ToString(); string FieldAlias = uftable.Rows[c]["FieldAlias"].ToString(); m_RegFields.Add(FieldName, new ListItem(FieldAlias, FieldName)); } } } if (!IsPostBack) { Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + CustomerPageAction.customPath2 + "user/UserManage.aspx'>用户管理</a></li><li>会员参数配置</li>" + Call.GetHelp(40)); RadioButtonList1.Checked = SiteConfig.UserConfig.EnableUserReg; //会员注册默认状态 UserValidateType_Rad.SelectedValue = SiteConfig.UserConfig.UserValidateType ? "0" : "1"; //是否开启注册后Email验证 rdoEmailCheck.Checked = SiteConfig.UserConfig.EmailCheckReg; //是否开启Email注册登录 RadioButtonList2.Checked = SiteConfig.UserConfig.EmailRegis; //是否开启注册成功邮件提醒 radioEmail.Checked = SiteConfig.UserConfig.EmailTell; //是否开启UserID登录 radioUserID.Checked = SiteConfig.UserConfig.UserIDlgn; //是否开启手机注册 radioMobile.Checked = SiteConfig.UserConfig.MobileReg; MobileCodeNum_T.Text = SiteConfig.UserConfig.MobileCodeNum.ToString(); function.Script(this, "SetRadVal('mobilecode_rad'," + SiteConfig.UserConfig.MobileCodeType + ");"); RadioButtonList3.Checked = SiteConfig.UserConfig.AdminCheckReg; RadioButtonList5.Checked = SiteConfig.UserConfig.EnableCheckCodeOfReg; TextBox6.Text = SiteConfig.UserConfig.UserNameLimit.ToString(); TextBox7.Text = SiteConfig.UserConfig.UserNameMax.ToString(); TextBox8.Text = SiteConfig.UserConfig.UserNameRegDisabled; RadioButtonList6.Checked = SiteConfig.UserConfig.EnableCheckCodeOfLogin; RadioButtonList7.Checked = SiteConfig.UserConfig.EnableMultiLogin; //DisCuzNT.Checked = SiteConfig.UserConfig.DisCuzNT; string regFieldsMustFill = SiteConfig.UserConfig.RegFieldsMustFill; string regFieldsSelectFill = SiteConfig.UserConfig.RegFieldsSelectFill; HdnRegFields_MustFill.Value = regFieldsMustFill; HdnRegFields_SelectFill.Value = regFieldsSelectFill; List <string> list = new List <string>(); List <string> list2 = new List <string>(); if (!string.IsNullOrEmpty(regFieldsMustFill)) { foreach (string str3 in regFieldsMustFill.Split(new char[] { ',' })) { list.Add(str3); if (m_RegFields.ContainsKey(str3)) { LitRegFields_MustFill.Items.Add(m_RegFields[str3]); } } } if (!string.IsNullOrEmpty(regFieldsSelectFill)) { foreach (string str4 in regFieldsSelectFill.Split(new char[] { ',' })) { list2.Add(str4); if (m_RegFields.ContainsKey(str4)) { LitRegFields_SelectFill.Items.Add(m_RegFields[str4]); } } } foreach (string str5 in m_RegFields.Keys) { if (!list.Contains(str5) && !list2.Contains(str5)) { LitRegFields.Items.Add(m_RegFields[str5]); } } //TextBox12.Text = SiteConfig.UserConfig.EmailOfRegCheck; //txtEmailTell.Text = SiteConfig.UserConfig.EmailTellContent; txtMobileRegInfo.Text = SiteConfig.UserConfig.MobileRegInfo; tb_CommentRule.Text = SiteConfig.UserConfig.CommentRule.ToString(); tb_InformationRule.Text = SiteConfig.UserConfig.InfoRule.ToString(); tb_RecommandRule.Text = SiteConfig.UserConfig.RecommandRule.ToString(); txtzi.Text = SiteConfig.UserConfig.PresentPointAll.ToString(); TxtPresentExp.Text = SiteConfig.UserConfig.PresentExp.ToString(); TxtPresentMoney.Text = SiteConfig.UserConfig.PresentMoney.ToString(); TxtPresentPoint.Text = SiteConfig.UserConfig.PresentPoint.ToString(); TxtPresentValidNum.Text = SiteConfig.UserConfig.PresentValidNum.ToString(); DropPresentValidUnit.SelectedValue = SiteConfig.UserConfig.PresentValidUnit.ToString(); TxtPresentExpPerLogin.Text = SiteConfig.UserConfig.PresentExpPerLogin.ToString(); SignPurse_T.Text = SiteConfig.UserConfig.SigninPurse.ToString(); TxtMoneyExchangePoint.Text = SiteConfig.UserConfig.MoneyExchangePointByMoney.ToString(); TxtMoneyExchangeValidDay.Text = SiteConfig.UserConfig.MoneyExchangeValidDayByMoney.ToString(); TxtUserExpExchangePoint.Text = SiteConfig.UserConfig.UserExpExchangePointByExp.ToString(); TxtUserExpExchangeValidDay.Text = SiteConfig.UserConfig.UserExpExchangeValidDayByExp.ToString(); TxtCMoneyExchangePoint.Text = SiteConfig.UserConfig.MoneyExchangePointByPoint.ToString(); TxtCMoneyExchangeValidDay.Text = SiteConfig.UserConfig.MoneyExchangeValidDayByValidDay.ToString(); TxtCUserExpExchangePoint.Text = SiteConfig.UserConfig.UserExpExchangePointByPoint.ToString(); TxtCUserExpExchangeValidDay.Text = SiteConfig.UserConfig.UserExpExchangeValidDayByValidDay.ToString(); txtCMoneyExchangeDummyPurse.Text = SiteConfig.UserConfig.MoneyExchangeDummyPurseByDummyPurse.ToString(); txtMoneyExchangeDummyPurse.Text = SiteConfig.UserConfig.MoneyExchangeDummyPurseByMoney.ToString(); TxtPointName.Text = SiteConfig.UserConfig.PointName; TxtPointUnit.Text = SiteConfig.UserConfig.PointUnit; TxtCUserExpExchangePoints.Text = SiteConfig.UserConfig.PointExp.ToString(); TxtCUserExpExchangeMoney.Text = SiteConfig.UserConfig.PointMoney.ToString(); TxtCUserExpExchangeExp.Text = SiteConfig.UserConfig.ChangeSilverCoinByExp.ToString(); TxtCUserExpExchangeSilverCoin.Text = SiteConfig.UserConfig.PointSilverCoin.ToString(); Agreement.SelectedValue = SiteConfig.UserConfig.Agreement; selPunch.Value = SiteConfig.UserConfig.PunchType.ToString(); txtPunch.Text = SiteConfig.UserConfig.PunchVal.ToString(); //txtEmailRegInfo.Text = SiteConfig.UserConfig.EmailRegInfo; //txtGetPassword.Text = SiteConfig.UserConfig.UserGetPasswordEmail; Txtintegral.Text = SiteConfig.UserConfig.Integral.ToString(); TxtIntegralPercentage.Text = SiteConfig.UserConfig.IntegralPercentage.ToString(); #region 用户名注册规则 string userregrule = SiteConfig.UserConfig.RegRule; if (userregrule != null && userregrule != "") { if (userregrule.IndexOf(',') > -1) { string[] rulearr = userregrule.Split(','); for (int ii = 0; ii < rulearr.Length; ii++) { if (rulearr[ii].ToString() == "1") { RegRule.Items[0].Selected = true; } if (rulearr[ii].ToString() == "2") { RegRule.Items[1].Selected = true; } if (rulearr[ii].ToString() == "3") { RegRule.Items[2].Selected = true; } } } else { if (userregrule.ToString() == "1") { RegRule.Items[0].Selected = true; } if (userregrule.ToString() == "2") { RegRule.Items[1].Selected = true; } if (userregrule.ToString() == "3") { RegRule.Items[2].Selected = true; } } } if (SiteConfig.UserConfig.RegRule != null) { RegRule.SelectedValue = SiteConfig.UserConfig.RegRule.ToString(); } #endregion #region 可使用站内短信用户组 B_Group b_Group = new B_Group(); MessageGroup.DataSource = b_Group.GetGroupList(); MessageGroup.DataBind(); string MessageGroupStr = SiteConfig.UserConfig.MessageGroup; if (!string.IsNullOrEmpty(MessageGroupStr)) { if (MessageGroupStr.IndexOf(",") > -1) { foreach (string Mstr in MessageGroupStr.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries)) { if (MessageGroup.Items.FindByValue(Mstr) != null) { MessageGroup.Items.FindByValue(Mstr).Selected = true; } } } } ////用户统计字段 //foreach (ListItem item in m_RegFields.Values) //{ // UserFields_list.Items.Add(item); //} #endregion RadioButtonList10.SelectedValue = SiteConfig.UserConfig.PromotionType.ToString(); RadioButtonList10_SelectedIndexChanged(null, null); //CountFields_Hid.Value = SiteConfig.UserConfig.CountUserField; txtPromotion.Text = SiteConfig.UserConfig.Promotion.ToString(); try { //邀请码配置 InviteCode_T.Text = SiteConfig.UserConfig.InviteCodeCount.ToString(); InviteFormat_T.Text = SiteConfig.UserConfig.InviteFormat; InviteJoinGroup_DP.DataSource = gpBll.Sel(); InviteJoinGroup_DP.DataBind(); InviteJoinGroup_DP.SelectedValue = SiteConfig.UserConfig.InviteJoinGroup.ToString(); } catch (Exception ex) { ZLLog.L(ex.Message); } MyBind(); } }
protected void Page_Load(object sender, EventArgs e) { B_Admin badmin = new B_Admin(); string UserID = base.Request.QueryString["UserID"]; if (!this.Page.IsPostBack) { ShowPlatInfo(Convert.ToInt32(UserID)); #region 绑定地区数据 bind(); if (Request["action"] == "area") { bind1(); Response.Write(""); Response.Flush(); Response.Close(); } if (Request["action"] == "area2") { bind2(); Response.Write(""); Response.Flush(); Response.Close(); } #endregion ViewState["PageUrl"] = customPath2 + "User/Userinfo.aspx?id=" + UserID; ViewState["url"] = "/Manage/User/UserManage.aspx"; if (Request.QueryString["type"] == "x") { ViewState["PageUrl"] = System.Web.HttpContext.Current.Request.UrlReferrer.ToString(); ViewState["url"] = System.Web.HttpContext.Current.Request.UrlReferrer.ToString(); } if (string.IsNullOrEmpty(UserID)) { function.WriteErrMsg("请指定会员ID", ViewState["PageUrl"].ToString()); } M_UserInfo uinfo = bll.SeachByID(DataConverter.CLng(UserID)); if (uinfo.IsNull) { function.WriteErrMsg("指定ID:" + UserID + "的用户不存在!可能已被删除!", ViewState["url"].ToString()); } else { B_Group bgr = new B_Group(); this.DDLGroup.DataSource = bgr.GetGroupList(); this.DDLGroup.DataTextField = "GroupName"; this.DDLGroup.DataValueField = "GroupID"; this.DDLGroup.DataBind(); this.HdnUserID.Value = UserID; this.LblUserName.Text = uinfo.UserName; this.lblUser.Text = uinfo.UserName; this.tbEmail.Text = uinfo.Email; txtPurm.Text = uinfo.DummyPurse.ToString(); this.tbQuestion.Text = uinfo.Question; this.tbAnswer.Text = uinfo.Answer; M_Uinfo binfo = bll.GetUserBaseByuserid(DataConverter.CLng(UserID)); this.tbTrueName.Text = uinfo.TrueName; this.tbUserSex.SelectedValue = binfo.UserSex ? "1" : "0"; this.tbBirthday.Text = binfo.BirthDay; this.tbOfficePhone.Text = binfo.OfficePhone; this.tbHomePhone.Text = binfo.HomePhone; this.tbMobile.Text = binfo.Mobile; this.tbPHS.Text = binfo.PHS; this.tbFax.Text = binfo.Fax; this.tbAddress.Text = binfo.Address; this.tbZipCode.Text = binfo.ZipCode; this.txtHoneyName.Text = uinfo.HoneyName; this.tbIDCard.Text = binfo.IDCard; this.tbQQ.Text = binfo.QQ; this.tbHomepage.Text = binfo.HomePage; this.tbICQ.Text = binfo.ICQ; this.tbMSN.Text = binfo.MSN; this.tbYahoo.Text = binfo.Yahoo; this.tbUC.Text = binfo.UC; this.tbUserFace.Text = uinfo.UserFace; this.tbFaceWidth.Text = binfo.FaceWidth.ToString(); this.tbFaceHeight.Text = binfo.FaceHeight.ToString(); this.tbSign.Text = binfo.Sign; this.tbPrivacy.SelectedValue = binfo.Privating.ToString(); this.DDLGroup.SelectedValue = uinfo.GroupID.ToString(); txtUserCrite.Text = uinfo.UserCreit.ToString(); this.txtMoney.Text = uinfo.Purse.ToString(); this.txtPoint.Text = uinfo.UserExp.ToString(); this.txtSilverCoin.Text = uinfo.SilverCoin.ToString(); this.txtUserPoint.Text = uinfo.UserPoint.ToString(); //点券 this.txtboffExp.Text = uinfo.boffExp.ToString(); //卖家积分 this.txtConsumeExp.Text = uinfo.ConsumeExp.ToString(); //消费积分 this.txtDeadLine.Text = uinfo.DeadLine.ToString(); //有效期截止时间 this.txtCerificateDeadLine.Text = uinfo.CerificateDeadLine.ToString(); this.VIPUser.SelectedValue = binfo.VIPUser.ToString(); Adress_Hid.Value = binfo.Province + "," + binfo.City + "," + binfo.County; this.tbParentUserID.Text = uinfo.ParentUserID.ToString(); this.CompanyNameT.Text = uinfo.CompanyName; this.CompanyDescribeT.Text = uinfo.CompanyDescribe; this.WorkNum_T.Text = uinfo.WorkNum; DataTable dtuser = bll.GetUserBaseByuserid(UserID); lblHtml.Text = bub.GetUpdateHtml(dtuser); //lblHtml.Text = bub.GetHtml();//用这个获取的不会显示图片 } BindUserRole(uinfo); Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='" + customPath2 + "User/UserManage.aspx'>会员管理</a></li><li class='active'>修改会员信息</li>"); } //增加模型选项卡 DataTable dtModelUser = bm.GetListUser(); string labstr = ""; int tabnum = 3; for (int i = 0; i < dtModelUser.Rows.Count; i++) { string tablename = dtModelUser.Rows[i]["TableName"].ToString(); DataTable info = bmf.SelectTableName(tablename, "userid=" + UserID); if (info != null && info.Rows.Count > 0) { int modelid = Convert.ToInt32(dtModelUser.Rows[i]["ModelId"].ToString()); DataTable modelfiled = bmf.GetModelFieldAllList(modelid).Tables[0]; labstr += "<td id=\"TabTitle" + (tabnum) + ("\" class=\"tabtitle\" onclick=\"ShowTabss(" + (tabnum)) + ")\">\r"; labstr += dtModelUser.Rows[i]["ModelName"].ToString() + "\r"; labstr += ("</td>\r"); tabTitles += ", \"TabTitle" + (tabnum) + "\""; tabs += ", \"Tabs" + (tabnum) + "\""; ltlTab.Text += "<tbody id=\"Tabs" + (tabnum) + "\" style=\"display: none\">"; ltlTab.Text += "<tr>"; ltlTab.Text += "<td colspan=\"4\">"; ltlTab.Text += " <table class=\"tblModelFiled\" width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">"; ltlTab.Text += this.bmf.GetUpdateHtmlUser(modelid, 0, info); //for (int k = 0; k < modelfiled.Rows.Count; k++) //{ // if (k % 2 == 0) // { // ltlTab.Text += "<tr class=\"tdbg\" onmouseover=\"this.className='tdbgmouseover'\" onmouseout=\"this.className='tdbg'\">\r"; // } // ltlTab.Text += "<td class=\"tdbgleft\" style=\"width: 15%; height: 22px\" align=\"right\">\r"; // ltlTab.Text += modelfiled.Rows[k]["FieldAlias"].ToString() + "\r"; // ltlTab.Text += "</td>\r"; // ltlTab.Text += "<td style=\"width: 35%; height: 22px\" align=\"left\">\r"; // //ltlTab.Text += "<input type=\"text\" value=\"" + info.Rows[0][modelfiled.Rows[k]["FieldName"].ToString()].ToString() + "\"class=\"l_input\" />" + "\r"; // ltlTab.Text += "</td>\r"; // if (k % 2 != 0) // { // ltlTab.Text += "</tr>\r"; // } //} ltlTab.Text += " </table>"; ltlTab.Text += " </td>"; ltlTab.Text += " </tr>"; ltlTab.Text += "</tbody>"; tabnum++; } } models.Text = labstr.ToString(); }
//保存 protected void EBtnSubmit_Click(object sender, EventArgs e) { M_UserInfo mu = buser.GetLogin(); M_Store_Info storeMod = storeBll.SelModelByUser(mu.UserID); DataTable dt = fieldBll.GetModelFieldList(ModelID); DataTable gpdt = gpBll.GetGroupList(); DataTable table = new Call().GetDTFromPage(dt, Page, ViewState); M_Product proMod = new M_Product(); if (ProID > 0) { proMod = proBll.GetproductByid(ProID); } /*--------------proMod------------*/ proMod.Nodeid = NodeID; proMod.ModelID = ModelID; proMod.ProCode = ProCode.Text; proMod.BarCode = BarCode.Text.Trim(); proMod.Proname = Proname.Text.Trim(); proMod.Kayword = Request.Form["tabinput"]; keyBll.AddKeyWord(proMod.Kayword, 1); proMod.ProUnit = ProUnit.Text; proMod.AllClickNum = DataConverter.CLng(Request.Form["AllClickNum"]); proMod.ProClass = 1; proMod.Proinfo = Proinfo.Text; proMod.Procontent = procontent.Value; if (!string.IsNullOrEmpty(Request.Form["txt_pics"])) { try { DataTable imgdt = JsonConvert.DeserializeObject <DataTable>(Request.Form["txt_pics"]); if (imgdt.Rows.Count > 0) { proMod.Thumbnails = proMod.Clearimg = DataConvert.CStr(imgdt.Rows[0]["url"]); } } catch (Exception) { } } //proMod.Quota = DataConverter.CLng(Quota.Text); //proMod.DownQuota = DataConverter.CLng(DownQuota.Text); proMod.ShiPrice = DataConverter.CDouble(ShiPrice.Text); proMod.LinPrice = DataConverter.CDouble(LinPrice.Text); proMod.Recommend = DataConverter.CLng(Recommend_T.Text); proMod.AllClickNum = DataConverter.CLng(AllClickNum_T.Text); //更新时间,若没有指定则为当前时间 proMod.UpdateTime = DataConverter.CDate(UpdateTime.Text); proMod.AddTime = DataConverter.CDate(AddTime.Text); proMod.FirstNodeID = nodeBll.SelFirstNodeID(NodeID); proMod.UserShopID = storeMod.ID; proMod.UserType = DataConverter.CLng(Request.Form["UserPrice_Rad"]); proMod.Quota = DataConvert.CLng(Request.Form["Quota_Rad"]); proMod.DownQuota = DataConvert.CLng(Request.Form["DownQuota_Rad"]); proMod.TableName = modBll.SelReturnModel(ModelID).TableName; proMod.Sales = Sales_Chk.Checked ? 1 : 2; proMod.Istrue = istrue_chk.Checked ? 1 : 0; proMod.Ishot = ishot_chk.Checked ? 1 : 0; proMod.Isnew = isnew_chk.Checked ? 1 : 0; proMod.Isbest = isbest_chk.Checked ? 1 : 0; proMod.Allowed = 1; proMod.GuessXML = Request.Form["GuessXML"]; proMod.BindIDS = ""; string danju = proMod.UserShopID + DateTime.Now.ToString("yyyyMMddHHmmss"); if (proMod.ID < 1 || ClickType.Value.Equals("addasnew")) { proMod.AddUser = mu.UserName; proMod.Nodeid = NodeID; proMod.AddTime = DateTime.Now; proMod.UpdateTime = DateTime.Now; proMod.ID = proBll.Add(table, proMod); } else { proBll.Update(table, proMod); } Response.Redirect("ProductShow.aspx?ID=" + proMod.ID); }
protected void Page_Load(object sender, EventArgs e) { ZoomLa.Common.function.AccessRulo(); B_Admin badmin = new B_Admin(); if (!this.Page.IsPostBack) { this.Isuse.SelectedValue = UserModuleConfig.JobsConfig.IsUsed ? "1" : "0"; DataTable glist = gll.GetGroupList(); userlist.DataSource = glist; userlist.DataValueField = "GroupID"; userlist.DataTextField = "GroupName"; userlist.DataBind(); comlist.DataSource = glist; comlist.DataValueField = "GroupID"; comlist.DataTextField = "GroupName"; comlist.DataBind(); userlist.Items.Insert(0, new ListItem("请选择", "0")); comlist.Items.Insert(0, new ListItem("请选择", "0")); userlist.SelectedValue = UserModuleConfig.JobsConfig.PersonGroup.ToString(); comlist.SelectedValue = UserModuleConfig.JobsConfig.CompanyGroup.ToString(); Resume.DataSource = mdll.GetListUser(); Resume.DataTextField = "ModelName"; Resume.DataValueField = "ModelID"; Resume.DataBind(); Resume.Items.Insert(0, new ListItem("请选择用户简历模型", "0")); Company.DataSource = mdll.GetListUser(); Company.DataTextField = "ModelName"; Company.DataValueField = "ModelID"; Company.DataBind(); Company.Items.Insert(0, new ListItem("请选择企业信息模型", "0")); CompanyJobs.DataSource = mdll.GetListUser(); CompanyJobs.DataTextField = "ModelName"; CompanyJobs.DataValueField = "ModelID"; CompanyJobs.DataBind(); CompanyJobs.Items.Insert(0, new ListItem("请选择招聘信息模型", "0")); Resume.SelectedValue = UserModuleConfig.JobsConfig.Resume.ToString(); Company.SelectedValue = UserModuleConfig.JobsConfig.Company.ToString(); BindDrop(UserModuleConfig.JobsConfig.Company, 0); if (UserModuleConfig.JobsConfig.CompanyField > 0) { CompanyField.SelectedValue = UserModuleConfig.JobsConfig.CompanyField.ToString(); } CompanyJobs.SelectedValue = UserModuleConfig.JobsConfig.CompanyJobs.ToString(); BindDrop(UserModuleConfig.JobsConfig.CompanyJobs, 1); if (UserModuleConfig.JobsConfig.JobsField > 0) { JobsField.SelectedValue = UserModuleConfig.JobsConfig.JobsField.ToString(); } TxtConsumePoint.Text = UserModuleConfig.JobsConfig.ConsumePoint.ToString(); ConsumeType.SelectedValue = UserModuleConfig.JobsConfig.ConsumeType.ToString(); } Call.SetBreadCrumb(Master, "<li><a href='" + CustomerPageAction.customPath2 + "Main.aspx'>工作台</a></li><li><a href='UserManage.aspx'>用户管理</a></li><li><a href='Jobsconfig.aspx'>人才招聘</a></li><li>人才模版配置</li>"); }