public void CopyFrom( ROLE struFrom ) { ID = struFrom.ID; Code = struFrom.Code; RoleName = struFrom.RoleName; Remark = struFrom.Remark; Depart = struFrom.Depart; }
/// <summary> /// Get Modify Log /// </summary> /// <returns></returns> public string GetLogStr( ROLE struOrg ) { if ( struOrg.ID == String.Empty ) return String.Empty; string strRet = String.Empty; ArrayList ary = new ArrayList(); if ( Code.Trim() != struOrg.Code.Trim() ) ary.Add( String.Format( "[Code]: {0} => {1}", struOrg.Code, Code ) ); if ( RoleName.Trim() != struOrg.RoleName.Trim() ) ary.Add( String.Format( "[RoleName]: {0} => {1}", struOrg.RoleName, RoleName ) ); if ( Remark.Trim() != struOrg.Remark.Trim() ) ary.Add( String.Format( "[Remark]: {0} => {1}", struOrg.Remark, Remark ) ); if ( Depart.Trim() != struOrg.Depart.Trim() ) ary.Add( String.Format( "[Depart]: {0} => {1}", struOrg.Depart, Depart ) ); foreach ( string str in ary ) { strRet += str + System.Environment.NewLine; } return strRet; }
public static List<Stru.ROLE> Dt2List( ref DataTable dt ) { List<Stru.ROLE> lst = new List<ROLE>(); if ( SQL.IsNotValid( ref dt ) ) return lst; foreach ( DataRow dr in dt.Rows ) { Stru.ROLE stru = new ROLE(); stru.Dr2Stru( dr ); lst.Add( stru ); } return lst; }