예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSapbdatetime(ref DataRow row, Sapbdatetime entity)
 {
     row.SetField("blankdateok", entity.blankdateok);
     row.SetField("todayclient", entity.todayclient);
     row.SetField("timezoneclient", entity.timezoneclient);
     row.SetField("dateclient", entity.dateclient);
     row.SetField("timeclient", entity.timeclient);
     row.SetField("scheduletype", entity.scheduletype);
     row.SetField("dateserver", entity.dateserver);
     row.SetField("timeserver", entity.timeserver);
     row.SetField("changestring", entity.changestring);
     row.SetField("timehour", entity.timehour);
     row.SetField("timeminute", entity.timeminute);
     row.SetField("timeampm", entity.timeampm);
     row.SetField("changescheduletype", entity.changescheduletype);
     row.SetField("scheduletypehidden", entity.scheduletypehidden);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Sapbdatetime BuildSapbdatetimeFromRow(DataRow row)
        {
            Sapbdatetime entity = new Sapbdatetime();

            entity.blankdateok        = row.Field <bool>("blankdateok");
            entity.todayclient        = row.Field <DateTime?>("todayclient");
            entity.timezoneclient     = row.IsNull("timezoneclient") ? 0 : row.Field <int>("timezoneclient");
            entity.dateclient         = row.Field <DateTime?>("dateclient");
            entity.timeclient         = row.IsNull("timeclient") ? 0 : row.Field <int>("timeclient");
            entity.scheduletype       = row.IsNull("scheduletype") ? string.Empty : row.Field <string>("scheduletype");
            entity.dateserver         = row.Field <DateTime?>("dateserver");
            entity.timeserver         = row.IsNull("timeserver") ? 0 : row.Field <int>("timeserver");
            entity.changestring       = row.IsNull("changestring") ? string.Empty : row.Field <string>("changestring");
            entity.timehour           = row.IsNull("timehour") ? 0 : row.Field <int>("timehour");
            entity.timeminute         = row.IsNull("timeminute") ? 0 : row.Field <int>("timeminute");
            entity.timeampm           = row.IsNull("timeampm") ? string.Empty : row.Field <string>("timeampm");
            entity.changescheduletype = row.Field <bool>("changescheduletype");
            entity.scheduletypehidden = row.Field <bool>("scheduletypehidden");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }