/// <summary> /// 用户登录判断 /// </summary> public UserInfo UserLogin(string name, string pass) { var md5Pass = ComTools.ToMd5(pass); return(_dbManage.Queryable <UserInfo>() .Where(n => (n.UserName == name || n.Tel == name || n.Email == name) && n.Pass == md5Pass) .First()); }
public void ClickNextBtn() { audioSvc.PlayUIAudio(Constants.UIClickBtn); index += 1; if (index == dialogArr.Length) { //对话完成 发送任务完成的服务器消息 SetWndState(false); PlayerData.GuideID += 1; PlayerData.Coin += curtTaskData.coin; ComTools.CalcExp(curtTaskData.exp); GameRoot.AddTips(Constants.Color("任务奖励 金币+" + curtTaskData.coin + "经验" + curtTaskData.exp, TxtColor.Blue)); switch (curtTaskData.actID) { case 0: break; case 1: MainCitySys.Instance.OpenFubenWnd(); break; case 2: MainCitySys.Instance.OpenStrongWnd(); break; case 3: MainCitySys.Instance.OpenBuyWnd(0); break; case 4: MainCitySys.Instance.OpenBuyWnd(1); break; case 5: MainCitySys.Instance.OpenChatWnd(); break; default: break; } NetUpdatPlayerData net = new NetUpdatPlayerData(); } else { SetTalk(); } }
public override void OnOperationResponse(OperationResponse operationResponse) { if (operationResponse.ReturnCode == (byte)ReturnCode.Success) { TaskRewardCfg trc = ResSvc.Instance.GetTaskRewardCfg(_tid); GameRoot.AddTips("任务奖励领取成功!金币+" + trc.coin + "--经验+" + trc.exp); ComTools.CalcExp(trc.exp); } NetGetPlayerData netGetPlayerData2 = new NetGetPlayerData(PlayerData.playerID, LoadPlayeDataOverCode.RefreshUIByTaskWnd); NetSvc.Instance.RemoveRequest(this); }
public string GetRDNnameData(bool man = true) { System.Random rd = new System.Random(); string rdName = surnameLst[ComTools.RDint(0, surnameLst.Count - 1)]; if (man) { rdName += manLst[ComTools.RDint(0, manLst.Count - 1)]; } else { rdName += womanLst[ComTools.RDint(0, womanLst.Count - 1)]; } return(rdName); }
List <OrderNoList> orderList = null;//订单编号 /// <summary> /// 创建剑客订单 /// </summary> /// <param name="url">请求的URL</param> /// <param name="parameters">随同请求POST的参数名称及参数值字典</param> /// <param name="timeout">请求的超时时间</param> /// <param methods="post">post</param> /// <returns></returns> public bool SendJKWebNetOrder(decimal totalamount, string orderId, long selectedAddressId, string sendRmk, out string FromJKSavedOrderNo) { if (_env.IsDevelopment()) { sendRmk += "[测试]"; } //汇总健康发送数据 //通过订单编号查询网络发药信息视图表 var netInf = _db.vwCHIS_Shipping_NetOrder.AsNoTracking().Where(m => m.SendOrderId == orderId).Select(m => new { orderTime = m.CreatTime, netOrderId = m.NetOrderId, telephone = m.Mobile, consignee = m.ContactName, transportCosts = m.ContainTransFee, address = m.AddressDetail, }).FirstOrDefault(); var addrInf = _db.vwCHIS_Code_Customer_AddressInfos.AsNoTracking().FirstOrDefault(m => m.AddressId == selectedAddressId); Dictionary <string, string> kvs = new Dictionary <string, string>(); kvs.Add("method", "jianke.order.externalcreate"); kvs.Add("signMethod", "md5"); kvs.Add("cid", _tscid); kvs.Add("randomStr", Ass.Data.Utils.GetRandomString(8));// Ass.Data.Utils.GetRandomString(8)); kvs.Add("externalOrderNo", orderId); kvs.Add("accountId", "00000000-0000-0000-0000-000000000000"); kvs.Add("invoice", "null"); kvs.Add("status", "2"); kvs.Add("deliveryZipCode", addrInf.ZipCode.ToString()); kvs.Add("money", Ass.P.PInt(totalamount * 100).ToString()); kvs.Add("orderTime", netInf.orderTime.ToString("yyyy-M-d H:m:s")); kvs.Add("paymentType", "2"); //默认微信支付 kvs.Add("consignee", netInf.consignee + sendRmk.ToRoundStr('[')); //发货人的姓名 kvs.Add("telephone", netInf.telephone); kvs.Add("mobilephone", netInf.telephone); kvs.Add("province", ComTools.GetAreaName(addrInf.MergerName, 0)); kvs.Add("city", ComTools.GetAreaName(addrInf.MergerName, 1)); kvs.Add("district", ComTools.GetAreaName(addrInf.MergerName, 2)); kvs.Add("town", ""); kvs.Add("address", netInf.address); kvs.Add("transportCosts", Ass.P.PInt((netInf.transportCosts ?? 0) * 100).ToString());//物流费 var drugList = _db.vwCHIS_Shipping_NetOrder_Formed_Detail.Where(m => m.NetOrderId == netInf.netOrderId).AsNoTracking().ToList().Select(m => new OrderProduct { productCode = m.ThreePartDrugId.ToString().Replace(" ", ""), productName = m.DrugName.ToString().Replace(" ", ""), amount = Ass.P.PInt(m.Qty), actualPrice = Ass.P.PInt(m.Price * 100), packing = m.DrugModel } ).ToList(); var json = JKSign(kvs, drugList); var netJK = new NETDrugStore(); string codeJson = netJK.HttpsPostDrugOrderInfo(json, _url); Newtonsoft.Json.Linq.JObject jobj = (Newtonsoft.Json.Linq.JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(codeJson); var rtnCode = jobj.GetValueString("returnCode", "code"); if (rtnCode == "SUCCESS") { FromJKSavedOrderNo = jobj.GetValueString("orderNo"); return(true); } else { throw new Exception("三方返回错误信息:[" + rtnCode + "]" + jobj.GetValueString("returnMsg", "message")); } }