Example #1
0
        public bool Update(AMW.Model.Entity.MldProductImg model)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            if (model.PidValueFlag)
            {
                dic.Add("Pid", model.Pid);
            }
            if (model.ImgValueFlag)
            {
                dic.Add("Img", model.Img);
            }
            return(DBHelper.Update("MldProductImg").Set(dic).Where("id=@1", model.ID).Execute() > 0);
        }
Example #2
0
        public int Add(AMW.Model.Entity.MldProductImg model)
        {
            Dictionary <string, object> dic = new Dictionary <string, object>();

            if (model.PidValueFlag)
            {
                dic.Add("Pid", model.Pid);
            }
            if (model.ImgValueFlag)
            {
                dic.Add("Img", model.Img);
            }
            return(DBHelper.InsertInto("MldProductImg", dic));
        }