示例#1
0
        public int ModiStation(Model.BussionObject.StationShow_BO model)
        {
            Model.BB_Station bmodel = new BB_Station()
            {
                ID                   = model.ID,
                StationArea          = model.StationArea,
                StationControlSystem = model.StationControlSystem,
                GasMainSize          = model.GasMainSize,
                NearGasArea          = model.NearGasArea,
                Name                 = model.Name,
                DeviceBindMode       = model.DeviceBindMode,
                ClientID             = model.ClientID,
                FactoryID            = model.FactoryID,
                Code                 = model.Code,
                Introduction         = model.Introduction,
                Latitude             = model.Latitude,
                Longtitude           = model.Longtitude,
                Remark               = model.Remark,
                Valid                = model.Valid
            };
            dal.Update(bmodel);
            var res = dal.SaveChanges();

            return(res);
        }
示例#2
0
        public Model.BussionObject.StationShow_BO ModiStation(int id)
        {
            var res = dal.Find(new object[] { id });

            Model.BussionObject.StationShow_BO mmodel = new Model.BussionObject.StationShow_BO()
            {
                ID                   = res.ID,
                StationArea          = res.StationArea,
                StationControlSystem = res.StationControlSystem,
                GasMainSize          = res.GasMainSize,
                NearGasArea          = res.NearGasArea,
                Name                 = res.Name,
                DeviceBindMode       = res.DeviceBindMode,
                ClientID             = res.ClientID,
                FactoryID            = res.FactoryID,
                Code                 = res.Code,
                Introduction         = res.Introduction,
                Latitude             = res.Latitude,
                Longtitude           = res.Longtitude,
                Remark               = res.Remark,
                Valid                = res.Valid
            };
            return(mmodel);
        }