/// <summary> /// 获取这种id的猫可以获取的赏金 /// </summary> /// <param name="cattypeid"></param> public void AddCustomerModel(int cattypeid) { ManorInfoProxy manorInfoProxy = Facade.RetrieveProxy(ManorInfoProxy.NAME) as ManorInfoProxy; Temp_CustomerInfoData = new CustomerInfoVO(cattypeid, manorInfoProxy.catDic[cattypeid].Money); Facade.SendNotification(CustomerMediator.GENERATE_CUSTOMER, Temp_CustomerInfoData); }
public void GenerateCustomer(CustomerInfoVO customerVO) { GameObject customer = CatPool.GetInstance().GetCatPool(customerVO.Id).CreateObject(spawnObject.transform.position); CustomerCtl customerCtl = customer.AddComponent <CustomerCtl>(); customerCtl.jumpStartObject = jumpStartObject; customerCtl.jumpEndObject = jumpEndObject; customerCtl.centerObject = centerObject; customerCtl.goAwayObjects = goAwayObjects; CustomerInfo customerInfo = customer.AddComponent <CustomerInfo>(); customerInfo.Money = customerVO.Money; customerLists.Add(customer); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/json"; string realname = context.Request.Params["rname"] ?? ""; string phone = context.Request.Params["phone"] ?? ""; string wxname = context.Request.Params["wxname"] ?? ""; string address = context.Request.Params["address"] ?? ""; string url = context.Request.Params["__url"] ?? ""; string remark = context.Request.Params["remark"] ?? ""; string province = context.Request.Params["province"] ?? ""; string city = context.Request.Params["city"] ?? ""; string area = context.Request.Params["area"] ?? ""; string size = context.Request.Params["size"] ?? ""; string color = context.Request.Params["color"] ?? ""; string productname = context.Request.Params["productname"] ?? ""; string num = context.Request.Params["num"] ?? ""; string price = context.Request.Params["price"] ?? ""; int adid = int.Parse(context.Request.Params["adid"] ?? "0"); int aduserid = int.Parse(context.Request.Params["aduserid"] ?? "0"); ApiResult result = new ApiResult(); CustomerInfoVO info = new CustomerInfoVO(); try { info.Size = size; info.Color = color; info.ProducteName = productname; info.Num = int.Parse(num); info.Price = decimal.Parse(price); info.Address = address; info.AdId = adid; info.AdUserId = aduserid; info.AdUrl = url; info.BrowseName = DN.Framework.Utility.ClientHelper.GetBrowseName(); info.BrowseVersion = DN.Framework.Utility.ClientHelper.GetBrowseVersion(); info.ClientId = GetClentId(context.Request, context.Response); info.ClientIp = DN.Framework.Utility.ClientHelper.ClientIP(); info.ExportDate = DateTime.Now; //IP相关信息 info.Country = ""; info.County = ""; info.IpSource = ""; info.Isp = ""; info.Region = ""; info.Area = ""; info.CreateDate = DateTime.Now; info.IsMobile = DN.Framework.Utility.ClientHelper.GetIsMobileDevice() ? 1 : 0; info.OsName = DN.Framework.Utility.ClientHelper.GetOsName(); info.Phone = phone; info.RealName = realname; info.ReferrerUrl = DN.Framework.Utility.ClientHelper.GetReferer(); info.Remark = remark; info.UserCity = city; info.UserCountry = area; info.UserRegion = province; info.WeiXinNum = wxname; CustomerInfoPara cip = new CustomerInfoPara(); cip.RealName = info.RealName; cip.Phone = info.Phone; cip.AdUrl = info.AdUrl; cip.Address = info.Address; var count = CustomerInfoBLL.Instance.GetRecords(cip); if (count == 0) { CustomerInfoBLL.Instance.Add(info); result.code = 1; result.msg = "您的信息己提交成功,稍后销售客服马上联系您。"; } else { result.code = 0; result.msg = "您的信息己提交成功,销售顾问将会与您联系。"; } } catch (Exception ex) { result.msg = "客户提交异常。管理员正在处理中。"; result.code = 0; DN.Framework.Utility.LogHelper.Write(ex.Message, "addcus"); } string json = DN.Framework.Utility.Serializer.SerializeObject(result); context.Response.ClearContent(); context.Response.Write(json); context.Response.End(); }
public override bool Edit(CustomerInfoVO m) { CodeCommand command = new CodeCommand(); command.CommandText = EDIT; command.Parameters.Add(new SqlParameter() { ParameterName = "@AdUrl", Value = ParameterHelper.ConvertValue(m.AdUrl) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@AdId", Value = ParameterHelper.ConvertValue(m.AdId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@AdUserId", Value = ParameterHelper.ConvertValue(m.AdUserId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@RealName", Value = ParameterHelper.ConvertValue(m.RealName) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Phone", Value = ParameterHelper.ConvertValue(m.Phone) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@WeiXinNum", Value = ParameterHelper.ConvertValue(m.WeiXinNum) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Remark", Value = ParameterHelper.ConvertValue(m.Remark) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Address", Value = ParameterHelper.ConvertValue(m.Address) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UserCountry", Value = ParameterHelper.ConvertValue(m.UserCountry) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UserRegion", Value = ParameterHelper.ConvertValue(m.UserRegion) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UserCity", Value = ParameterHelper.ConvertValue(m.UserCity) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ClientIp", Value = ParameterHelper.ConvertValue(m.ClientIp) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ClientId", Value = ParameterHelper.ConvertValue(m.ClientId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IsMobile", Value = ParameterHelper.ConvertValue(m.IsMobile) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ReferrerUrl", Value = ParameterHelper.ConvertValue(m.ReferrerUrl) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@BrowseName", Value = ParameterHelper.ConvertValue(m.BrowseName) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@BrowseVersion", Value = ParameterHelper.ConvertValue(m.BrowseVersion) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@OsName", Value = ParameterHelper.ConvertValue(m.OsName) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Country", Value = ParameterHelper.ConvertValue(m.Country) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Area", Value = ParameterHelper.ConvertValue(m.Area) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Region", Value = ParameterHelper.ConvertValue(m.Region) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@City", Value = ParameterHelper.ConvertValue(m.City) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@County", Value = ParameterHelper.ConvertValue(m.County) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Isp", Value = ParameterHelper.ConvertValue(m.Isp) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IpSource", Value = ParameterHelper.ConvertValue(m.IpSource) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CreateDate", Value = ParameterHelper.ConvertValue(m.CreateDate) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Num", Value = ParameterHelper.ConvertValue(m.Num) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Price", Value = ParameterHelper.ConvertValue(m.Price) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ProducteName", Value = ParameterHelper.ConvertValue(m.ProducteName) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Color", Value = ParameterHelper.ConvertValue(m.Color) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Size", Value = ParameterHelper.ConvertValue(m.Size) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IsDelete", Value = ParameterHelper.ConvertValue(m.IsDelete) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UserAttr", Value = ParameterHelper.ConvertValue(m.UserAttr) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CheckState", Value = ParameterHelper.ConvertValue(m.CheckState) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CheckRemark", Value = ParameterHelper.ConvertValue(m.CheckRemark) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IsExport", Value = ParameterHelper.ConvertValue(m.IsExport) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ExportUserId", Value = ParameterHelper.ConvertValue(m.ExportUserId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ExportDate", Value = ParameterHelper.ConvertValue(m.ExportDate) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Id", Value = ParameterHelper.ConvertValue(m.Id) }); int result = DbProxyFactory.Instance.Proxy.ExecuteNonQuery(command); if (result >= 1) { return(true); } return(false); }
public override int InsertIdentityId(CustomerInfoVO m) { CodeCommand command = new CodeCommand(); command.CommandText = INSERT + "; select @@Identity"; command.Parameters.Add(new SqlParameter() { ParameterName = "@AdUrl", Value = ParameterHelper.ConvertValue(m.AdUrl) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@AdId", Value = ParameterHelper.ConvertValue(m.AdId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@AdUserId", Value = ParameterHelper.ConvertValue(m.AdUserId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@RealName", Value = ParameterHelper.ConvertValue(m.RealName) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Phone", Value = ParameterHelper.ConvertValue(m.Phone) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@WeiXinNum", Value = ParameterHelper.ConvertValue(m.WeiXinNum) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Remark", Value = ParameterHelper.ConvertValue(m.Remark) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Address", Value = ParameterHelper.ConvertValue(m.Address) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UserCountry", Value = ParameterHelper.ConvertValue(m.UserCountry) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UserRegion", Value = ParameterHelper.ConvertValue(m.UserRegion) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UserCity", Value = ParameterHelper.ConvertValue(m.UserCity) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ClientIp", Value = ParameterHelper.ConvertValue(m.ClientIp) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ClientId", Value = ParameterHelper.ConvertValue(m.ClientId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IsMobile", Value = ParameterHelper.ConvertValue(m.IsMobile) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ReferrerUrl", Value = ParameterHelper.ConvertValue(m.ReferrerUrl) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@BrowseName", Value = ParameterHelper.ConvertValue(m.BrowseName) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@BrowseVersion", Value = ParameterHelper.ConvertValue(m.BrowseVersion) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@OsName", Value = ParameterHelper.ConvertValue(m.OsName) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Country", Value = ParameterHelper.ConvertValue(m.Country) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Area", Value = ParameterHelper.ConvertValue(m.Area) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Region", Value = ParameterHelper.ConvertValue(m.Region) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@City", Value = ParameterHelper.ConvertValue(m.City) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@County", Value = ParameterHelper.ConvertValue(m.County) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Isp", Value = ParameterHelper.ConvertValue(m.Isp) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IpSource", Value = ParameterHelper.ConvertValue(m.IpSource) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CreateDate", Value = ParameterHelper.ConvertValue(m.CreateDate) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Num", Value = ParameterHelper.ConvertValue(m.Num) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Price", Value = ParameterHelper.ConvertValue(m.Price) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ProducteName", Value = ParameterHelper.ConvertValue(m.ProducteName) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Color", Value = ParameterHelper.ConvertValue(m.Color) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@Size", Value = ParameterHelper.ConvertValue(m.Size) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IsDelete", Value = ParameterHelper.ConvertValue(m.IsDelete) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@UserAttr", Value = ParameterHelper.ConvertValue(m.UserAttr) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CheckState", Value = ParameterHelper.ConvertValue(m.CheckState) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@CheckRemark", Value = ParameterHelper.ConvertValue(m.CheckRemark) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@IsExport", Value = ParameterHelper.ConvertValue(m.IsExport) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ExportUserId", Value = ParameterHelper.ConvertValue(m.ExportUserId) }); command.Parameters.Add(new SqlParameter() { ParameterName = "@ExportDate", Value = ParameterHelper.ConvertValue(m.ExportDate) }); var result = DbProxyFactory.Instance.Proxy.ExecuteScalar(command); return(int.Parse(result.ToString())); }
public override string GetOtherConditionByModel(CustomerInfoVO m) { return(""); }
public override string GetOrderByModel(CustomerInfoVO m) { return(""); }