Exemple #1
0
        /// <summary>
        /// 编辑一位区域类型
        /// </summary>
        public void EditorRegion(StationRegion region)
        {
            LoginedUserInfo u = Tools.GetLoginedUserInfo();

            entities.Logs.Add(new Log
            {
                UGuid    = u.UGuid,
                Username = u.UName,
                Memo     = $"编辑编号为【{region.Id}】的区域类型",
                OptType  = (int)OptType.修改,
                OptTime  = System.DateTime.Now
            });
            entities.SaveChanges();
        }
Exemple #2
0
        public void DelRegion(StationRegion region)
        {
            entities.StationRegions.Remove(region);
            LoginedUserInfo u = Tools.GetLoginedUserInfo();

            entities.Logs.Add(new Log
            {
                UGuid    = u.UGuid,
                Username = u.UName,
                Memo     = $"删除编号为【{region.Id}】-名称为【{region.RegionName}】的区域类型",
                OptType  = (int)OptType.除,
                OptTime  = System.DateTime.Now
            });
            entities.SaveChanges();
        }