Пример #1
0
 public void AddLineAndNew(object sender, EventArgs e)
 {
     if (this.InValidState())
     {
         this.SetFocusInFirstField();
         this.m_CurrentRow = (RACUNDataSet.RACUNRacunStavkeRow)((DataRowView)this.bindingSourceRACUNRacunStavke.AddNew()).Row;
         this.m_CurrentRow.SetParentRow(this.m_ParentRow);
     }
 }
Пример #2
0
 public void Initialize(DeklaritMode mode, DataRow parentRow, bool isCopy)
 {
     this.m_ParentRow     = parentRow;
     this.dsRACUNDataSet1 = (RACUNDataSet)this.m_ParentRow.Table.DataSet;
     this.bindingSourceRACUNRacunStavke.DataSource = DataSetUtil.GetSubTreeDataView(this.m_ParentRow, this.dsRACUNDataSet1.Tables["RACUNRacunStavke"]);
     this.bindingSourceRACUNRacunStavke.DataMember = "";
     this.RegisterBindingSources();
     this.m_Mode        = mode;
     this.m_BaseMethods = new GenericFormClass(this.m_FrameworkDescription, this.m_FirstLevelName, "RACUN", this.m_Mode, this.dsRACUNDataSet1, this.dsRACUNDataSet1.RACUNRacunStavke.Columns, this.Controls, this.m_DataGrids, this.m_AutoNumber);
     this.m_BaseMethods.FormLoadStyle();
     if ((this.m_BaseMethods.IsUpdate() || this.m_BaseMethods.IsDelete()) || (this.m_BaseMethods.IsSelect() || isCopy))
     {
         this.m_CurrentRow = (RACUNDataSet.RACUNRacunStavkeRow)((DataRowView)this.bindingSourceRACUNRacunStavke.Current).Row;
     }
     if (this.m_BaseMethods.IsInsert() && !isCopy)
     {
         this.m_CurrentRow = (RACUNDataSet.RACUNRacunStavkeRow)((DataRowView)this.bindingSourceRACUNRacunStavke.AddNew()).Row;
         this.m_CurrentRow.SetParentRow(this.m_ParentRow);
     }
     this.SetFocusInFirstField();
 }