public void InsertNewCosts() { var toCreate = _reader.CostDescriptions.Where(d => d.Id == 0); foreach (var description in toCreate) { description.Id = CostCollumnCreator.CreateCost(_connection, _priceInfo.PriceCode, (int)_priceInfo.CostType, description.Name, true, true); } }
protected void CreateCost_Click(object sender, EventArgs e) { var collumnCreator = new CostCollumnCreator(field => NotificationHelper.NotifyAboutRegistration( String.Format("\"{0}\" - регистрация ценовой колонки", field.ShortName), String.Format( @"Оператор: {0} Поставщик: {1} Регион: {2} Прайс-лист: {3} ", field.OperatorName, field.ShortName, field.Region, field.PriceName))); collumnCreator.CreateCost(priceId, SecurityContext.Administrator.UserName); PostDataToGrid(); }