Ejemplo n.º 1
0
 /// <summary>
 /// 保存一条房源需求(求租和求购)
 /// </summary>
 /// <param name="model"></param>
 public void SaveHouseDemand(HouseDemandModel model)
 {
     DAL.HouseDemandDAL dal = new DAL.HouseDemandDAL();
     model.CreateTime = DateTime.Now;
     if (model.HouseDemandId == "")
     {
         model.HouseDemandId = TimeString.GetNow_ff();
         dal.Add(model);
     }
     else
     {
         dal.Update(model);
     }
 }
Ejemplo n.º 2
0
        private void CaijiMove()
        {
            Model.MovInfoModel model = new Model.MovInfoModel();
            BLL.MovBLL         bll   = new BLL.MovBLL();


            model = bll.GetMovInfoModel(ReStr("MovId"));

            model.MovId         = ReStr("MovId"); //这是必须的
            model.CreateTime    = DateTime.Now;
            model.MovBiaoQian   = ReStr("MovBiaoQian", "");
            model.MovContent    = ReStr("MovContent", "");
            model.PianChang     = ReInt("PianChang", 0);
            model.MovImgUrl     = ImgHelper.downOneImg(ReStr("MovImgUrl"), "/upload/httpDown/Mov/");
            model.MovTitle      = ReStr("MovTitle");
            model.MovType       = ReStr("MovType");
            model.ShangYingTime = ReTime("ShangYingTime", DateTime.Now);
            model.ShiGuangId    = ReStr("MovId");
            model.MovClass      = ReStr("MovClass", "");
            DAL.MovInfoDAL dal = new DAL.MovInfoDAL();

            DataTable dtEv = ReTable("MovEventArrayStr");

            if (dtEv != null)
            {
                bll.DelMovEvent(" MovId='" + model.MovId + "' ");
                foreach (DataRow dr in dtEv.Rows)
                {
                    Model.MovEventModel EvModel        = new Model.MovEventModel();
                    DateTime            MovEventBgTime = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd " + dr["MovEventBgTime"] + ":00"));

                    EvModel.MovEventBgTime  = MovEventBgTime;
                    EvModel.MovEventId      = TimeString.GetNow_ff();
                    EvModel.MovEventMemo    = dr["MovEventMemo"].ToString();
                    EvModel.MovEventRePrice = Convert.ToDecimal(dr["MovEventRePrice"]);
                    EvModel.MovId           = model.MovId;
                    bll.AddMovEvent(EvModel);
                }
            }
            bll.SaveMovInfo(model);

            ReTrue();
        }