/// <summary> /// 发送短信验证码 /// </summary> public bool FP80402(string phoneNum) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { if (dbma1.U000s.Where(c => c.phone == phoneNum).FirstOrDefault() != null) { return(false); } //判断是否需要产生新的验证码 string identifyingCode = IfIdentifyCodePastDue(dbma1, phoneNum); if (identifyingCode == null) { //产生6位新的验证码 identifyingCode = GenerateIdentifyingCode(); } //发送验证码 string content = string.Format("您的验证码为{0},有效时间为10分钟。", identifyingCode); if (Comm.SM.F001(dbma1, "U00000", phoneNum, content, 1, false) != "0") { dbma1.SubmitChanges(); return(false); } //验证码记录写入到数据库中 IdentifyingCodeInsertIntoDB(dbma1, phoneNum, identifyingCode); dbma1.SubmitChanges(); return(true); } }
public void FP40205(string reserveSN, decimal purcharsePrice) { string userSN = session["userSN"].ToString(); using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //有效性检查(1、已被取消或者拒绝。2、已被购买) var data1 = dbma1.P400s.Where(c => c.reserveSN == reserveSN && (c.senderCancelReserveDate != null || c.receiverRefuseReserveDate != null)).FirstOrDefault(); var data2 = dbma1.P401s.Where(c => c.reserveSN == reserveSN).FirstOrDefault(); if (data1 != null || data2 != null) { return; } //加入资产购买表 P401 string max33SN = C101.FC10102("P401", 6, "J"); P400 p400 = dbma1.P400s.Where(c => c.reserveSN == reserveSN).First(); P401 p401 = new P401(); p401.purchaseSN = max33SN; p401.reserveSN = reserveSN; p401.purchaserUserSN = userSN; p401.sellerUserSN = p400.receiverUserSN; p401.assetsSN = p400.assetsSN; p401.purchasePrice = purcharsePrice; p401.purchaseDate = DateTime.Now; dbma1.P401s.InsertOnSubmit(p401); //加入账单表 F001 decimal serviceRate = Convert.ToDecimal(dbma1.A027s.First().serviceRate); string F001max33SN = C101.FC10102("F001", 6, "L"); F001 f001 = new F001(); f001.billSN = F001max33SN; f001.payerUserSN = p400.receiverUserSN; f001.businessSN = p400.assetsSN; f001.billType = "资产出售"; f001.MoneyAmount = purcharsePrice * serviceRate * 10000; f001.generateDate = DateTime.Now; dbma1.F001s.InsertOnSubmit(f001); dbma1.SubmitChanges(); U003 u003 = dbma1.U003s.Where(c => c.userSN == p400.receiverUserSN).First(); //如有邮箱提醒 if (u003.billGenerate_email == true) { BillSendByEmail(dbma1, p400.receiverUserSN, p400.assetsSN); } //如有短信提醒 if (u003.billGenerate_shortMessage == true) { BillSendBySM(dbma1, p400.receiverUserSN, p400.assetsSN); } dbma1.SubmitChanges(); } }
public void Send(object obj) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { SendByEmail(dbma1); dbma1.SubmitChanges(); SendBySM(dbma1); dbma1.SubmitChanges(); } }
//P8010503 工作信息 public void FP8010503(string workEnterprise, string enterpriseTypeSN, string industryTypeSN, DateTime?hiredate, string workTel, string post, string enterpriseSwitchboard, string enterpriseWebsite, string colleageName, string colleagePhone, string colleageIdCard) { string userSN = session["userSN"].ToString(); //string userSN = "U00001"; using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { U002 u002 = dbma1.U002s.Where(c => c.userSN == userSN).First(); u002.workEnterprise = workEnterprise; u002.enterpriseTypeSN = enterpriseTypeSN; u002.industryTypeSN = industryTypeSN; u002.hiredate = hiredate; u002.workTel = workTel; u002.post = post; u002.enterpriseSwitchboard = enterpriseSwitchboard; u002.enterpriseWebsite = enterpriseWebsite; u002.colleageName = colleageName; u002.colleagePhone = colleagePhone; u002.colleageIdCard = colleageIdCard; dbma1.SubmitChanges(); } }
//P8010202 个人信息 public void FP8010202(string maritalStatusTypeSN, bool procreateStatus, string healthyStatusTypeSN, bool ifBasicLivingAllowance, string currentAddressProvinceSN, string currentAddressCitySN, string currentAddressDetails, string graduateSchool, string degreeTypeSN, string degreeCard, string friendName, string friendPhone) { string userSN = session["userSN"].ToString(); //string userSN = "U00001"; using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { U002 u002 = dbma1.U002s.Where(c => c.userSN == userSN).First(); u002.maritalStatusTypeSN = maritalStatusTypeSN; u002.procreateStatus = procreateStatus; u002.healthyStatusTypeSN = healthyStatusTypeSN; u002.ifBasicLivingAllowance = ifBasicLivingAllowance; u002.currentAddressProvinceSN = currentAddressProvinceSN; u002.currentAddressCitySN = currentAddressCitySN; u002.currentAddressDetails = currentAddressDetails; u002.graduateSchool = graduateSchool; u002.degreeTypeSN = degreeTypeSN; u002.degreeCard = degreeCard; u002.friendName = friendName; u002.friendPhone = friendPhone; dbma1.SubmitChanges(); } }
//0:成功; 1:失效; 2:失败 public string FM020102(string crSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var dataVerify = (from c in dbma1.P200s where c.creditRightSN == crSN && c.cancelDate == null && !dbma1.P203s.Where(o => o.creditRightSN == crSN && o.senderCancelReserveDate == null && o.receiverRefuseReserveDate == null).Any() && !dbma1.P100s.Where(p => p.creditRightSN == crSN && p.senderCancelReserveDate == null && p.receiverRefuseReserveDate == null).Any() select c).FirstOrDefault(); if (dataVerify == null) { return("1"); } var data = dbma1.P200s.Where(c => c.creditRightSN == crSN).First(); data.cancelDate = DateTime.Now; B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "P200"; b000.pkSN = data.creditRightSN; b000.actionTypeSN = "B01"; int internalUserSN = Convert.ToInt32(session["internalUserId"].ToString()); //int internalUserSN = 1032; b000.operatorSN = internalUserSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); return("0"); } }
public void FP10209(string crSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //有效性检查(1、未审核) var data1 = dbma1.P500s.Where(c => c.creditRightSN == crSN && c.auditStatus != null).FirstOrDefault(); if (data1 != null) { return; } P101 p101 = (from c in dbma1.P101s where c.creditRightSN == crSN && c.senderCancelReserveDate == null select c).FirstOrDefault(); if (p101 == null) { return; } p101.senderCancelReserveDate = DateTime.Now; dbma1.SubmitChanges(); } }
/// <summary> /// 取消预约 /// </summary> public void FP10207(string crSN, string cancelReasonTypeSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //检查有效性(1、没有被投资。) var data1 = dbma1.P102s.Where(c => c.creditRightSN == crSN).FirstOrDefault(); if (data1 != null) { return; } P100 p100 = (from c in dbma1.P100s where c.creditRightSN == crSN && c.senderCancelReserveDate == null && c.receiverRefuseReserveDate == null select c).FirstOrDefault(); if (p100 == null) { return; } p100.senderCancelReserveDate = DateTime.Now; p100.senderCancelReserveReasonTypeSN = cancelReasonTypeSN; //P101 p101 = (from c in dbma1.P101s // where c.creditRightReserveSN == p100.reserveSN // && c.senderCancelReserveDate == null // select c).FirstOrDefault(); //if (p101 != null) //{ // p101.senderCancelReserveDate = DateTime.Now; //} dbma1.SubmitChanges(); } }
/// <summary> /// 删除拒绝预约 (融资方取消) /// </summary> public void FP10217(string crSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { P203 p203 = (from c in dbma1.P203s where c.creditRightSN == crSN && c.senderCancelReserveDate != null && c.receiverDeleteReserveDate == null select c).FirstOrDefault(); if (p203 == null) { return; } p203.receiverDeleteReserveDate = DateTime.Now; //P101 p101 = (from c in dbma1.P101s // where c.creditRightReserveSN == p203.reserveSN // && c.senderCancelReserveDate == null // select c).FirstOrDefault(); //if (p101 != null) //{ // p101.senderCancelReserveDate = DateTime.Now; //} dbma1.SubmitChanges(); } }
/// <summary> /// 结案 /// </summary> public void FP10309(string crSN, DateTime repaymentDate) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //检查有效性(1、是否已经结案) var data = dbma1.P102s.Where(c => c.creditRightSN == crSN && c.closeCaseDate != null).FirstOrDefault(); if (data != null) { return; } var investCrData = dbma1.P102s.Where(c => c.creditRightSN == crSN).First(); investCrData.closeCaseDate = DateTime.Now; string max33SN = C101.FC10102("P103", 6, "D"); P103 p103 = new P103(); p103.paymentSN = max33SN; p103.investSN = investCrData.investSN; p103.repayDate = repaymentDate; p103.ifOverdue = repaymentDate > investCrData.deadlineDate ? true : false; dbma1.P103s.InsertOnSubmit(p103); dbma1.SubmitChanges(); } }
public void FM091102(int webDelay, int maxCusSvrConnLevel, int maxUserConnNum, int cusSvrUserMaxAmount) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.configs.First(); data.webDelay = webDelay; data.maxCusSvrConnLevel = maxCusSvrConnLevel; data.maxUserConnNum = maxUserConnNum; data.cusSvrUserMaxAmount = cusSvrUserMaxAmount; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "configs"; b000.pkSN = data.config_id.ToString(); b000.actionTypeSN = "B0X"; int operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int operatorSN = 1032; b000.operatorSN = operatorSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); } }
public void FM090101(int minDeadline, int maxDeadline, decimal minFinancingMoneyAmount) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var a024 = dbma1.A024s.First(); a024.minDeadline = minDeadline; a024.maxDeadline = maxDeadline; a024.minFinancingMoneyAmount = minFinancingMoneyAmount; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A024"; b000.pkSN = a024.financingParamsSN.ToString(); b000.actionTypeSN = "B0K"; int operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int operatorSN = 1032; b000.operatorSN = operatorSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); } }
public void FM090602(decimal openServerCost, decimal consultantReserveCost, decimal financingReserveCost) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var a023 = dbma1.A023s.First(); a023.openServerCost = openServerCost; a023.consultantReserveCost = consultantReserveCost; a023.financingReserveCost = financingReserveCost; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A023"; b000.pkSN = a023.investParamsSN.ToString(); b000.actionTypeSN = "B0J"; int operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int operatorSN = 1032; b000.operatorSN = operatorSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); } }
public void FM090601(decimal minInvestMoneyAmount, decimal minDailyRate, decimal maxDailyRate) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var a023 = dbma1.A023s.First(); a023.minInvestMoneyAmount = minInvestMoneyAmount; a023.minDailyRate = minDailyRate; a023.maxDailyRate = maxDailyRate; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A023"; b000.pkSN = a023.investParamsSN.ToString();; b000.actionTypeSN = "B0H"; int operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int operatorSN = 1032; b000.operatorSN = operatorSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); } }
public void FM090501(string smtp, string userName, string pwd, int port, bool switchStatus) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.A035s.First(); data.SMTP = smtp; data.userName = userName; data.pwd = pwd; data.port = port; data.switchStatus = switchStatus; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A035"; b000.pkSN = data.SN; b000.actionTypeSN = "B19"; int operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int operatorSN = 1032; b000.operatorSN = operatorSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); } }
//1:修改成功;0:操作失败 不返回结果:2:验证码不正确; public int FP80310(string IC, string newPwd) { string userSN = session["userSN"].ToString(); //string userSN = "U00001"; using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { string phone = dbma1.U000s.Where(c => c.userSN == userSN).First().phone; //检测验证码 if (IfIdentifyingCodeCorrect(dbma1, phone, IC, "修改交易密码") == false) { return(2); } //修改交易密码 string newPwdMd5 = C101.FC10103(newPwd); U003 u003 = dbma1.U003s.Where(c => c.userSN == userSN).First(); u003.transactPwd = newPwdMd5; u003.ifChangeTransactPwd = true; dbma1.SubmitChanges(); return(1); } }
public void FM090103(decimal serviceRateDaily, decimal minServiceRateTotel, decimal maxServiceRateTotel) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var a024 = dbma1.A024s.First(); a024.serviceRateDaily = serviceRateDaily; a024.minServiceRateTotel = minServiceRateTotel; a024.maxServiceRateTotel = maxServiceRateTotel; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A024"; b000.pkSN = a024.financingParamsSN.ToString(); b000.actionTypeSN = "B0M"; int operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int operatorSN = 1032; b000.operatorSN = operatorSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); } }
public void FP90111(string s) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { dbma1.U002s.First().consultantDetails = s; dbma1.SubmitChanges(); } }
public void FM020407(string userSN, string note) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.U001s.Where(c => c.userSN == userSN).First(); data.consultantNote = note; dbma1.SubmitChanges(); } }
public void FM020309(string userSN, string note) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.U001s.Where(c => c.userSN == userSN).First(); data.assetsPurchaseNote = note; dbma1.SubmitChanges(); } }
public void FM020208(string userSN, string note) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.U001s.Where(c => c.userSN == userSN).First(); data.creditRightInvestNote = note; dbma1.SubmitChanges(); } }
public void FP50310(string serverSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { P500 p500 = dbma1.P500s.Where(c => c.serverSN == serverSN).First(); p500.consultantDeleteCreditRightDate = DateTime.Now; dbma1.SubmitChanges(); } }
/// <summary> /// 删除 /// </summary> public void FP10503(string crSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var closedCaseCr = dbma1.P102s.Where(c => c.creditRightSN == crSN).First(); closedCaseCr.investorDeleteDate = DateTime.Now; dbma1.SubmitChanges(); } }
public void FP30303(string purchaseSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { P401 p401 = dbma1.P401s.Where(c => c.purchaseSN == purchaseSN).First(); p401.sellerDeleteDate = DateTime.Now; dbma1.SubmitChanges(); } }
public void RecordUserAgent(string userAgent) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { T003 t003 = new T003(); t003.userAgent = userAgent; dbma1.T003s.InsertOnSubmit(t003); dbma1.SubmitChanges(); } }
/// <summary> /// 获取数据库主键33进制编码 /// </summary> public static string FC10102(string tableName, int SNDigitLength, string prefix) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { B002 b002 = dbma1.B002s.Where(c => c.tableName == tableName).First(); b002.maxDecimalSN++; int maxDecimalSN = b002.maxDecimalSN; dbma1.SubmitChanges(); return(string.Format("{0}{1}", prefix, Comm.C101.FC10101(maxDecimalSN, SNDigitLength))); } }
//0:成功; 1:岗位已经删除; 2:用户已经添加到此岗位; 3:用户已经添加到其他岗位; public string FM100403(string roleSN, int internalUserSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //岗位已经删除 var dataVarify1 = dbma1.B004s.Where(c => c.roleTypeSN == roleSN && c.deleteDate == null).FirstOrDefault(); if (dataVarify1 == null) { return("1"); } //用户已经添加到此岗位 var dataVarify2 = dbma1.B003s.Where(c => c.roleTypeSN == roleSN && c.internalUserSN == internalUserSN && c.deleteDate == null).FirstOrDefault(); if (dataVarify2 != null) { return("2"); } //用户已经添加到其他岗位 var dataVarify3 = dbma1.B003s.Where(c => c.roleTypeSN != roleSN && c.internalUserSN == internalUserSN && c.deleteDate == null).FirstOrDefault(); if (dataVarify3 != null) { return("3"); } B003 b003 = new B003(); b003.roleAssignmentSN = C101.FC10102("B003", 3, "B"); b003.internalUserSN = internalUserSN; b003.roleTypeSN = roleSN.Trim();; b003.assignDate = DateTime.Now; dbma1.B003s.InsertOnSubmit(b003); //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "B003"; b000.pkSN = b003.roleAssignmentSN; b000.actionTypeSN = "B1B"; int operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int operatorSN = 1032; b000.operatorSN = operatorSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); return("0"); } }
/// <summary> /// 发送短信验证码 /// 1:原手机号码;2:新手机号码;3:交易密码 /// </summary> public bool FP80307(string phoneNum, string businessType) { string userSN = session["userSN"].ToString(); using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { if (businessType == "1") { businessType = "原手机验证"; } else if (businessType == "2") { if (dbma1.U000s.Where(c => c.phone == phoneNum).FirstOrDefault() != null) { return(false); } businessType = "新手机验证"; } else if (businessType == "3") { businessType = "修改交易密码"; phoneNum = dbma1.U000s.Where(c => c.userSN == userSN).First().phone; } //判断是否需要产生新的验证码 string identifyingCode = IfIdentifyCodePastDue(dbma1, phoneNum, businessType); if (identifyingCode == null) { //产生6位新的验证码 identifyingCode = GenerateIdentifyingCode(); } //发送验证码 string content = string.Format("您的验证码为{0},有效时间为10分钟。", identifyingCode); if (Comm.SM.F001(dbma1, userSN, phoneNum, content, 1, false) != "0") { return(false); } //验证码记录写入到数据库中 IdentifyingCodeInsertIntoDB(dbma1, phoneNum, identifyingCode, businessType); dbma1.SubmitChanges(); return(true); } }
//申请 public string FP8010506(string u002Str, string pwd) { string userSN = session["userSN"].ToString(); //string userSN = "U00004"; U002 consultantSvrObj = C101.FC10108(u002Str, typeof(U002)) as U002; using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //密码是否正确 if (C201.FC20146(dbma1, userSN, pwd) == false) { return("0"); } //扣款 A025 a025 = dbma1.A025s.First(); if (C201.FC20147(dbma1, userSN, Convert.ToDecimal(a025.openServerCost), "顾问申请", null) == false) { return("0"); } //更新用户信息基本表 U002 ConcultantSvrUpdateU002(dbma1, consultantSvrObj, userSN); //更新服务表 U001 ConcultantSvrUpdateU001(dbma1, userSN); //更新顾问申请备案表 U006 ConsultantSvrApplyRecUpdateU006(dbma1, consultantSvrObj, userSN); //加入成长值表 F006 string F006Max33SN = C101.FC10102("F006", 7, "UD"); F006 f006 = new F006(); f006.groupUpSN = F006Max33SN; f006.userSN = userSN; f006.businessSN = userSN; f006.businessType = "顾问申请"; f006.transactionMoneyAmount = Convert.ToDecimal(a025.openServerCost); f006.groupUpValue = a025.openServerCost; f006.acquireDate = DateTime.Now; dbma1.F006s.InsertOnSubmit(f006); dbma1.SubmitChanges(); return("1"); } }
//0:成功。1:密码错误。2:余额不足 public string FP30103(string assetsData, string pwd) { string userSN = session["userSN"].ToString(); //string userSN = "U00003"; P300 assetsDataObj = C101.FC10108(assetsData, typeof(P300)) as P300; using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //密码是否正确 if (C201.FC20146(dbma1, userSN, pwd) == false) { return("{\"resStatus\":\"1\"}"); } //余额是否充足 decimal publishAssetsFee = Convert.ToDecimal(dbma1.A027s.First().publishAssetsCost); //扣款 if (C201.FC20147(dbma1, userSN, publishAssetsFee, "资产发布", null) == false) { return("{\"resStatus\":\"2\"}"); } //加入资产表 P300 string max33SN = C101.FC10102("P300", 6, "G"); assetsDataObj.assetsSN = max33SN; assetsDataObj.publisherUserSN = userSN; assetsDataObj.publishDate = DateTime.Now; dbma1.P300s.InsertOnSubmit(assetsDataObj); //加入成长值表 F006 F006 f006 = new F006(); f006.groupUpSN = C101.FC10102("F006", 7, "UD"); f006.userSN = userSN; f006.businessSN = max33SN; f006.businessType = "资产发布"; f006.transactionMoneyAmount = publishAssetsFee; f006.groupUpValue = publishAssetsFee; f006.acquireDate = DateTime.Now; dbma1.F006s.InsertOnSubmit(f006); dbma1.SubmitChanges(); string assetsDataStr = C101.FC10107(dbma1.VP301001s.Where(c => c.assetsSN == max33SN).First() as VP301001); return(string.Format("{{\"resStatus\":\"{0}\",\"assetsData\":{1}}}", "0", assetsDataStr)); } }