Пример #1
0
        public Model.MessageShow EditSaveMethod(Model.Rfid_bound data)
        {
            MessageShow msg = new MessageShow();

            if (data.Id <= 0)//The current user already exists
            {
                string insertStr = "INSERT INTO Rfid_tag(werks,zpltn,matnr,exidv,pt,bin,bounded,intime,inbin,tag_id) VALUES(@Code,@Empty_pt,@bin,@Actived,@Created)";
                msg.success = this.SqlExecute <int>(insertStr, data) > 0;
                msg.message = msg.success ? "添加成功" : "添加失败";
            }
            else
            {
                msg.success = this.SqlExecute <int>("UPDATE Rfid_tag SET code=@Code,empty_pt=@Empty_pt,bin=@Bin,actived=@Actived,created=@Created WHERE id=@Id", data) > 0;
                msg.message = msg.success ? "编辑成功" : "编辑失败";
            }
            return(msg);
        }
Пример #2
0
 public Model.MessageShow EditSaveMethod(Model.Rfid_bound data)
 {
     return(dal.EditSaveMethod(data));
 }