Ejemplo n.º 1
0
        public override void AddNew(string code)
        {
            databases.baseDS.investorRow lastRow = (databases.baseDS.investorRow)((DataRowView)myMasterSource.Current).Row;
            databases.baseDS.investorRow row     = (databases.baseDS.investorRow)((DataRowView)myMasterSource.AddNew()).Row;
            if (row == null)
            {
                return;
            }
            databases.AppLibs.InitData(row);
            row.code = Consts.constMarkerNEW;
            if (lastRow != null)
            {
                row.catCode = lastRow.catCode;
                if (!lastRow.IscountryNull())
                {
                    row.country = lastRow.country;
                }
            }
            int position = myMasterSource.Position;

            myMasterSource.Position = -1;
            myMasterSource.Position = position;
            //CurrentDataChanged();
            SetFirstFocus();
        }