protected void SubmitBtn_Click(object sender, EventArgs e) { string uname = (string)Session["Logged"]; string pass = (string)Session["lPwd"]; int aid = (int)Session["accId"]; AccountsBLL user = new AccountsBLL(); AccountsDAL a = user.retrieveUser(uname, pass); BuyerBLL buyer = new BuyerBLL(); BuyerDAL b = buyer.retrieveFinPlan(aid); string mainName = b.MainApplicantName; decimal mainSalary = b.MainApplicantSalary; string coName = b.CoApplicantName; decimal coSalary = b.CoApplicantSalary; decimal totSavings = b.totalSavings; decimal upfrontPayment = b.upfrontPaymentBudget; int loanServicePeriod = b.loanServicingPeriod; string useCpf = b.userCpfToService; decimal ab1 = decimal.Parse(theTotalSavings.Text); decimal ac1 = decimal.Parse(theUpfrontPaymentBudget.Text.Trim()); decimal asd = ab1 + ac1; decimal asdf = asd - (asd * 0.8m) + (asd * 0.0275m); Label1.Text = "Recommended Bufget: S$ " + asdf; }
public BuyerDAL retrieveFinPlan(int accId) { BuyerDAL p = new BuyerDAL(); BuyerDAL p1 = p.retrieveFinPlan(accId); return(p1); }
protected void Page_Load(object sender, EventArgs e) { string uname = (string)Session["Logged"]; string pass = (string)Session["lPwd"]; int aid = (int)Session["accId"]; AccountsBLL user = new AccountsBLL(); AccountsDAL a = user.retrieveUser(uname, pass); string fullname = a.fullName; string mobile = a.mobile; string email = a.email; string address = a.address; BuyerBLL buyer = new BuyerBLL(); BuyerDAL b = buyer.retrieveFinPlan(aid); string mainName = b.MainApplicantName; decimal mainSalary = b.MainApplicantSalary; string coName = b.CoApplicantName; decimal coSalary = b.CoApplicantSalary; decimal totSavings = b.totalSavings; decimal upfrontPayment = b.upfrontPaymentBudget; int loanServicePeriod = b.loanServicingPeriod; string useCpf = b.userCpfToService; UserName.Text = fullname; Mobile.Text = mobile; Email.Text = email; Address.Text = address; theMainApplicantName.Text = mainName; theMainApplicantSalary.Text = mainSalary.ToString(); theCoApplicantName.Text = coName; theCoApplicantSalary.Text = coSalary.ToString(); theTotalSavings.Text = totSavings.ToString(); theUpfrontPaymentBudget.Text = upfrontPayment.ToString(); theLoanServicePeriod.Text = loanServicePeriod.ToString(); //Page lastPage = (Page)Context.Handler; //string asd = ((TextBox)lastPage.FindControl("loginTextbox")).Text; //SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["MYDBConnection"].ConnectionString); //conn.Open(); //SqlDataAdapter sda = new SqlDataAdapter("SELECT * FROM Accounts WHERE userName ='******'", conn); //DataTable dt = new DataTable(); //sda.Fill(dt); //name1 = dt.Rows[0][3].ToString(); //theName.Text = name1; }
public static DataTable GetBuyerInfo(string buyerNick, string status, string area, string grade, string group, string tradeAmount1, string tradeAmount2, string buerNick2, string buyCount) { if (Convert.ToDateTime("2015-06-20") > Convert.ToDateTime("2015-03-31")) { return(BuyerDAL.GetBuyerInfo(buyerNick, status, area, grade, group, tradeAmount1, tradeAmount2, buerNick2, buyCount, Users.SellerId)); } else { return(BuyerOldDAL.GetBuyerInfo(buyerNick, status, area, grade, group, tradeAmount1, tradeAmount2, buerNick2, buyCount)); } }
public bool createFinPlan(int accId, int loanServicePeriod, string useCpf) { bool result = false; // string passwordHash = generatePasswordHash(password, salt); BuyerDAL buyer = new BuyerDAL(); if (buyer.createFinPlan(accId, loanServicePeriod, useCpf) == 1) { result = true; } else { result = false; } return(result); }
public static int GetBuyerTotalCount(string sellerNick) { return(BuyerDAL.GetBuyerTotalCount(sellerNick, Users.SellerId)); }
public static DataTable GetBuyerInfoToMsg(string buyerNick, string lastTradeDate1, string lastTradeDate2, string grade, string num1, string num2, string area, string tradeAmount1, string tradeAmount2, string buerNick2, string drpDay, string tradePinNv, string buyCount) { return(BuyerDAL.GetBuyerInfoToMsg(buyerNick, lastTradeDate1, lastTradeDate2, grade, num1, num2, area, tradeAmount1, tradeAmount2, buerNick2, drpDay, tradePinNv, buyCount, Users.SellerId)); }
public static bool UpdateForHistory(Buyers o, string Seller_Id) { return(BuyerDAL.UpdateForHistory(o, Seller_Id)); }
/// <summary> /// 通过SQL获取会员数据 /// </summary> /// <param name="sql"></param> /// <returns></returns> public static DataTable GetExportBuyers(string sql, int o) { return(BuyerDAL.GetExportBuyers(sql)); }
public static bool Add(Buyers o, string strNick, string gorupid, string SellerId) { return(BuyerDAL.Add(o, strNick, gorupid, SellerId)); }
/// <summary> /// 按时间查询买家信息 /// 20160701 yao c /// </summary> /// <param name="seller_nick">买家昵称</param> /// <param name="startTime">开始时间</param> /// <param name="endTIme">结束时间</param> /// <param name="seller_id">卖家id</param> /// <returns>买家信息</returns> public static DataTable GetExportBuyers(string seller_nick, string startTime, string endTIme, string seller_id) { return(BuyerDAL.GetExportBuyers(seller_nick, startTime, endTIme, "all", null, null, seller_id)); }
public static string GetBuyerNickByID(string buyerID) { return(BuyerDAL.GetBuyerNickByID(buyerID, Users.SellerId)); }
public static bool UpdateBuyerDetails(Buyers o) { return(BuyerDAL.UpdateBuyerDetails(o, Users.SellerId)); }
public static String GetBuyerCount(string flag, string sellerNick) { return(BuyerDAL.GetBuyerCount(flag, sellerNick, SellersDAL.GetSellerIdByNick(sellerNick))); }
public static DataTable GetBuyerListFromDB(Buyers entity) { return(BuyerDAL.GetBuyerByBuyerID(entity, Users.SellerId)); }
public static bool Update(Buyers obj) { return(BuyerDAL.Update(obj, Users.SellerId)); }
public static DataTable GetSellerNoDetailsInfo(string Seller_Id) { return(BuyerDAL.GetSellerNoDetailsInfo(Seller_Id)); }
public static Boolean UpdateBuyerToBlackList(string buyerId) { return(BuyerDAL.UpdateBuyerToBlackList(buyerId, Users.SellerId)); }
public static DataTable GetExportBuyers(string SELLER_ID) { return(BuyerDAL.GetExportBuyers(SELLER_ID, Users.SellerId)); }
/// <summary> /// 获取所有买家信息 /// 20160626 yao c /// </summary> /// <param name="seller_nick">卖家昵称</param> /// <param name="seller_id">卖家id</param> /// <returns>买家信息</returns> public static DataTable GetExportBuyers(string seller_nick, string seller_id) { return(BuyerDAL.GetExportBuyers(seller_nick, seller_id)); }
public static Boolean CheckTheSameHPNoIsExit(string sellerNick, string cellphone) { BuyerDAL objBuyerDal = new BuyerDAL(); return(objBuyerDal.CheckTheSameHPNoIsExit(sellerNick, cellphone, Users.SellerId)); }
public static DataTable GetExportBuyers(string SELLER_ID, string startDate, string endDate, string area, string tradeFrom, string tradeTo) { return(BuyerDAL.GetExportBuyers(SELLER_ID, startDate, endDate, area, tradeFrom, tradeTo, Users.SellerId)); }
public IController CreateController(System.Web.Routing.RequestContext requestContext, string controllerName) { Type controllerType = Type.GetType(string.Concat(_controllerNamespace, ".", controllerName, "Controller")); dynamic service = new CustomerProductDAL(); switch (controllerName) { case "CustomerProducts": { service = new CustomerProductDAL(); break; } case "Orders": { service = new OrderDAL(); break; } case "Home": { service = new DashBoardDAL(); break; } case "Categories": { service = new CategoryDAL(); break; } case "Products": { service = new ProductDAL(); break; } case "BulkBuys": { service = new BulkBuyDAL(); break; } case "Buyers": { service = new BuyerDAL(); break; } case "Sellers": { service = new SellerDAL(); break; } case "Borrowers": { service = new BorrowerDAL(); break; } case "ProductTypes": { service = new ProductTypeDAL(); break; } case "Customers": { service = new CustomerDAL(); break; } case "Account": { service = new AccountDAL(); break; } case "Manage": { service = new ManageDAL(); break; } case "Vendors": { service = new VendorDAL(); break; } } IController controller = Activator.CreateInstance(controllerType, new[] { service }) as Controller; return(controller); }
/// <summary> /// 卖家手动添加其他店铺的买家基本信息 /// </summary> /// <param name="o"></param> /// <returns></returns> public static bool AddBuyerOtherShop(Buyers o) { BuyerDAL objBuyerDal = new BuyerDAL(); return(objBuyerDal.AddBuyerOtherShop(o, Users.SellerId)); }
public static bool UpdateGrade(Buyers o) { return(BuyerDAL.UpdateGrade(o, Users.SellerId)); }
public static Boolean CheckBuyerIsExit(string buyer_nick, string sellerNick, string Seller_Id) { return(BuyerDAL.CheckBuyerIsExit(buyer_nick, sellerNick, Seller_Id)); }
public static string GetBuyerIdByBuyerNick(string buyerNick, string sellerNick) { return(BuyerDAL.GetBuyerIdByBuyerNick(buyerNick, sellerNick, Users.SellerId)); }
public static DataTable GetBuyerInfoBySellerNick(string sellerNick) { return(BuyerDAL.GetBuyerInfoBySellerNick(sellerNick, Users.SellerId)); }
/// <summary> /// 同步会员信息 /// </summary> /// <param name="strNick"></param> /// <param name="strSessionKey"></param> /// <param name="obj"></param> /// <param name="allTrades"></param> /// <returns></returns> public static bool SynchronizeBuyerInfoWithSeller(string strNick, string strSessionKey, List <CrmMember> obj, List <Trade> allTrades) { try { int synCount = 0; string sellerId = SellersDAL.GetSellerIdByNick(strNick); Buyers membs = null; if (obj != null && obj.Count > 0) { foreach (var o in obj) { try { //检查卖家是否存在当前买家信息 if (!BuyerDAL.CheckBuyerIsExit(o.BuyerNick.ToString(), strNick, sellerId)) { //此处开始处理数据 membs = new Buyers(); //membs.BuyerId = o.BuyerId;官方接口停止返回 Random random = new Random(); string id = DateTime.Now.Ticks.ToString().Substring(0, DateTime.Now.Ticks.ToString().Length - 4) + random.Next(1, 100).ToString(); membs.BuyerId = Convert.ToInt64(id); membs.Buyer_nick = o.BuyerNick; membs.AvgPrice = o.AvgPrice; membs.Status = o.Status; membs.CloseTradeCount = o.CloseTradeCount; membs.CloseTradeAmount = o.CloseTradeAmount; membs.ItemCloseCount = o.ItemCloseCount; membs.LastTradeTime = o.LastTradeTime; membs.ItemNum = o.ItemNum; membs.TradeAmount = o.TradeAmount; membs.Grade = o.Grade; membs.Province = o.Province; membs.City = o.City; membs.TradeCount = o.TradeCount; //在交易订单中找买家详情信息 Trade buyerInfo = GetBuyerInfoByNick(allTrades, o.BuyerNick); if (buyerInfo != null) { //如果有交易订单 membs.Buyer_reallName = buyerInfo.ReceiverName; membs.CellPhone = buyerInfo.ReceiverMobile; membs.Address = buyerInfo.ReceiverState + buyerInfo.ReceiverCity + buyerInfo.ReceiverDistrict + buyerInfo.ReceiverAddress; membs.BuyerProvince = buyerInfo.ReceiverState.Equals("0") ? "其它" : buyerInfo.ReceiverState; membs.Buyer_credit = "1"; //membs.Buyer_email = buyerInfo.BuyerEmail; } //写入买家基数信息 bool re = BuyerDAL.Add(membs, strNick, UpdateGroup(o), sellerId); //groupNo:== 1:新客户;> 1:老客户;== 0:潜在客户;3个月未购买:休眠3个月:此处为系统默认分组,不能删除,卖家可以自定义分组,可以删除。 if (re) { synCount++; } } } catch (Exception ex) { continue; } } } Console.WriteLine("新增卖家:" + strNick + "会员数量" + synCount); ExceptionManager exceptionManager = new ExceptionManager(); exceptionManager.WriteFileLog(strNick, allTrades.Count.ToString(), synCount.ToString()); return(true); } catch { return(false); } }