protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { B_Admin badmin = new B_Admin(); badmin.CheckMulitLogin(); if (!badmin.ChkPermissions("UserGroup")) { function.WriteErrMsg("没有权限进行此项操作"); } string id = base.Request.QueryString["id"]; if (!string.IsNullOrEmpty(id)) { this.HdnGroupID.Value = id; } else { this.HdnGroupID.Value = "0"; id = "0"; } if (id != "0") { M_Group info = this.bll.GetByID(DataConverter.CLng(id)); this.TxtGroupName.Text = info.GroupName; this.TxtDescription.Text = info.Description; this.RBLReg.SelectedValue = DataConverter.CLng(info.RegSelect).ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { B_User.CheckIsLogged(Request.RawUrl); if (!IsPostBack) { mu = buser.GetLogin(); groupMod = groupBll.SelReturnModel(mu.GroupID); M_Uinfo basemu = buser.GetUserBaseByuserid(mu.UserID); if (basemu != null) { Mobile_T.Text = basemu.Mobile; Email_T.Text = mu.Email; CompName_T.Text = mu.CompanyName; QQ_T.Text = basemu.QQ; } M_User_Plat upMod = upBll.SelReturnModel(mu.UserID); if (upMod != null) { ShowRemind("你已开通能力中心,不需要再申请"); Response.Redirect("/Class_79/NodePage.aspx"); } else if (alyBll.IsExist("plat_applyopen", mu.UserID)) { ShowRemind("你提交的审请正在审核中..."); } } }
protected void Page_Init(object sender, EventArgs e) { if (buser.CheckLogin()) { mu = buser.GetLogin(); if (mu == null || mu.IsNull || mu.UserID < 1) { Response.Redirect("/User/Login"); } else if (mu.Status != 0) { function.WriteErrMsg("你的帐户未通过验证或被锁定,请与网站管理员联系", "/User/Login"); } uname = string.IsNullOrEmpty(mu.TrueName) ? mu.UserName : mu.TrueName; groupMod = groupBll.SelReturnModel(mu.GroupID); gname = groupMod.GroupName; uface = mu.UserFace; Purse = mu.Purse.ToString("f2"); Score = mu.UserExp.ToString("f2"); } else { B_User.CheckIsLogged(Request.RawUrl); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { M_Group Ginfo = Gll.GetByID(Mid); this.GroupName.Text = Ginfo.GroupName; this.GroupInfo.Text = Ginfo.Description.ToString(); DataTable umodelDT = Mll.GetListUser(); GroupModel.DataSource = umodelDT; GroupModel.DataTextField = "ModelName"; GroupModel.DataValueField = "ModelID"; GroupModel.DataBind(); GroupModel.Items.Insert(0, new ListItem("不绑定模型", "0")); if (GroupModel.Items.Count > 0) { for (int i = 0; i < GroupModel.Items.Count; i++) { if (Gll.IsExistModel(Ginfo.GroupID, DataConverter.CLng(GroupModel.Items[i].Value))) { GroupModel.Items[i].Selected = true; } else { GroupModel.Items[i].Selected = false; } } } } Call.SetBreadCrumb(Master, "<li>后台管理</li><li><a href='GroupManage.aspx'>会员组管理</a></li><li>会员组设置</li>"); }
//申请加入班级 public void Class_Apply() { M_Group groupMod = groupBll.GetByID(mu.GroupID); int roomid = Convert.ToInt32(Request["roomid_hid"]); DataTable dt = ClassBll.SelByUid(mu.UserID, -1, roomid); if (dt.Rows.Count > 0) { function.WriteErrMsg("你已经申请过班级了!"); return; } M_Student stuMod = new M_Student(); stuMod.Addtime = DateTime.Now; stuMod.UserID = mu.UserID; stuMod.UserName = mu.UserName; stuMod.StudentType = 1; if (groupMod.Enroll.Contains("isteach")) { stuMod.StudentType = 2; } if (groupMod.Enroll.Contains("isfamily")) { stuMod.StudentType = 3; } stuMod.AuditingContext = Request["remind_t"]; stuMod.RoomID = roomid; stuBll.insert(stuMod); function.WriteSuccessMsg("申请班级成功!", "/User/Exam/ClassManage"); return; }
bool ID_Group.Update(M_Group info) { string strSql = "PR_Group_Update"; SqlParameter[] cmdParams = GetParameters(info); return(SqlHelper.ExecuteProc(strSql, cmdParams)); }
public int GetInsert(M_Group model) { if (model.OrderID == 0) { model.OrderID = Order_GetMax(model.ParentGroupID); } return(DBCenter.Insert(model)); }
/// <summary> /// 从DataReader中读取模型记录 /// </summary> /// <param name="rdr">DataReader</param> /// <returns>M_ModelInfo 模型信息</returns> private static M_Group GetInfoFromReader(SqlDataReader rdr) { M_Group info = new M_Group(); info.GroupID = DataConverter.CLng(rdr["GroupID"].ToString()); info.GroupName = rdr["GroupName"].ToString(); info.Description = rdr["Description"].ToString(); info.RegSelect = DataConverter.CBool(rdr["RegSelect"].ToString()); return(info); }
//public void DownFile(string url) //{ // SafeSC.DownFile(url); //} //用户可自由变换所属会员组,仅VIP组可访问该页面(前端判断) public IActionResult ChangeGroup() { M_Group gpMod = gpBll.SelReturnModel(mu.GroupID); M_Temp tpMod = tpBll.SelModelByUid(mu.UserID, 13); if (gpMod.VIPGroup != 1 && tpMod == null) { return(WriteErr("你所在的会员组无权使用该功能页")); } ViewBag.gpMod = gpMod; ViewBag.gpdt = gpBll.Sel(); return(View()); }
/// <summary> /// 将模型信息的各属性值传递到参数中 /// </summary> /// <param name="Info"></param> /// <returns></returns> private static SqlParameter[] GetParameters(M_Group Info) { SqlParameter[] parameter = new SqlParameter[] { new SqlParameter("@GroupID", SqlDbType.Int, 4), new SqlParameter("@GroupName", SqlDbType.NVarChar, 50), new SqlParameter("@Description", SqlDbType.NVarChar, 255), new SqlParameter("@RegSelect", SqlDbType.Bit, 1) }; parameter[0].Value = Info.GroupID; parameter[1].Value = Info.GroupName; parameter[2].Value = Info.Description; parameter[3].Value = Info.RegSelect; return(parameter); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (!B_ARoleAuth.Check(ZLEnum.Auth.user, "UserGroup")) { function.WriteErrMsg(Resources.L.没有权限进行此项操作); } ParentID = DataConverter.CLng(Request.QueryString["ParentID"]); if (Mid > 0) { M_Group info = this.bll.GetByID(Mid); this.ParentID = info.ParentGroupID; this.TxtGroupName.Text = info.GroupName; this.TxtDescription.Text = info.Description; this.RBLReg.Checked = info.RegSelect; this.UpGradeMoney.Text = info.UpGradeMoney.ToString(); this.UpSIcon_T.Text = info.UpSIcon.ToString(); this.UpPoint_T.Text = info.UpPoint.ToString(); this.RBcompanyG.Checked = info.CompanyGroup == 1 ? true : false; this.RBVipG.Checked = info.VIPGroup == 1 ? true : false; this.txtVIPNum.Text = info.VIPNum.ToString(); this.OtherName.Text = info.OtherName; this.txtRebateRate.Text = info.RebateRate.ToString(); this.txtCreit.Text = info.Credit.ToString(); this.txt_Enroll.Checked = info.Enroll.Contains("isenroll") ? true : false; foreach (ListItem item in ClassEnroll_Radio.Items) { if (!string.IsNullOrEmpty(item.Value) && info.Enroll.Contains(item.Value)) { item.Selected = true; break; } } } if (ParentID > 0) { M_Group info = this.bll.GetByID(ParentID); Label1.Text = info.GroupName; } else { Label1.Text = Resources.L.系统会员组; } Call.SetBreadCrumb(Master, "<li>" + Resources.L.后台管理 + "</li><li>" + Resources.L.会员管理 + "</li><li><a href=\"GroupManage.aspx\">" + Resources.L.会员组管理 + "</a></li>"); } }
/// <summary> /// 签章(创建事务模板时使用,发送公文时处理) /// </summary> public string GetHolder(M_Mis_Model oaTemp, string value) { string r = ""; for (int i = 0; i < TempHolder.Length; i++) { string action = TempHolder[i]; switch (action) //替换占位符 { case "{$SignImg}": //调用部门签章信息 //string img="<img src='{0}'></img>"; groupMod = groupBll.GetByID(Convert.ToInt32(value)); r = oaTemp.ModelContent.Replace(TempHolder[0], groupMod.SignImg); break; } } return(r); }
protected void EBtnSubmit_Click(object sender, EventArgs e) { M_Group info = new M_Group(); if (Mid > 0) { info = bll.SelReturnModel(Mid); } info.GroupName = this.TxtGroupName.Text.Trim(); info.Description = this.TxtDescription.Text.Trim(); info.RegSelect = RBLReg.Checked; info.UpGradeMoney = DataConverter.CDouble(UpGradeMoney.Text); info.UpSIcon = DataConverter.CDouble(UpSIcon_T.Text); info.UpPoint = DataConverter.CDouble(UpPoint_T.Text); info.OtherName = this.OtherName.Text; info.CompanyGroup = RBcompanyG.Checked ? 1 : 0; info.RebateRate = DataConverter.CFloat(this.txtRebateRate.Text.Trim()); info.Credit = DataConverter.CLng(txtCreit.Text); info.Enroll = ""; if (txt_Enroll.Checked) { info.Enroll = "isenroll"; } if (!string.IsNullOrEmpty(ClassEnroll_Radio.SelectedValue)) { info.Enroll += "," + ClassEnroll_Radio.SelectedValue; } info.Enroll = info.Enroll.Trim(','); info.VIPGroup = RBVipG.Checked ? 1 : 0; info.VIPNum = Convert.ToInt32(this.txtVIPNum.Text.ToString()); if (info.GroupID > 0) { bll.Update(info); } else { info.ParentGroupID = ParentID; info.IsDefault = (!bll.HasGroup()); bll.Add(info); } function.WriteSuccessMsg("操作成功", "GroupManage.aspx"); }
protected void EBtnSubmit_Click(object sender, EventArgs e) { if (this.Page.IsValid) { M_Group info = new M_Group(); info.GroupID = DataConverter.CLng(this.HdnGroupID.Value); info.GroupName = this.TxtGroupName.Text.Trim(); info.Description = this.TxtDescription.Text.Trim(); info.RegSelect = DataConverter.CBool(this.RBLReg.SelectedValue); if (info.GroupID == 0) { this.bll.Add(info); } else { this.bll.Update(info); } Response.Redirect("GroupManage.aspx"); } }
public IActionResult Group_Change() { M_Temp tpMod = tpBll.SelModelByUid(mu.UserID, 13); M_Group gpMod = gpBll.SelReturnModel(mu.GroupID); string action = RequestEx["action_hid"]; if (gpMod.VIPGroup != 1 && tpMod == null) { return(WriteErr("你所在的会员组无权使用该功能页", "ChangeGroup")); } switch (action) { case "change": int gid = Convert.ToInt32(RequestEx["Group_DP"]); if (tpMod == null) { tpMod = new M_Temp(); tpMod.UserID = mu.UserID; tpMod.Str1 = mu.GroupID.ToString(); tpMod.UseType = 13; tpBll.Insert(tpMod); } buser.UpdateGroupId(mu.UserID.ToString(), gid); return(WriteOK("切换会员组成功", "ChangeGroup")); case "recover": if (tpMod == null) { return(WriteErr("未找到切换前的会员组记录")); } buser.UpdateGroupId(mu.UserID.ToString(), Convert.ToInt32(tpMod.Str1)); tpBll.Del(tpMod.ID); return(WriteOK("恢复会员组成功", "ChangeGroup")); default: return(WriteErr("未指定操作")); } }
public void Group_Change() { M_Temp tpMod = tpBll.SelModelByUid(mu.UserID, 13); M_Group gpMod = gpBll.SelReturnModel(mu.GroupID); string action = Request.Form["action_hid"]; if (gpMod.VIPGroup != 1 && tpMod == null) { function.WriteErrMsg("你所在的会员组无权使用该功能页", "ChangeGroup"); return; } switch (action) { case "change": int gid = Convert.ToInt32(Request.Form["Group_DP"]); if (tpMod == null) { tpMod = new M_Temp(); tpMod.UserID = mu.UserID; tpMod.Str1 = mu.GroupID.ToString(); tpMod.UseType = 13; tpBll.Insert(tpMod); } buser.UpdateGroupId(mu.UserID.ToString(), gid); function.WriteSuccessMsg("切换会员组成功", "ChangeGroup"); break; case "recover": if (tpMod == null) { function.WriteErrMsg("未找到切换前的会员组记录"); return; } buser.UpdateGroupId(mu.UserID.ToString(), Convert.ToInt32(tpMod.Str1)); tpBll.Del(tpMod.ID); function.WriteSuccessMsg("恢复会员组成功", "ChangeGroup"); break; } }
public bool Update(M_Group info) { return(dal.Update(info)); }
public bool Add(M_Group model) { return(GetInsert(model) > 0); }
//--------------------------SELECT END; public bool Update(M_Group model) { return(DBCenter.UpdateByID(model, model.GroupID)); }
public bool Add(M_Group info) { return(dal.Add(info)); }