Exemple #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromGlsfsetupu(ref DataRow row, Glsfsetupu entity)
 {
     row.SetField("operand1", entity.operand1);
     row.SetField("storageNo1", entity.storageNo1);
     row.SetField("totalLevel1", entity.totalLevel1);
     row.SetField("columnNo1", entity.columnNo1);
     row.SetField("value1", entity.value1);
     row.SetField("operator", entity.@operator);
     row.SetField("operand2", entity.operand2);
     row.SetField("storageNo2", entity.storageNo2);
     row.SetField("totalLevel2", entity.totalLevel2);
     row.SetField("columnNo2", entity.columnNo2);
     row.SetField("value2", entity.value2);
     row.SetField("result", entity.result);
     row.SetField("storageNo3", entity.storageNo3);
     row.SetField("totalLevel3", entity.totalLevel3);
     row.SetField("value3", entity.value3);
     row.SetField("accumTotalsFl", entity.accumTotalsFl);
     row.SetField("comment", entity.comment);
     row.SetField("userfield", entity.userfield);
 }
Exemple #2
0
        public static Glsfsetupu BuildGlsfsetupuFromRow(DataRow row)
        {
            Glsfsetupu entity = new Glsfsetupu();

            entity.operand1      = row.IsNull("operand1") ? string.Empty : row.Field <string>("operand1");
            entity.storageNo1    = row.IsNull("storageNo1") ? 0 : row.Field <int>("storageNo1");
            entity.totalLevel1   = row.IsNull("totalLevel1") ? 0 : row.Field <int>("totalLevel1");
            entity.columnNo1     = row.IsNull("columnNo1") ? 0 : row.Field <int>("columnNo1");
            entity.value1        = row.IsNull("value1") ? 0 : row.Field <int>("value1");
            entity.@operator     = row.IsNull("operator") ? string.Empty : row.Field <string>("operator");
            entity.operand2      = row.IsNull("operand2") ? string.Empty : row.Field <string>("operand2");
            entity.storageNo2    = row.IsNull("storageNo2") ? 0 : row.Field <int>("storageNo2");
            entity.totalLevel2   = row.IsNull("totalLevel2") ? 0 : row.Field <int>("totalLevel2");
            entity.columnNo2     = row.IsNull("columnNo2") ? 0 : row.Field <int>("columnNo2");
            entity.value2        = row.IsNull("value2") ? 0 : row.Field <int>("value2");
            entity.result        = row.IsNull("result") ? string.Empty : row.Field <string>("result");
            entity.storageNo3    = row.IsNull("storageNo3") ? 0 : row.Field <int>("storageNo3");
            entity.totalLevel3   = row.IsNull("totalLevel3") ? 0 : row.Field <int>("totalLevel3");
            entity.value3        = row.IsNull("value3") ? 0 : row.Field <int>("value3");
            entity.accumTotalsFl = row.Field <bool>("accumTotalsFl");
            entity.comment       = row.IsNull("comment") ? string.Empty : row.Field <string>("comment");
            entity.userfield     = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }