private void CreateOneNewRow(Y_NORM_NORMATIVE_HEAD normativeDataContext)
 {
     var id = IdGenerator.GetId(normativeDataContext.Y_NORM_NORMATIVE_ROW);
     var row = new Y_NORM_NORMATIVE_ROW { ID_ROW = id, SEQ_NUM = id, MAX_COLUMN = 1, SKU = 0, DELTA = 0 };
     normativeDataContext.Y_NORM_NORMATIVE_ROW.Add(row);
     var rowControl = new RowControl { DataContext = row };
     normPanel.Children.Add(rowControl);
 }
 private void SetProfileContent(Y_NORM_NORMATIVE_HEAD norm)
 {
     profileGrpBox.Header = "Профиль: " + norm.Y_NORM_PROFILE_HEAD;
     paramProfileLabel.Content = "Параметры: ";
     foreach (Y_NORM_PROFILE_DETAIL profileParam in norm.Y_NORM_PROFILE_HEAD.Y_NORM_PROFILE_DETAIL)
     {
         SetProfileParamInHead(profileParam);
     }
 }
 private void CreateRowControls(Y_NORM_NORMATIVE_HEAD normativeDataContext)
 {
     foreach (
         var row in
             normativeDataContext.Y_NORM_NORMATIVE_ROW.OrderBy(y => y.SEQ_NUM))
     {
         var rowControl = new RowControl { DataContext = row };
         normPanel.Children.Add(rowControl);
     }
 }
        private void CmbProfileSelectedIndexChanged(object sender, RoutedEventArgs e)
        {
            try
            {
                Controllers.CellControllers.Clear();

                _norm =
                    GenericRepository.FindOne<Y_NORM_NORMATIVE_HEAD>(
                        x => x.ID == ((Y_NORM_PROFILE_HEAD)cmbProfile.SelectedItem).ID) ??
                    new Y_NORM_NORMATIVE_HEAD
                        {
                            ID = ((Y_NORM_PROFILE_HEAD)cmbProfile.SelectedItem).ID,
                            Y_NORM_PROFILE_HEAD = (Y_NORM_PROFILE_HEAD)cmbProfile.SelectedItem,
                            CREATE_DATETIME = DateTime.Now,
                            LAST_UPDATE_ID = User.Name.ToUpper()
                        };
                DataContext = _norm;
            }
            catch (Exception ex)
            {
                ExceptionRoute(ex);
            }
        }
 /// <summary>
 /// Устаревший метод для добавления новых объектов в набор EntitySet Y_NORM_NORMATIVE_HEAD. Взамен можно использовать метод .Add связанного свойства ObjectSet&lt;T&gt;.
 /// </summary>
 public void AddToY_NORM_NORMATIVE_HEAD(Y_NORM_NORMATIVE_HEAD y_NORM_NORMATIVE_HEAD)
 {
     base.AddObject("Y_NORM_NORMATIVE_HEAD", y_NORM_NORMATIVE_HEAD);
 }
 /// <summary>
 /// Создание нового объекта Y_NORM_NORMATIVE_HEAD.
 /// </summary>
 /// <param name="id">Исходное значение свойства ID.</param>
 /// <param name="iD_PROFILE">Исходное значение свойства ID_PROFILE.</param>
 public static Y_NORM_NORMATIVE_HEAD CreateY_NORM_NORMATIVE_HEAD(global::System.Int64 id, global::System.Int64 iD_PROFILE)
 {
     Y_NORM_NORMATIVE_HEAD y_NORM_NORMATIVE_HEAD = new Y_NORM_NORMATIVE_HEAD();
     y_NORM_NORMATIVE_HEAD.ID = id;
     y_NORM_NORMATIVE_HEAD.ID_PROFILE = iD_PROFILE;
     return y_NORM_NORMATIVE_HEAD;
 }