public ActionResult AddRelation(ht_comm_relation relation) { AuthenticationUser loginInfo = BLLUser.GetLoginUserInfo(); if (loginInfo == null) { apiResp.msg = "请先登录"; apiResp.code = (int)HT.Model.Enum.APIErrCode.UserIsNotLogin; return(Json(apiResp)); } if (BLLRelation.IsExistRelation(relation.main_id, loginInfo.id.ToString(), "praise")) { apiResp.msg = "重复关注"; apiResp.code = (int)HT.Model.Enum.APIErrCode.UserIsNotLogin; return(Json(apiResp)); } ht_comm_relation model = new ht_comm_relation(); model.add_time = DateTime.Now; model.relation_type = "praise"; model.main_id = relation.main_id; model.relation_id = loginInfo.id.ToString(); if (BLLNews.AddPraise(int.Parse(relation.main_id), model) > 0) { apiResp.status = true; apiResp.msg = "点赞成功"; } else { apiResp.msg = "点赞出错"; apiResp.code = (int)HT.Model.Enum.APIErrCode.OperateFail; } return(Json(apiResp)); }
private ReturnValue SendSystemNoticeToPersonals(SystemNotice systemNotice, string personals) { BLLJIMP.BLLUser bllUser = new BLLUser(""); BLLJIMP.BLLWeixin bllWeixin = new BLLWeixin(""); BLLWeixin.TMTaskNotification notificaiton = new BLLWeixin.TMTaskNotification(); notificaiton.Url = string.Format("http://{0}/WuBuHui/MyCenter/SystemMessageBox.aspx", System.Web.HttpContext.Current.Request.Url.Host); var accessToken = bllWeixin.GetAccessToken(); string[] userArray = personals.Split(','); int successCount = 0; foreach (string userId in userArray) { successCount += SendSystemNoticeToUserId(systemNotice, userId) ? 1 : 0; try { notificaiton.First = "您好,您有新系统消息"; notificaiton.Keyword1 = systemNotice.Title; notificaiton.Keyword2 = systemNotice.NoticeTypeString; notificaiton.Remark = "点击查看"; bllWeixin.SendTemplateMessage(accessToken, bllUser.GetUserInfo(userId).WXOpenId, notificaiton); } catch (Exception) { continue; } } return(new ReturnValue { Code = 0, Msg = string.Format("成功将消息发送到{0}个人.", successCount) }); }
/// <summary> /// 微信支付 /// </summary> /// <param name="id">订单号</param> /// <returns></returns> public ActionResult Pay(string id) { var order = BLLNews.GetNewsDetailsByOrderNo(id); ViewBag.OrderNo = id; if (Request.IsAjaxRequest()) { if (order == null || order.pay_status == 1) { return(JsonResult(Model.Enum.APIErrCode.OperateFail, "订单无效或已经支付")); } string Ip = Request.UserHostAddress; string openId = BLLUser.GetLoginUserInfo().openid; string notiUrl = Request.Url.Scheme + "://" + Request.Url.Authority + "/WX/PayNotify";//通知地址 bool isRequestSuccess = false; var payRequest = BLLWeixin.WXPay(order.order_no, order.total.Value, openId, Ip, notiUrl, out isRequestSuccess); if (isRequestSuccess) { return(JsonResult(Model.Enum.APIErrCode.Success, "OK", payRequest)); } else { return(JsonResult(Model.Enum.APIErrCode.OperateFail)); } } else { return(View()); } }
private void GetirCategories() { DataTable data = BLLUser.SelectCategories(); RepeaterUsers.DataSource = data; RepeaterUsers.DataBind(); }
protected void gd_UnitAPeople_RowClick(object sender, GridRowClickEventArgs e) { string person = gd_UnitAPeople.Rows[e.RowIndex].Values[0].ToString(); BLHelper.BLLUser user = new BLLUser(); string username = user.FindByLoginName(Session["LoginName"].ToString()).UserName; if (Convert.ToInt32(Session["SecrecyLevel"]) != 5 && person != username) { string str = "您没有对此行操作的权限!此行为" + person + "录入,请与管理员联系!"; Alert.ShowInTop(str); CBoxSelect.SetCheckedState(e.RowIndex, false); } if (pm.GridCount(gd_UnitAPeople, CBoxSelect).Count == 0) { btn_Delete.Enabled = false; return; } else { btn_Delete.Enabled = true; return; } }
/// <summary> /// 微信支付 /// </summary> /// <param name="id">订单号</param> /// <returns></returns> public ActionResult SetTopPay(int id, int set_top, decimal money) { string msg = ""; string orderNo = ""; string type = set_top == 1 ? "分类置顶" : "全站置顶"; var authenticationUser = BLLAuthentication.GetAuthenticationUser(); bool result = BLLNewsOrder.Add(new ht_news_order() { news_id = id, type = type, value = set_top.ToString(), money = money, pay = "微信", add_userid = authenticationUser.id }, out msg, out orderNo); if (!result) { return(JsonResult(Model.Enum.APIErrCode.OperateFail, msg)); } string Ip = Request.UserHostAddress; string openId = BLLUser.GetLoginUserInfo().openid; string notiUrl = Request.Url.Scheme + "://" + Request.Url.Authority + "/WX/PayNotify";//通知地址 bool isRequestSuccess = false; var payRequest = BLLWeixin.WXPay(orderNo, money, openId, Ip, notiUrl, out isRequestSuccess, string.Format("{1}订单号:{0}", orderNo, type)); if (isRequestSuccess) { return(JsonResult(Model.Enum.APIErrCode.Success, "OK", payRequest)); } else { return(JsonResult(Model.Enum.APIErrCode.OperateFail)); } }
private void GetirVerifications() { DataTable data = BLLUser.SelectVerifications(); RepeaterUsers.DataSource = data; RepeaterUsers.DataBind(); }
private void GetirUser() { DataTable data = BLLUser.SelectData(); RepeaterUsers.DataSource = data; RepeaterUsers.DataBind(); }
public void SendNotice(NoticeType noticeType, UserInfo user, JuActivityInfo juActivity, string receivers, string content) { BLLUser bllUser = new BLLUser(); List <UserInfo> users = bllUser.GetUsers("UserID,WXNickname,TrueName", receivers); SendNotice(noticeType, user, juActivity, users, content); }
protected void Page_Load(object sender, EventArgs e) { var userid = string.Format("WXUser_yike_{0}", Guid.NewGuid().ToString()); this.userBll = new BLLUser(""); if (!IsPostBack) { //检查是不是手机登录,如果是手机登录则直接跳转到手机中心页面 if (Request.Browser.Platform == null ? false : Request.Browser.Platform.ToLower().StartsWith("win")) { this.TimerCheck.Enabled = true; } else { this.TimerCheck.Enabled = true; //this.TimerCheck.Enabled = false; //手机进入 //Response.Redirect("/App/Cation/Wap/UserHub.aspx"); // return; } //电脑登录-创建登录凭据-监测登录凭据使用情况 CreateCreateQRcodeLoginTiket(); } }
private void GetirAddress() { DataTable data = BLLUser.SelectUserAddress(); RepeaterUsers.DataSource = data; RepeaterUsers.DataBind(); }
public bool CheckQuestionnaireSet(QuestionnaireSet nSet, out string msg) { msg = ""; if (nSet == null) { msg = "未找到答题设置"; return(false); } if (nSet.StartDate > DateTime.Now) { msg = "答题还未开始"; return(false); } if (nSet.EndDate < DateTime.Now) { msg = "答题已结束"; return(false); } if (nSet.ScoreNum > 0 && nSet.Score > 0) { BLLUser bllUser = new BLLUser(); int UserScoreNum = bllUser.GetUserScoreNum(GetCurrUserID(), "QuestionnaireSet", false, nSet.AutoID.ToString()); if (UserScoreNum >= nSet.ScoreNum) { msg = "您的答题次数已满"; return(false); } } return(true); }
public static bool checkUser(HttpContext context, bool checkPayPwd = false, UserInfo curUser = null) { BLLUser bllUser = new BLLUser(); if (curUser == null) { curUser = bllUser.GetCurrentUserInfo(); } if (curUser == null) { context.Response.Redirect("/app/wap/LoginBinding.aspx", true); return(false); } if (curUser.MemberLevel <= 0) { context.Response.Redirect("/app/wap/ApplyMember.aspx", true); return(false); } if (string.IsNullOrWhiteSpace(curUser.PayPassword)) { context.Response.Redirect("/app/wap/SetPayPwd.aspx", true); return(false); } return(true); }
public void FatherMainMethod() { Print.WriteLine(@"初始化一个BLL实例 BLLUser 输出其Json格式数据"); bllUser = new BLLUser(); string jsonBLL = JsonHelper.SerializeObject(bllUser); //Print.WriteLine(jsonBLL); }
/// <summary> /// 根据本地订单映射出驿氪订单 /// </summary> /// <param name="orderSrc"></param> /// <returns></returns> public Entity.OrderInfo GeiMappingOrderInfo(ZentCloud.BLLJIMP.Model.WXMallOrderInfo orderSrc) { BLLMall bllMall = new BLLMall(); Entity.OrderInfo order = new Entity.OrderInfo(); order.ShopCode = CurrEfastShopId.ToString(); order.Code = orderSrc.OrderID; order.OrderTime = orderSrc.InsertDate.ToString(); order.TotalQty = orderSrc.ProductCount; order.TotalMoney = 0;// (double)orderSrc.TotalAmount; order.IsPayed = orderSrc.PaymentStatus == 1; order.PayAmount = (double)orderSrc.TotalAmount; var userInfo = new BLLUser().GetUserInfo(orderSrc.OrderUserID); order.BuyerCode = userInfo.Ex2; order.OrderStatus = GetOrderStatusCode(orderSrc.Status); order.StatusTime = DateTime.Now.ToString(); order.SellerId = orderSrc.SellerId; order.DataOrigin = 1; order.PayTime = DateTime.Now.ToString(); order.ExpressFee = (double)orderSrc.Transport_Fee; order.RecvAddress = orderSrc.Address; order.RecvCity = orderSrc.ReceiverCity; order.RecvConsignee = orderSrc.Consignee; order.RecvCounty = orderSrc.ReceiverDist; order.RecvMobile = orderSrc.Phone; order.RecvProvince = orderSrc.ReceiverProvince; List <ZentCloud.BLLJIMP.Model.WXMallOrderDetailsInfo> detailList = bllMall.GetOrderDetailsList(orderSrc.OrderID); List <Entity.OrderDetail> dtls = new List <Entity.OrderDetail>(); int saleProdQty = 0; foreach (var item in detailList) { Entity.OrderDetail dtl = new Entity.OrderDetail(); saleProdQty++; dtl.BarCode = bllMall.GetEfastBarcode(item.SkuId.Value); dtl.PriceOriginal = (double)item.OrderPrice; dtl.PriceSell = (double)item.OrderPrice; dtl.Quantity = item.TotalCount; dtl.Amount = dtl.PriceSell * dtl.Quantity; dtl.IsGift = false; order.TotalMoney += dtl.Amount; dtls.Add(dtl); } order.Dtls = dtls; return(order); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.Expires = 0; string result = "false"; try { userBll = new BLLUser(""); weixinBll = new BLLWeixin(""); this.juActivityBll = new BLLJuActivity(""); this.systemSet = this.juActivityBll.GetSysSet(); string Action = context.Request["Action"]; switch (Action) { case "QueryJuActivityForWapCommon": //活动查询 result = QueryJuActivityForWapCommon(context); break; case "QueryActivityListForSpreadRank": //活动排名列表 result = QueryActivityListForSpreadRank(context); break; case "QueryJuActivityForWap": result = QueryJuActivityForWap(context); break; case "AddJuActivityPraise": //增加赞 result = AddJuActivityPraise(context); break; //case "QueryJuMaster"://查询专家库 // result = QueryJuMaster(context); // break; //case "QueryJuMasterFeedBack"://查询专家库留言//所有人可见 // result = QueryJuMasterFeedBack(context); // break; //case "AddJuMasterUserLinkerInfo"://提交联系信息 // result = AddJuMasterUserLinkerInfo(context); // break; //case "AddJuMasterFeedBack"://提交留言 // result = AddJuMasterFeedBack(context); // break; case "QueryJuActivitySpreadRank": //提交留言 result = QueryJuActivitySpreadRank(context); break; } } catch (Exception ex) { result = ex.Message; } context.Response.Write(result); }
public bool CheckLoginPassword(BLLUser blluser) { var user = _context.Users.Where(user => user.Email == blluser.Email && user.Password == blluser.Password).FirstOrDefault(); if (user != null) { return(true); } return(false); }
/// <summary> /// 更新用户在线时长 /// </summary> /// <param name="id"></param> /// <returns></returns> public bool UpdateUserOnlineTimes(int id) { StringBuilder sbHtml = new StringBuilder(); sbHtml.AppendFormat(" SELECT SUM([Minutes]) FROM [ZCJ_SocketLog] WHERE [UserAutoID]={0}", id); DataSet ds = BLLUser.Query(sbHtml.ToString()); int onlineTimes = Convert.ToInt32(ds.Tables[0].Rows[0][0]); return(Update(new UserInfo(), string.Format("OnlineTimes={0}", onlineTimes), string.Format("AutoID={0}", id)) > 0); }
protected void Page_Load(object sender, EventArgs e) { if (!MemberCenter.checkUser(this.Context)) { return; } BLLUser bllUser = new BLLUser(); website = bllUser.GetColByKey <WebsiteInfo>("WebsiteOwner", bllUser.WebsiteOwner, "WebsiteOwner,TotalAmountShowName"); }
protected void ADD_NormalUser(object sender, EventArgs e) { //password ve email ,ayrıca yeni bir user_login tablosu olusturalarak oraya atılacak. LabelWarning.Text = BLLUser.Insert(new EUser { name = TextBoxUserName.Text, surname = TextBoxUserSurname.Text, ssn = TextBoxUserSSN.Text, birthdate = Convert.ToString(TextBoxUserBirthDate.Text), phone = TextBoxUserPhone.Text, email = TextBoxEmail.Text }); LabelWarning.Text = BLLUser.Login(new UserLogin { email = TextBoxEmail.Text, password = TextBoxPassword.Text }); }
protected void getImages(object sender, EventArgs e) { DataTable dt = BLLUser.GetImage(); if (dt.Rows.Count > 0) { gvImages.DataSource = dt; gvImages.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(this.Request["moduleName"])) { moduleName = this.Request["moduleName"]; } BLLUser bllUser = new BLLUser(); curUser = bllUser.GetCurrentUserInfo(); }
protected void userRegisterBtn_Click(object sender, EventArgs e) { EntityUser user = new EntityUser(); user.FirstName = firstNameTxtbx.Text; user.LastName = lastNameTxtbx.Text; user.Username = usernameTxtbx.Text; user.Email = emailTxtbx.Text; user.Password = passwordTxtbx.Text; BLLUser.AddUserBLL(user); }
public ActionResult ActiveChange(int id) { using (var bllUser = new BLLUser()) { var q = bllUser.GetByID(id); q.ACTIVE = (!q.ACTIVE); bllUser.Update(q); } return(RedirectToAction("Index")); }
/// <summary> /// 获取用户是否关注 /// </summary> /// <returns></returns> public ActionResult GetUserIsSubscribe() { var authenticationUser = BLLAuthentication.GetAuthenticationUser(); var user = BLLUser.GetUserById(authenticationUser.id); if (user == null) { return(JsonResult(APIErrCode.Success, "获取成功", 0)); } return(JsonResult(APIErrCode.Success, "获取成功", user.issubscribe)); }
public UserController() { bllcompany = new BLLCompany(); blldepartment = new BLLDepartment(); bllVIP = new BLLVIP(); bllAvailable = new BLLAvailableTiming(); bllDateTime = new BLLDateTime(); bllUser = new BLLUser(); bllAppointment = new BLLAppointmentDetails(); string id = System.Web.HttpContext.Current.User.Identity.GetUserName(); emailId = id; }
public static User ToUser(this BLLUser user) { return(new User { Id = user.Id, Email = user.Email, UserName = user.UserName, Password = user.Password, CreationDate = user.CreationDate, RoleId = user.RoleId }); }
public ActionResult Delete(int id) { using (var bllUser = new BLLUser()) { var q = bllUser.GetByID(id); if (q.TBL_USER_PERMISSION.All(a => a.USERGROUP_ID != (int)Enum_UserGroups.Administrator)) { bllUser.Delete(id); } } return(RedirectToAction("Index")); }
public ActionResult Index(LoginModel form) { ReturnObject ro; if (ModelState.IsValid) { if (Request.IsAjaxRequest()) { // Kullanıcı kontrolü var LoginUser = new BLLUser().Control(form.USERNAME, form.PASSWORD.ToMD5()); if (LoginUser != null) { // Kullanıcı aktif/pasif kontrolü if (LoginUser.ACTIVE) { // Oturumu aç. Session["USER"] = LoginUser.ID; var returnUrl = form.GO_BACK ?? Url.Action("Index", "CP"); ro = new ReturnObject { Code = 0, Url = returnUrl }; } else { // Kullanıcı kayıtlı ama sistme girişi engellenmiş. ro = new ReturnObject { Code = 1, Message = "Yönetici tarafından sisteme girişiniz engellenmiştir." }; } return(Json(new { ro })); } ro = new ReturnObject { Code = 1, Message = "Sistemde bu bilgilere ait bir kullanıcı bulunamadı." }; return(Json(new { ro })); } return(null); } ro = new ReturnObject { Code = 1, Message = "Model valid değil." }; return(Json(new { ro })); }
public async Task <ResponseGetUsers> GetByID() { ResponseGetUsers response; response = await Task.FromResult(BLLUser.GetAll()).Result; if (response == null) { // need to transport the exception response = new ResponseGetUsers(false, "error", response.Result); } return(response); }
protected void btnSearch_Click(object sender, EventArgs e) { BLLUser bll = new BLLUser(); DataTable dt = null; switch (ddlType.SelectedValue) { case "0": ObjectDataSource1.SelectMethod = "Get"; break; case "1": ObjectDataSource1.SelectMethod = "GetByName"; ObjectDataSource1.SelectParameters.Add( "name", DbType.String, tbValue.Text.Trim()); break; case "2": ObjectDataSource1.SelectMethod = "GetByCode"; ObjectDataSource1.SelectParameters.Add( "code", DbType.String, tbValue.Text.Trim()); break; } }
public Login() { bll = new BLLUser(); }
public MemberManage() { bll = new BLLUser(); }
public LoginToQQ() { bll = new BLLUser(); }
public MebmerInfo() { bll = new BLLUser(); }
public ChangePassWord() { bll = new BLLUser(); }
public FindPassWord() { bll = new BLLUser(); }
public Register() { bll = new BLLUser(); }
public ActivatMember() { bll = new BLLUser(); }
public BindingToQQ() { bll = new BLLUser(); }