Exemplo n.º 1
0
        public MVCBase.Domain.Entity.Fr_ContentData Sransform(Furniture_Form form)
        {
            var model = new MVCBase.Domain.Entity.Fr_ContentData();
            if (!form.furniture_id.Equals(0))
            {
                DAL.Furniture dal = new DAL.Furniture();
                model = dal.GetSingleById(form.furniture_id);
            }
            model.Fc_ID = form.furniture_id;
            model.Fc_company = form.furniture_company;
            model.Fc_type_FK = form.furniture_type;
            model.Fc_tel = form.furniture_tel;
            model.Fc_email = form.furniture_email;
            model.Fc_address = form.furniture_address;
            model.Fc_url = form.furniture_url;
            model.Fc_local = form.furniture_local;
            model.Fc_summary = form.furniture_summary;
            model.Fc_history = form.furniture_history;
            model.Fc_concept = form.furniture_concept;
            model.Fc_description = form.furniture_description;
            model.Fc_ImageUrl = form.furniture_imageurl;
            model.Fc_pdesign = Common.MVCCommon.BindCheckBox_Entity(form.furniture_pdesign);
            model.Fc_ndesign = Common.MVCCommon.BindCheckBox_Entity(form.furniture_ndesign);
            model.Fc_sdesign = Common.MVCCommon.BindCheckBox_Entity(form.furniture_sdesign);
            model.Fc_display = model.Fc_ID.Equals(0) ? true : model.Fc_display;
            model.Fc_createtime = model.Fc_createtime.HasValue ? model.Fc_createtime : DateTime.Now;
            model.Fc_color = form.furniture_color;

            return model;
        }
Exemplo n.º 2
0
 public void Update(Fr_ContentData data)
 {
     session.Update(data);
     session.Flush();
 }
Exemplo n.º 3
0
 public void Save(Fr_ContentData data)
 {
     session.SaveOrUpdate(data);
     session.Flush();
 }
Exemplo n.º 4
0
 public Fr_ContentData GetSingleById(int Fc_ID)
 {
     var model = session.Get<Fr_ContentData>(Fc_ID);
     if (model == null)
         model = new Fr_ContentData();
     return model;
 }
Exemplo n.º 5
0
 public void Add(Fr_ContentData data)
 {
     session.Save(data);
     session.Flush();
 }