/// <summary> /// 金商管理客户提货 /// </summary> /// <param name="loginAccount">登录用户账户名/param> /// <param name="loginID">登录标识ID</param> /// <param name="agentInfoID">金商账户名</param> /// <param name="orderNo">定单编码</param> /// <param name="orderCode">提货买跌验证号</param> /// <param name="accountName">用户名</param> /// <param name="agentName">金商帐户</param> /// <param name="userID"></param> /// <param name="au">黄金</param> /// <param name="ag">白银</param> /// <returns></returns> public ErrType UpdateOrder(string loginAccount, string loginID, string agentInfoID, string orderNo, string orderCode, string accountName, string agentName, string userID, decimal au, decimal ag, decimal pt, decimal pd, int roleType) { try { OrderEntity orderEntity = new OrderEntity(); orderEntity.OrderNo = orderNo; // 定单编码 orderEntity.OrderType = 1; // 定单类别:提货单= 1, orderEntity.CarryWay = 1; // 提货单方向:提货单 = 1 orderEntity.OrderCode = orderCode; //string 提货买跌验证号 orderEntity.Account = accountName; // 用户 orderEntity.AgentName = agentName; // 金商帐户 orderEntity.UserId = userID; orderEntity.Au = au; //黄金 orderEntity.Ag = ag; //白银 orderEntity.Pt = pt; orderEntity.Pd = pd; OrderOperationEntity opEntyit = new OrderOperationEntity(); opEntyit.OperationId = loginAccount; opEntyit.Type = 1; ResultDesc result = _IManagerBzj.UpdateOrder(loginID, orderEntity, opEntyit, agentInfoID, CommonHelper.GetNetwork(), roleType); return(result.Result ? GeneralErr.Success : new ErrType(ERR.SERVICE, result.Desc)); } catch (Exception ex) { Console.WriteLine(ex.Message + ex.StackTrace); return(null); } }
/// <summary> /// 金商绑定账户 /// </summary> /// <param name="account">绑定账户名</param> /// <param name="agentid">金商ID,当前登录金商</param> /// <param name="cardNum">证件号</param> /// <param name="loginID">登录ID</param> /// <returns></returns> public ErrType AgentBind(string account, string agentid, string cardNum, string loginID, int roleType) { try { ResultDesc result = _IManagerBzj.AgentBind(account, agentid, cardNum, loginID, roleType); return(result.Result ? GeneralErr.Success : new ErrType(ERR.SERVICE, result.Desc)); } catch (Exception ex) { Console.WriteLine(ex.Message + ex.StackTrace); return(null); } }
/// <summary> /// 设置会员佣金比例 /// </summary> /// <param name="loginId">登录标识</param> /// <param name="ratio1">一级佣金比例</param> /// <param name="ratio2">二级佣金比例</param> /// <param name="ratio3">三级佣金比例</param> /// <param name="orgIDList">待设置的会员列表</param> /// <returns>ResultDesc</returns> public ErrType SetCommissionRatio(string loginId, double ratio1, double ratio2, double ratio3, List <string> orgIDList) { try { ResultDesc result = TradeService.SetCommissionRatio(loginId, ratio1, ratio2, ratio3, orgIDList); return(result.Result == true ? GeneralErr.Success : new ErrType(ERR.ERROR, result.Desc)); } catch (Exception ex) { FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, ex.Message); return(new ErrType(ERR.EXEPTION, ErrorText.GetHistoryData)); } }
/// <summary> /// 金生金用户绑定 /// </summary> /// <param name="entity"></param> /// <returns></returns> public ErrType CreateAdminGssUser(BzjUserBindEntity bzjentity, string loginID, string userID, int roleType) { try { UserBindEntity entity = MyConverter.ToUserBindEntity(bzjentity); ResultDesc result = _IManagerBzj.CreateAdminGssUser(entity, loginID, roleType); return(result.Result ? GeneralErr.Success : new ErrType(ERR.SERVICE, result.Desc)); } catch (Exception ex) { Console.WriteLine(ex.Message + ex.StackTrace); return(null); } }
/// <summary> /// Modify funds password. /// </summary> /// <param name="loginID">login ID</param> /// <param name="oldPwd">old password</param> /// <param name="newPwd">new password</param> /// <returns>ErrType</returns> public ErrType ModifyFundsPassword(string loginID, string oldPwd, string newPwd) { try { int pwdType = 1;//密码类型,0表示登陆密码,1表示资金密码 ResultDesc result = TradeService.ModifyUserPassword(loginID, pwdType, oldPwd, newPwd); return(result.Result ? GeneralErr.Success : new ErrType(ERR.ERROR, result.Desc)); } catch (Exception ex) { FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, ex.Message); return(new ErrType(ERR.EXEPTION, ErrorText.GetHistoryData)); } }
public override int GetHashCode() { int hash = 1; if (ResultCode != 0) { hash ^= ResultCode.GetHashCode(); } if (ResultDesc.Length != 0) { hash ^= ResultDesc.GetHashCode(); } hash ^= configList_.GetHashCode(); return(hash); }
public String AnalysisXml(string ReqXml) { string ResXml = string.Empty; string ReqCode = string.Empty; try { System.Xml.XmlDocument xmldoc = new System.Xml.XmlDocument(); xmldoc.LoadXml(ReqXml); //请求指令 ReqCode = xmldoc.SelectSingleNode("JTW91G/MsgData/ReqHeader/ReqCode").InnerText; Trade.CTrade trade = new Trade.CTrade(); string UserName = xmldoc.SelectSingleNode("JTW91G/MsgData/DataBody/RegInfo/UserName").InnerText; string TradeAccount = xmldoc.SelectSingleNode("JTW91G/MsgData/DataBody/RegInfo/TradeAccount").InnerText; string TradePwd = xmldoc.SelectSingleNode("JTW91G/MsgData/DataBody/RegInfo/TradePwd").InnerText; string PhoneNum = xmldoc.SelectSingleNode("JTW91G/MsgData/DataBody/RegInfo/PhoneNum").InnerText; string Email = xmldoc.SelectSingleNode("JTW91G/MsgData/DataBody/RegInfo/Email").InnerText; string CardNum = xmldoc.SelectSingleNode("JTW91G/MsgData/DataBody/RegInfo/CardNum").InnerText; ResultDesc rdsc = trade.RegTestTradeUser(UserName, TradeAccount, TradePwd, PhoneNum, Email, CardNum); if (!rdsc.Result) { string CodeDesc = ResCode.UL005Desc; string ReturnCode = GssGetCode.GetCode(rdsc.ReturnCode, rdsc.Desc, ref CodeDesc); ResXml = GssResXml.GetResXml(ReqCode, ReturnCode, CodeDesc, string.Format("<DataBody></DataBody>")); } else { ResXml = GssResXml.GetResXml(ReqCode, ResCode.UL004, ResCode.UL004Desc, string.Format("<DataBody></DataBody>")); } } catch (Exception ex) { com.individual.helper.LogNet4.WriteErr(ex); //业务处理失败 ResXml = GssResXml.GetResXml(ReqCode, ResCode.UL005, ResCode.UL005Desc, string.Format("<DataBody></DataBody>")); } return(ResXml); }
/// <summary> /// 减少库存数量 /// </summary> /// <param name="operationID">操作员的ID或用户名</param> /// <param name="loginID">登录ID</param> /// <param name="userID">用户id</param> /// <param name="accountName">用户名</param> /// <param name="au">黄金数量</param> /// <param name="ag">白银数量</param> /// <param name="pt">铂金数量</param> /// <param name="pd">钯金数量</param> /// <returns></returns> public ErrType CreateStockDeliverAdmin(string operationID, string loginID, string userID, string accountName, double au, double ag, double pt, double pd, int roleType) { try { OrderEntity orderEnity = new OrderEntity(); orderEnity.UserId = userID; orderEnity.Account = accountName; orderEnity.Au = (decimal)au; orderEnity.Ag = (decimal)ag; orderEnity.Pt = (decimal)pt; orderEnity.Pd = (decimal)pd; ResultDesc result = _IManagerBzj.CreateStockDeliverAdmin(operationID, orderEnity, loginID, roleType); return(result.Result ? GeneralErr.Success : new ErrType(ERR.SERVICE, result.Desc)); } catch (Exception ex) { Console.WriteLine(@"减少库存数量:" + ex.Message + ex.StackTrace); return(null); } }
/// <summary> /// 实物入库\增加库存 /// </summary> /// <param name="userID">客户用户ID</param> /// <param name="loginAccountName">登录用户名</param> /// <param name="accountName">被操作用户名</param> /// <param name="orderType">定单类型 1入库 2 买跌</param> /// <param name="Product">入库商品类别XAU黄金 XAG白银 XPT铂金 XPD巴金</param> /// <param name="loginID">登录标识ID</param> /// <param name="deliverNo">定单编码</param> /// <param name="total">数量</param> /// <param name="price">价格</param> /// <param name="direction">交割单表方向: 9 实物入库 13 库存调整</param> /// <returns></returns> public ErrType CreateDeliverAdmin(string userID, string loginAccountName, string userName, string orderType, string Product, string loginID, string deliverNo, decimal total, double price, int direction, int roleType) { try { DeliverEntity entity = new DeliverEntity(); entity.UserID = userID; entity.DeliverNo = deliverNo; entity.OperationUserID = loginAccountName; entity.Total = total; entity.LockPrice = (decimal)price; entity.Account = userName; entity.Direction = direction; ResultDesc result = _IManagerBzj.CreateDeliverAdmin(entity, orderType, Product, loginID, roleType); return(result.Result ? GeneralErr.Success : new ErrType(ERR.SERVICE, result.Desc)); } catch (Exception ex) { Console.WriteLine(@"实物入库\增加库存:" + ex.Message + ex.StackTrace); return(null); } }
private void Save() { TradeNews news = new TradeNews(); news.NewsTitle = txtTitle.Text; news.OverView = txtOverView.Text; news.NewsContent = NewsContent.InnerText; if (string.IsNullOrEmpty(news.NewsContent)) { MessageBox("请填写内容!"); return; } if (string.IsNullOrEmpty(news.NewsTitle)) { MessageBox("请填写标题!"); return; } if (string.IsNullOrEmpty(news.OverView)) { MessageBox("请填写摘要!"); return; } if (news.NewsContent.Length > 4000) { MessageBox("内容不能超过4000字符!"); return; } if (news.NewsTitle.Length > 200) { MessageBox("标题不能超过200字符!"); return; } if (news.OverView.Length > 2000) { MessageBox("摘要不能超过2000字符!"); return; } int type; if (!string.IsNullOrEmpty(ddlType.SelectedItem.Value)) { type = int.Parse(ddlType.SelectedItem.Value); } else { MessageBox("请选择类型!"); return; } news.NType = (NewsType)type; news.PubPerson = Account; int status = 1; status = rbEnable.Checked ? 1 : 0; news.Status = (NewsStatus)status; ResultDesc result = new ResultDesc(); if (string.IsNullOrEmpty(ID)) { news.ID = Guid.NewGuid().ToString("n"); result = GetManager.AddTradeNews(news, LoginId); } else { news.ID = ID; result = GetManager.ModifyTradeNews(news, LoginId); } MessageBox(result.Desc); }
public static extern void Compile([In] ref SourceDesc source, [In] ref TargetDesc target, out ResultDesc result);
public static extern void Disassemble([In] ref DisassembleDesc source, out ResultDesc result);
/// <summary> /// 修改密码 /// </summary> /// <param name="LoginID">用户登陆标识ID</param> /// <param name="PwdType">0表示修改登陆密码,1表示修改资金密码</param> /// <param name="oldpwd">旧密码</param> /// <param name="newpwd">新密码</param> /// <returns></returns> public ResultDesc ModifyUserPassword(string LoginID, int PwdType, string oldpwd, string newpwd) { ResultDesc rsdc = new ResultDesc(); try { TradeUser tdUser = new TradeUser(); List <string> sqlList = new List <string>(); if (!ComFunction.ExistUserLoginID(LoginID, ref tdUser)) { rsdc.Result = false; rsdc.ReturnCode = ResCode.UL003; rsdc.Desc = ResCode.UL003Desc; return(rsdc); } //密码转换 oldpwd = Des3.Des3EncodeCBC(oldpwd); newpwd = Des3.Des3EncodeCBC(newpwd); string sql1 = string.Empty; if (PwdType == 0)//登陆密码 { if (tdUser.LoginPwd == oldpwd) { sql1 = string.Format("UPDATE Base_User SET LoginPwd='{0}' WHERE userid='{1}' AND LoginPwd='{2}'", newpwd, tdUser.UserID, oldpwd); sqlList.Add(sql1); } else { rsdc.Result = false; rsdc.Desc = "登陆密码不一致,修改失败"; return(rsdc); } } else//资金密码 { if (tdUser.CashPwd == oldpwd) { sql1 = string.Format("UPDATE Base_User SET CashPwd='{0}' WHERE userid='{1}' AND CashPwd='{2}'", newpwd, tdUser.UserID, oldpwd); sqlList.Add(sql1); } else { rsdc.Result = false; rsdc.Desc = "资金密码不一致,修改失败"; return(rsdc); } } if (!ComFunction.SqlTransaction(sqlList)) { LogNet4.WriteMsg(string.Format("修改密码失败,SQL语句执行失败,SQL语句是:{0}", sql1)); rsdc.Result = false; rsdc.Desc = "用户密码不对,修改密码失败"; return(rsdc); } rsdc.Result = true; rsdc.Desc = "修改密码,成功"; } catch (Exception ex) { ComFunction.WriteErr(ex); rsdc.Result = false; rsdc.Desc = "修改密码,失败"; } return(rsdc); }