public DB.Stru.老龄办.敬老优待证 GetFirst_ByWhere( string strWhere )
        {
            DB.Stru.老龄办.敬老优待证 stru = new DB.Stru.老龄办.敬老优待证();
            List<DB.Stru.老龄办.敬老优待证> list = Get_ByWhere( strWhere );

            if ( list != null && list.Count > 0 )
                stru = list[ 0 ];

            return stru;
        }
        protected override void Save()
        {
            _stru= uc优待证.stru;

            _stru = BL.老龄办.优待证.Save( _stru );

            if ( _stru.IsValid() )
                FF.Ctrl.MsgBox.Show( Def.Str.Msg.Save_OK );
            else
                FF.Ctrl.MsgBox.Show( Def.Str.Msg.Save_Err );
        }
Beispiel #3
0
        protected override void Delete()
        {
            _stru = uc优待证.stru;

            if (_stru.IsNotValid())
            {
                return;
            }

            _stru = BL.老龄办.优待证.Delete( _stru );

            if ( ! _stru.IsValid() )
                FF.Ctrl.MsgBox.Show( Def.Str.Msg.Delete_OK );
            else
                FF.Ctrl.MsgBox.Show( Def.Str.Msg.Delete_Err );
        }
        public static List<DB.Stru.老龄办.敬老优待证> Dt2List( ref DataTable dt )
        {
            List<DB.Stru.老龄办.敬老优待证> lst = new List<DB.Stru.老龄办.敬老优待证>();

            if ( SQL.IsNotValid( ref dt ) )
                return lst;

            foreach ( DataRow dr in dt.Rows )
            {
                DB.Stru.老龄办.敬老优待证 stru = new DB.Stru.老龄办.敬老优待证();
                stru.Dr2Stru( dr );
                lst.Add( stru );
            }

            return lst;
        }