예제 #1
0
        private void disp(CarDetialInfo c)
        {
            var carlist = new CarTypeInfoDb().GetCarinfoList("0");

            title.Text      = c.ProTitle;
            Literal1.Text   = c.baojia.ToString("#0.00");
            huanjia.Text    = "(还价不多)";
            sellnumber.Text = c.SellerNumber;
            ProNum.Text     = c.ProNum?.Replace(c.SellerNumber, "") ?? "";
            shangpaiym.Text = c.ShangPaiYear + "年" + c.ShangPaiMonth + "月";
            var ct = carlist.FirstOrDefault(x => x.CarTypeKey == c.CarType);

            cartype.Text         = ct.DisplayName;
            country.Text         = c.country;
            CarColor.Text        = c.CarColor;
            PaiLiang.Text        = c.PaiLiang;
            BianShuQi.Text       = c.BianShuQi;
            LiCheng.Text         = c.LiCheng.ToString("0.00");
            PaiFangBiaoZhun.Text = c.PaiFangBiaoZhun;
            RanYou.Text          = c.RanYou;
            cdate.Text           = c.CreateTime.ToShortDateString();
            yangqing.Text        = c.Remark.Replace("\\n", "");
            SellerName.Text      = c.SellerName;
            tel.Text             = c.SellerPhone;
            Address.Text         = c.CarSellAddress;
        }
예제 #2
0
        public void ProcessRequest(HttpContext context)
        {
            int           TotalRecord; int TotalPage;
            JObject       o;
            var           ls      = GetDbData(context.Request, out TotalRecord, out TotalPage);
            var           carlist = new CarTypeInfoDb().GetCarinfoList("0");
            StringBuilder sb      = new StringBuilder();
            JArray        ar      = new JArray();

            foreach (var v in ls)
            {
                o = new JObject();
                var car = carlist.FirstOrDefault(x => x.CarTypeKey == v.CarType);
                o["ProTitle"]     = v.ProTitle;   //data.act.ToString();
                o["SellerName"]   = v.SellerName; //data.act.ToString();
                o["Id"]           = v.Id;
                o["Carname"]      = car == null?"":car.DisplayName;
                o["ShangPaiTime"] = v.ShangPaiTime;
                o["CarColor"]     = v.CarColor;
                o["baojia"]       = v.baojia;
                o["BianShuQi"]    = v.BianShuQi;
                o["CreateTime"]   = v.CreateTime.ToShortDateString();
                o["ProNum"]       = v.ProNum;
                o["SellerNumber"] = v.SellerNumber;
                var str = v.Images.Split(';');
                o["pic1"] = str.Length > 0?str[0]:"";
                o["pic2"] = str.Length > 1 ? str[1] : "";
                o["pic3"] = str.Length > 2 ? str[2] : "";
                o["r"]    = TotalRecord.ToString();
                o["p"]    = TotalPage.ToString();
                ar.Add(o);
            }
            context.Response.ContentType = "text/plain";
            context.Response.Write(ar.ToString());
        }