Example #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromSworderlookupcriteria(ref DataRow row, Sworderlookupcriteria entity)
 {
     row.SetField("custno", entity.custno);
     row.SetField("repairordno", entity.repairordno);
     row.SetField("repairordsuf", entity.repairordsuf);
     row.SetField("openonly", entity.openonly);
     row.SetField("ordtype", entity.ordtype);
     row.SetField("stage", entity.stage);
     row.SetField("recordcountlimit", entity.recordcountlimit);
     row.SetField("customfield", entity.customfield);
 }
Example #2
0
        public static Sworderlookupcriteria BuildSworderlookupcriteriaFromRow(DataRow row)
        {
            Sworderlookupcriteria entity = new Sworderlookupcriteria();

            entity.custno           = row.IsNull("custno") ? decimal.Zero : row.Field <decimal>("custno");
            entity.repairordno      = row.IsNull("repairordno") ? 0 : row.Field <int>("repairordno");
            entity.repairordsuf     = row.IsNull("repairordsuf") ? 0 : row.Field <int>("repairordsuf");
            entity.openonly         = row.Field <bool>("openonly");
            entity.ordtype          = row.IsNull("ordtype") ? string.Empty : row.Field <string>("ordtype");
            entity.stage            = row.IsNull("stage") ? string.Empty : row.Field <string>("stage");
            entity.recordcountlimit = row.IsNull("recordcountlimit") ? 0 : row.Field <int>("recordcountlimit");
            entity.customfield      = row.IsNull("customfield") ? string.Empty : row.Field <string>("customfield");
            return(entity);
        }