コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSasoopercreate(ref DataRow row, Sasoopercreate entity)
 {
     row.SetField("operinit", entity.operinit);
     row.SetField("name", entity.name);
     row.SetField("password", entity.password);
     row.SetField("passwordconfirm", entity.passwordconfirm);
     row.SetField("mustchangefl", entity.mustchangefl);
     row.SetField("cannotchangefl", entity.cannotchangefl);
     row.SetField("disabledfl", entity.disabledfl);
     row.SetField("copyoper", entity.copyoper);
     row.SetField("cloudprovisionfl", entity.cloudprovisionfl);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Sasoopercreate BuildSasoopercreateFromRow(DataRow row)
        {
            Sasoopercreate entity = new Sasoopercreate();

            entity.operinit         = row.IsNull("operinit") ? string.Empty : row.Field <string>("operinit");
            entity.name             = row.IsNull("name") ? string.Empty : row.Field <string>("name");
            entity.password         = row.IsNull("password") ? string.Empty : row.Field <string>("password");
            entity.passwordconfirm  = row.IsNull("passwordconfirm") ? string.Empty : row.Field <string>("passwordconfirm");
            entity.mustchangefl     = row.Field <bool>("mustchangefl");
            entity.cannotchangefl   = row.Field <bool>("cannotchangefl");
            entity.disabledfl       = row.Field <bool>("disabledfl");
            entity.copyoper         = row.IsNull("copyoper") ? string.Empty : row.Field <string>("copyoper");
            entity.cloudprovisionfl = row.Field <bool>("cloudprovisionfl");
            entity.userfield        = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }