/// <summary> /// 创建红包 /// </summary> public static string CreateDraw(int count, decimal money, string mid) { if (count <= 0) { return("红包数量必须大于0"); } if (money < 0) { return("红包金额不能小于0"); } if (!string.IsNullOrWhiteSpace(mid) && BLL.Member.GetModelByMID(mid) == null) { return("指定会员不存在"); } Hashtable MyHs = new Hashtable(); for (int i = 0; i < count; i++) { Model.LotteryDraw model = new Model.LotteryDraw(); model.CreateTime = DateTime.Now; model.LMoney = money; model.PointMID = mid; model.State = false; Add(model, MyHs); } if (CommonBase.RunHashtable(MyHs)) { return("1"); } else { return("生成失败"); } }
public static string BuyStockRight(string mid, int count, Model.StockRightConfig src) { if (!BLL.ChangeMoney.EnoughChange(mid, count * src.BuyMoney, "MCW")) { return("您的" + BLL.Reward.List["MCW"].RewardName + "不足"); } Model.StockRight sr = new Model.StockRight(); sr.BuyCount = count; sr.BuyDate = DateTime.Now; sr.BuyMoney = count * src.BuyMoney; sr.FHCount = 0; sr.FHMoney = 0; sr.IsValid = true; sr.MID = mid; sr.StockType = src.Code; Hashtable MyHs = new Hashtable(); DAL.StockRight.Add(sr, MyHs); BLL.ChangeMoney.HBChangeTran(sr.BuyMoney, sr.MID, BLL.Member.ManageMember.TModel.MID, "R_BuySR", null, "MCW", "购买股权", MyHs); if (CommonBase.RunHashtable(MyHs)) { return("购买成功"); } return("购买失败"); }
public bool SaveOrUpdate(IList <Model.Sys_SecurityQuestion> list) { Hashtable MyHs = new Hashtable();//以事务方式 foreach (Model.Sys_SecurityQuestion obj in list) { if (obj.ID == 0) //需要插入的 { DAL.Sys_SecurityQuestion.Insert(obj); } else { //需要更新的 Model.Sys_SecurityQuestion objUpdate = obj; DAL.Sys_SecurityQuestion.Update(obj); } } return(CommonBase.RunHashtable(MyHs)); }
public static string QuitSH(string par, Model.Member member) { if (member.Role.IsAdmin) { var list = par.Split('@'); Model.QuitRecord model = new BLL.QuitRecord().GetModel(list[0]); if (model != null) { if (list[1] == "1") { model.State = 1; } else { model.State = 2; } model.CompleteTime = DateTime.Now; model.Remark = list[2]; Hashtable MyHs = new Hashtable(); if (model.State == 1) { //封号 MyHs.Add(" update member set IsClock = 1 ,IsClose = 1 where MID = '" + model.MID + "' ", null); } DAL.QuitRecord.Update(model, MyHs); if (CommonBase.RunHashtable(MyHs)) { return("审核成功"); } else { return("审核失败"); } } return("参数错误"); } else { return("您没有权限"); } }
/// <summary> /// 发放股权 /// </summary> public static bool PutGQFH(int ID) { return(CommonBase.RunHashtable(PutGQFH(ID, new Hashtable()))); }
public static bool UpdateList(Dictionary <string, Model.StockRightConfig> list) { return(CommonBase.RunHashtable(DAL.StockRightConfig.UpdateList(list, new Hashtable()))); }