Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromReptwizarddefnoptions(ref DataRow row, Reptwizarddefnoptions entity)
 {
     row.SetField("optionnumber", entity.optionnumber);
     row.SetField("optionname", entity.optionname);
     row.SetField("optiontype", entity.optiontype);
     row.SetField("optionlength", entity.optionlength);
     row.SetField("optionrequired", entity.optionrequired);
     row.SetField("optionvalue", entity.optionvalue);
     row.SetField("optionvaluechoices", entity.optionvaluechoices);
     row.SetField("optionlistproc", entity.optionlistproc);
     row.SetField("optionlistproc2", entity.optionlistproc2);
     row.SetField("optionlistproc3", entity.optionlistproc3);
 }
Exemple #2
0
        public static Reptwizarddefnoptions BuildReptwizarddefnoptionsFromRow(DataRow row)
        {
            Reptwizarddefnoptions entity = new Reptwizarddefnoptions();

            entity.optionnumber       = row.IsNull("optionnumber") ? 0 : row.Field <int>("optionnumber");
            entity.optionname         = row.IsNull("optionname") ? string.Empty : row.Field <string>("optionname");
            entity.optiontype         = row.IsNull("optiontype") ? string.Empty : row.Field <string>("optiontype");
            entity.optionlength       = row.IsNull("optionlength") ? 0 : row.Field <int>("optionlength");
            entity.optionrequired     = row.Field <bool>("optionrequired");
            entity.optionvalue        = row.IsNull("optionvalue") ? string.Empty : row.Field <string>("optionvalue");
            entity.optionvaluechoices = row.IsNull("optionvaluechoices") ? string.Empty : row.Field <string>("optionvaluechoices");
            entity.optionlistproc     = row.IsNull("optionlistproc") ? string.Empty : row.Field <string>("optionlistproc");
            entity.optionlistproc2    = row.IsNull("optionlistproc2") ? string.Empty : row.Field <string>("optionlistproc2");
            entity.optionlistproc3    = row.IsNull("optionlistproc3") ? string.Empty : row.Field <string>("optionlistproc3");
            return(entity);
        }