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(); } }
//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"); } }
/// <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 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(); } }
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 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 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 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 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(); } }
//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"); } }
//添加一条投资方查看顾问信息资格表记录,P104 private string AddRecord(DBMA1DataContext dbma1, string investorUserSN, string consultantUserSN, string crSN) { string max33SN = C101.FC10102("P104", 7, "CA"); P104 p104 = new P104(); p104.qualificationSN = max33SN; p104.investorUserSN = investorUserSN; p104.consultantUserSN = consultantUserSN; p104.creditRightSN = crSN; p104.operateDate = DateTime.Now; dbma1.P104s.InsertOnSubmit(p104); return(max33SN); }
//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)); } }
//申请 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 FM100405(string roleSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //岗位已经删除 var data = dbma1.B004s.Where(c => c.roleTypeSN == roleSN && c.deleteDate == null).FirstOrDefault(); if (data == null) { return("1"); } //该岗位有用户 var data1 = (from c in dbma1.B004s from o in c.B003s where c.roleTypeSN == roleSN && c.deleteDate == null && o.deleteDate == null select c).FirstOrDefault(); if (data1 != null) { return("2"); } var data2 = (from c in dbma1.B004s where c.roleTypeSN == roleSN select c).First(); data2.deleteDate = DateTime.Now; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "B004"; b000.pkSN = data2.roleTypeSN; b000.actionTypeSN = "B1D"; 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"); } }
//申请 P802010304 public string FP802010304(string SellingSvrData, string pwd) { string userSN = session["userSN"].ToString(); U002 svrObj = C101.FC10108(SellingSvrData, typeof(U002)) as U002; using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //密码是否正确 if (C201.FC20146(dbma1, userSN, pwd) == false) { return("0"); } //扣款 A027 a027 = dbma1.A027s.First(); if (C201.FC20147(dbma1, userSN, Convert.ToDecimal(a027.openServerCost), "出售申请", null) == false) { return("0"); } //更新用户信息基本表 U002 SellSvrUpdateU002(dbma1, svrObj, userSN); //更新服务表 U001 SellSvrUpdateU001(dbma1, 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(a027.openServerCost); f006.groupUpValue = a027.openServerCost; f006.acquireDate = DateTime.Now; dbma1.F006s.InsertOnSubmit(f006); dbma1.SubmitChanges(); return("1"); } }
public string FP90102(decimal rechargeAmount, string cardType, string bankId) { string userSN = session["userSN"].ToString(); using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { F005 f005 = new F005(); f005.rechargeSN = C101.FC10102("F005", 7, "UC"); f005.userSN = userSN; f005.rechargeAmount = rechargeAmount; f005.rechargeDate = DateTime.Now; f005.cardType = cardType; f005.bankId = bankId; dbma1.F005s.InsertOnSubmit(f005); dbma1.SubmitChanges(); return(string.Format("{0}%{1}", f005.rechargeSN, userSN)); } }
//成功:"0"; 客户经理无效:"1" public string FM020504(string userSN, string workNum) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { int internalUserSN = dbma1.internal_users.Where(c => c.work_num == workNum).First().internal_user_id; //查看客户经理是否有效 var data = (from c in dbma1.B003s where c.deleteDate == null && c.internalUserSN == internalUserSN && c.roleTypeSN.Trim() == "B01" select c).FirstOrDefault(); if (data == null) { return("1"); } //修改客户经理 B005 b005 = (from c in dbma1.B005s where c.userSN == userSN select c).First(); b005.internalUserSN = internalUserSN; b005.assignDate = DateTime.Now; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "B005"; b000.pkSN = b005.userSN; b000.actionTypeSN = "B0D"; 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"); } }
public void FM020412(string userSN, string status) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.U001s.Where(c => c.userSN == userSN).First(); data.consultantStatus = status == "1" ? true : false; B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "U001"; b000.pkSN = data.userSN; b000.actionTypeSN = status == "1" ? "B0B" : "B0C"; int internalUserSN = Convert.ToInt32(session["internalUserId"].ToString()); //int internalUserSN = 1032; b000.operatorSN = internalUserSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); } }
public void FP70201() { string userSN = session["userSN"].ToString(); //string userSN = "U00004"; using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { decimal rewardAmount = Convert.ToInt32(dbma1.A031s.First().regPresentV); //更新账户表 F000 F000 f000 = dbma1.F000s.Where(c => c.userSN == userSN).First(); f000.balance += rewardAmount; f000.lastOperate = DateTime.Now; //添加奖励表 F004 string F004Max33SN = C101.FC10102("F004", 7, "UB"); F004 f004 = new F004(); f004.rewardSN = F004Max33SN; f004.userSN = userSN; f004.rewardAmount = rewardAmount; f004.rewardDate = DateTime.Now; f004.rewardType = "注册赠送"; dbma1.F004s.InsertOnSubmit(f004); //添加收支明细表 F003 string F003Max33SN = C101.FC10102("F003", 8, "UA"); F003 f003 = new F003(); f003.revenueExpenditureSN = F003Max33SN; f003.generetorUserSN = userSN; f003.generateDate = DateTime.Now; f003.type = "注册赠送"; f003.revenue = rewardAmount; f003.balance = f000.balance; f003.referSN = F004Max33SN; dbma1.F003s.InsertOnSubmit(f003); dbma1.SubmitChanges(); } }
//0:成功; 1:客户经理有服务的客户,无法删除; public string FM100402(string roleSN, int internalUserSN) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { if (roleSN.Trim() == "B01") { var dataTemp = dbma1.B005s.Where(c => c.internalUserSN == internalUserSN).FirstOrDefault(); if (dataTemp != null) { return("1"); } } var data = dbma1.B003s.Where(c => c.roleTypeSN == roleSN && c.internalUserSN == internalUserSN && c.deleteDate == null).FirstOrDefault(); if (data == null) { return("0"); } data.deleteDate = DateTime.Now; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "B003"; b000.pkSN = data.roleAssignmentSN; b000.actionTypeSN = "B1A"; 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"); } }
//更新顾问申请备案表 U006 private void ConsultantSvrApplyRecUpdateU006(DBMA1DataContext dbma1, U002 consultantSvrObj, string userSN) { U006 u006 = new U006(); U002 u002 = dbma1.U002s.Where(c => c.userSN == userSN).First(); u006.recordSN = C101.FC10102("U006", 6, "UE"); u006.userSN = userSN; u006.name = u002.name; u006.birthday = u002.birthday; u006.gender = u002.gender; u006.registeredResidence = u002.registeredResidence.Trim(); u006.idCard = u002.idCard; u006.phone = u002.phone; u006.email = consultantSvrObj.email; u006.maritalStatusType = dbma1.A000s.Where(c => c.maritalStatusTypeSN == consultantSvrObj.maritalStatusTypeSN).First().value; u006.procreateStatus = consultantSvrObj.procreateStatus; u006.currentAddressProvince = dbma1.A021s.Where(c => c.provinceSN == consultantSvrObj.currentAddressProvinceSN).First().name; u006.currentAddressCity = dbma1.A022s.Where(c => c.citySN == consultantSvrObj.currentAddressCitySN).First().name; u006.currentAddressDetails = consultantSvrObj.currentAddressDetails; u006.workEnterprise = consultantSvrObj.workEnterprise; u006.enterpriseType = dbma1.A004s.Where(c => c.enterpriseTypeSN == consultantSvrObj.enterpriseTypeSN).First().value; u006.industryType = dbma1.A013s.Where(c => c.industryTypeSN == consultantSvrObj.industryTypeSN).First().value; u006.workTel = consultantSvrObj.workTel; u006.hiredate = consultantSvrObj.hiredate; u006.post = consultantSvrObj.post; u006.graduateSchool = consultantSvrObj.graduateSchool; u006.degreeType = dbma1.A002s.Where(c => c.degreeTypeSN == consultantSvrObj.degreeTypeSN).First().value; u006.serviceProvince = dbma1.A021s.Where(c => c.provinceSN == consultantSvrObj.serviceProvinceSN).First().name; u006.serviceCity = consultantSvrObj.serviceCitySN == "" ? null : dbma1.A022s.Where(c => c.citySN == consultantSvrObj.serviceCitySN).First().name; u006.investigate = consultantSvrObj.investigate; u006.assetsEvaluate = consultantSvrObj.assetsEvaluate; u006.creditRightGuarantee = consultantSvrObj.creditRightGuarantee; u006.badLoanCollect = consultantSvrObj.badLoanCollect; u006.consultantDetails = consultantSvrObj.consultantDetails; u006.applyDate = DateTime.Now; dbma1.U006s.InsertOnSubmit(u006); }
public string FM020409(string userSN, string act, string auditNote) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { int?operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int? operatorSN = 1032; //更新U006 U006 u006 = (from c in dbma1.U006s where c.userSN == userSN orderby c.applyDate descending select c).First(); u006.auditStatus = Convert.ToInt16(act == "1" ? "2" : "3"); u006.auditDate = DateTime.Now; u006.auditerUserSN = operatorSN; u006.auditNote = auditNote; //更新U001 U001 u001 = dbma1.U001s.Where(c => c.userSN == userSN).First(); u001.consultantApplyStatus = Convert.ToInt16(act == "1" ? "2" : "3"); //添加B000 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "B005"; b000.pkSN = u006.recordSN; b000.actionTypeSN = act == "1" ? "B0E" : "B0F"; b000.operatorSN = Convert.ToInt32(operatorSN); b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); string name = dbma1.internal_users.Where(c => c.internal_user_id == Convert.ToInt32(operatorSN)).First().name; dbma1.SubmitChanges(); return(name); } }
public void FM091003(decimal serviceRate) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.A027s.First(); data.serviceRate = serviceRate; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A027"; b000.pkSN = data.sellingParamsSN.ToString(); b000.actionTypeSN = "B0S"; 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 FM090802(decimal shortMessageCost) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.A028s.First(); data.shortMessageCost = shortMessageCost; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A028"; b000.pkSN = data.moneyParamsSN.ToString(); b000.actionTypeSN = "B0U"; 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 FM091101(int mode) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.configs.First(); data.cusSvrMode = mode; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "configs"; b000.pkSN = data.config_id.ToString(); b000.actionTypeSN = "B0W"; 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 FM090401(bool switchStatus) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.A034s.First(); data.switchStatus = switchStatus; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A034"; b000.pkSN = data.SN; b000.actionTypeSN = "B18"; 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 FM090904(int value, decimal rate) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.A029s.First(); data.vip3_originateValue = value; data.vip3_rewardRate = rate; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A029"; b000.pkSN = data.vipParamsSN.ToString(); b000.actionTypeSN = "B13"; 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 FP50202(string reserveSN) { string consultantUserSN = session["userSN"].ToString(); //string consultantUserSN = "U00003"; using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { //有效性检查(1、未被接受。2、顾问预约未被取消或者拒绝。3、债权预约未被取消或者拒绝。) var data1 = dbma1.P500s.Where(c => c.reserveSN == reserveSN).FirstOrDefault(); var data2 = dbma1.P101s.Where(c => c.reserveSN == reserveSN && (c.senderCancelReserveDate != null || c.receiverRefuseReserveDate != null)).FirstOrDefault(); var crReserveSN = dbma1.P101s.Where(c => c.reserveSN == reserveSN).First().creditRightReserveSN; var data3 = dbma1.P203s.Where(c => c.reserveSN == crReserveSN && (c.senderCancelReserveDate != null || c.receiverRefuseReserveDate != null)).FirstOrDefault(); var data4 = dbma1.P100s.Where(c => c.reserveSN == crReserveSN && (c.senderCancelReserveDate != null || c.receiverRefuseReserveDate != null)).FirstOrDefault(); if (data1 != null || data2 != null || data3 != null || data4 != null) { return; } var linqData = dbma1.P101s.Where(c => c.reserveSN == reserveSN).First(); string investorUserSN = linqData.senderUserSN; string crSN = linqData.creditRightSN; string max33SN = C101.FC10102("P500", 6, "K"); P500 p500 = new P500(); p500.serverSN = max33SN; p500.reserveSN = reserveSN; p500.consultantUserSN = consultantUserSN; p500.investorUserSN = investorUserSN; p500.creditRightSN = crSN; p500.acceptReserveDate = DateTime.Now; dbma1.P500s.InsertOnSubmit(p500); dbma1.SubmitChanges(); } }
//"0":成功; “1“:相同名称的岗位已经存在 public string FM100404(string roleName, string note) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { B004 b004 = new B004(); var data = dbma1.B004s.Where(c => c.value == roleName && c.deleteDate == null).FirstOrDefault(); if (data != null) { return("{\"status\":\"1\"}"); } b004.roleTypeSN = C101.FC10102("B004", 2, "B"); b004.value = roleName; b004.note = note; b004.assignDate = DateTime.Now; dbma1.B004s.InsertOnSubmit(b004); //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "B004"; b000.pkSN = b004.roleTypeSN; b000.actionTypeSN = "B1C"; int operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int operatorSN = 1032; b000.operatorSN = operatorSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); return(string.Format("{{\"status\":\"0\",\"SN\":\"{0}\"}}", b004.roleTypeSN)); } }
public void FM090701(decimal openServerCost, decimal assetsReserveCost) { using (DBMA1DataContext dbma1 = new DBMA1DataContext()) { var data = dbma1.A026s.First(); data.openServerCost = openServerCost; data.assetsReserveCost = assetsReserveCost; //添加后台修改记录 B00 B000 b000 = new B000(); b000.bgOperateSN = C101.FC10102("B000", 5, "B"); b000.tableName = "A026"; b000.pkSN = data.purchaseParamsSN.ToString(); b000.actionTypeSN = "B0P"; int operatorSN = Convert.ToInt32(session["internalUserId"].ToString()); //int operatorSN = 1032; b000.operatorSN = operatorSN; b000.operateDate = DateTime.Now; dbma1.B000s.InsertOnSubmit(b000); dbma1.SubmitChanges(); } }