예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromUserspecificresults(ref DataRow row, Userspecificresults entity)
 {
     row.SetField("emp_num", entity.empNum);
     row.SetField("dept_num", entity.deptNum);
     row.SetField("sys_name", entity.sysName);
     row.SetField("udc_desc", entity.udcDesc);
     row.SetField("udc_value", entity.udcValue);
     row.SetField("udc_type", entity.udcType);
     row.SetField("udc_id", entity.udcId);
     row.SetField("default_respfl", entity.defaultRespfl);
     row.SetField("user_specificfl", entity.userSpecificfl);
     row.SetField("auto_respfl", entity.autoRespfl);
     row.SetField("trans_date", entity.transDate);
     row.SetField("trans_proc", entity.transProc);
     row.SetField("udcfgrowid", entity.udcfgrowid.ToByteArray());
     row.SetField("userspecificresultsuserfield", entity.userspecificresultsuserfield);
     row.SetField("userfield", entity.userfield);
 }
예제 #2
0
        public static Userspecificresults BuildUserspecificresultsFromRow(DataRow row)
        {
            Userspecificresults entity = new Userspecificresults();

            entity.empNum         = row.IsNull("emp_num") ? string.Empty : row.Field <string>("emp_num");
            entity.deptNum        = row.IsNull("dept_num") ? 0 : row.Field <int>("dept_num");
            entity.sysName        = row.IsNull("sys_name") ? string.Empty : row.Field <string>("sys_name");
            entity.udcDesc        = row.IsNull("udc_desc") ? string.Empty : row.Field <string>("udc_desc");
            entity.udcValue       = row.IsNull("udc_value") ? string.Empty : row.Field <string>("udc_value");
            entity.udcType        = row.IsNull("udc_type") ? string.Empty : row.Field <string>("udc_type");
            entity.udcId          = row.IsNull("udc_id") ? string.Empty : row.Field <string>("udc_id");
            entity.defaultRespfl  = row.Field <bool>("default_respfl");
            entity.userSpecificfl = row.Field <bool>("user_specificfl");
            entity.autoRespfl     = row.Field <bool>("auto_respfl");
            entity.transDate      = row.IsNull("trans_date") ? string.Empty : row.Field <string>("trans_date");
            entity.transProc      = row.IsNull("trans_proc") ? string.Empty : row.Field <string>("trans_proc");
            entity.udcfgrowid     = row.Field <byte[]>("udcfgrowid").ToStringEncoded();
            entity.userspecificresultsuserfield = row.IsNull("userspecificresultsuserfield") ? string.Empty : row.Field <string>("userspecificresultsuserfield");
            entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }