示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsfsetupc(ref DataRow row, Glsfsetupc entity)
 {
     row.SetField("columnNo", entity.columnNo);
     row.SetField("type1", entity.type1);
     row.SetField("value1", entity.value1);
     row.SetField("lookBack1", entity.lookBack1);
     row.SetField("type2", entity.type2);
     row.SetField("value2", entity.value2);
     row.SetField("lookBack2", entity.lookBack2);
     row.SetField("operator", entity.@operator);
     row.SetField("length", entity.length);
     row.SetField("position", entity.position);
     row.SetField("PrintFl", entity.printFl);
     row.SetField("RoundFl", entity.roundFl);
     row.SetField("userfield", entity.userfield);
 }
示例#2
0
        public static Glsfsetupc BuildGlsfsetupcFromRow(DataRow row)
        {
            Glsfsetupc entity = new Glsfsetupc();

            entity.columnNo  = row.IsNull("columnNo") ? 0 : row.Field <int>("columnNo");
            entity.type1     = row.IsNull("type1") ? string.Empty : row.Field <string>("type1");
            entity.value1    = row.IsNull("value1") ? string.Empty : row.Field <string>("value1");
            entity.lookBack1 = row.IsNull("lookBack1") ? 0 : row.Field <int>("lookBack1");
            entity.type2     = row.IsNull("type2") ? string.Empty : row.Field <string>("type2");
            entity.value2    = row.IsNull("value2") ? string.Empty : row.Field <string>("value2");
            entity.lookBack2 = row.IsNull("lookBack2") ? 0 : row.Field <int>("lookBack2");
            entity.@operator = row.IsNull("operator") ? string.Empty : row.Field <string>("operator");
            entity.length    = row.IsNull("length") ? 0 : row.Field <int>("length");
            entity.position  = row.IsNull("position") ? 0 : row.Field <int>("position");
            entity.printFl   = row.Field <bool>("PrintFl");
            entity.roundFl   = row.Field <bool>("RoundFl");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }