Пример #1
0
 public static int Insert(Company company)
 {
     var db = DataBaseHelper.Open();
     company.Id = LastIdSvc.GetNextTableId("Companies");
     db.Companies.Insert(company);
     return company.Id;
 }
Пример #2
0
        public CompanyEditModel(Company company)
            : this()
        {
            this.Id = company.Id;
            this.CompanyName = company.CompanyName;
            this.CompanyType = company.CompanyType;
            this.ProvinceId = company.Province.Id;
            this.CityId = company.City.Id;
            this.DistrictId = company.Dictrict.Id;
            this.Email = company.Email;
            this.Address = company.Address;
            this.Telephone = company.Telephone;

            this.CityList = Utilts.LoadCityByProvinceId(this.ProvinceId);
            this.DistrictList = Utilts.LoadDistrictByCityId(this.CityId);
        }
Пример #3
0
 public static void Update(Company company)
 {
     var db = DataBaseHelper.Open();
     db.Companies.Update(company);
 }