Пример #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromRssjcriteria(ref DataRow row, Rssjcriteria entity)
 {
     row.SetField("groupnm", entity.groupnm);
     row.SetField("queuenm", entity.queuenm);
     row.SetField("fromhour", entity.fromhour);
     row.SetField("fromminute", entity.fromminute);
     row.SetField("fromampm", entity.fromampm);
     row.SetField("tohour", entity.tohour);
     row.SetField("tominute", entity.tominute);
     row.SetField("toampm", entity.toampm);
     row.SetField("inquiryfl", entity.inquiryfl);
     row.SetField("updatefl", entity.updatefl);
     row.SetField("timezoneclient", entity.timezoneclient);
     row.SetField("userfield", entity.userfield);
 }
Пример #2
0
        public static Rssjcriteria BuildRssjcriteriaFromRow(DataRow row)
        {
            Rssjcriteria entity = new Rssjcriteria();

            entity.groupnm        = row.IsNull("groupnm") ? string.Empty : row.Field <string>("groupnm");
            entity.queuenm        = row.IsNull("queuenm") ? string.Empty : row.Field <string>("queuenm");
            entity.fromhour       = row.IsNull("fromhour") ? 0 : row.Field <int>("fromhour");
            entity.fromminute     = row.IsNull("fromminute") ? 0 : row.Field <int>("fromminute");
            entity.fromampm       = row.IsNull("fromampm") ? string.Empty : row.Field <string>("fromampm");
            entity.tohour         = row.IsNull("tohour") ? 0 : row.Field <int>("tohour");
            entity.tominute       = row.IsNull("tominute") ? 0 : row.Field <int>("tominute");
            entity.toampm         = row.IsNull("toampm") ? string.Empty : row.Field <string>("toampm");
            entity.inquiryfl      = row.Field <bool>("inquiryfl");
            entity.updatefl       = row.Field <bool>("updatefl");
            entity.timezoneclient = row.IsNull("timezoneclient") ? 0 : row.Field <int>("timezoneclient");
            entity.userfield      = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }