示例#1
0
        static void UpdateTest()
        {
            MssqlUpdate update = new MssqlUpdate();
            Customers   cus    = new Customers();

            cus.ID             = "0000006eb74e49e8a6504cabf402d08d";
            cus.UserName       = "******";
            cus.Phone          = "1685425632";
            cus.LastModifyTime = DateTime.Now;
            update.UpdateObject <Customers>(cus);
            update.SaveChange();
        }
示例#2
0
        /**
         * @ 修改
         * */
        public override bool Update(IEnumerable <PermitData> menu)
        {
            bool succeess = true;

            if (menu.IsNullOrEmpty())
            {
                return(succeess);
            }

            MssqlUpdate update = new MssqlUpdate(TableName);

            foreach (var item in menu)
            {
                update.UpdateObject <PermitData>(item);
                update.AddWhere(Primarykey, item.ID);
                update.SaveChange();
            }

            return(succeess);
        }