コード例 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromIcipfetchadjresults(ref DataRow row, Icipfetchadjresults entity)
 {
     row.SetField("cmessage", entity.cmessage);
     row.SetField("threshcalcop", entity.threshcalcop);
     row.SetField("threshcalcdiff", entity.threshcalcdiff);
     row.SetField("fivehicalcop", entity.fivehicalcop);
     row.SetField("fivehicalcdiff", entity.fivehicalcdiff);
     row.SetField("threshcalclp", entity.threshcalclp);
     row.SetField("fivehicalclp", entity.fivehicalclp);
     row.SetField("fivehicalcqty", entity.fivehicalcqty);
     row.SetField("minthreshold", entity.minthreshold);
     row.SetField("minthreshexpdt", entity.minthreshexpdt);
     row.SetField("highsale1", entity.highsale1);
     row.SetField("highchar1", entity.highchar1);
     row.SetField("highsaledt1", entity.highsaledt1);
     row.SetField("highsaleno1", entity.highsaleno1);
     row.SetField("threshrefer", entity.threshrefer);
     row.SetField("highsale2", entity.highsale2);
     row.SetField("highchar2", entity.highchar2);
     row.SetField("highsaledt2", entity.highsaledt2);
     row.SetField("highsaleno2", entity.highsaleno2);
     row.SetField("highsale3", entity.highsale3);
     row.SetField("highchar3", entity.highchar3);
     row.SetField("highsaledt3", entity.highsaledt3);
     row.SetField("highsaleno3", entity.highsaleno3);
     row.SetField("highsale4", entity.highsale4);
     row.SetField("highchar4", entity.highchar4);
     row.SetField("highsaledt4", entity.highsaledt4);
     row.SetField("highsaleno4", entity.highsaleno4);
     row.SetField("asqcalcop", entity.asqcalcop);
     row.SetField("asqcalcdiff", entity.asqcalcdiff);
     row.SetField("highsale5", entity.highsale5);
     row.SetField("highchar5", entity.highchar5);
     row.SetField("highsaledt5", entity.highsaledt5);
     row.SetField("highsaleno5", entity.highsaleno5);
     row.SetField("asqcalclp", entity.asqcalclp);
     row.SetField("asqcalcusage", entity.asqcalcusage);
     row.SetField("asqlinehits", entity.asqlinehits);
     row.SetField("fivehitext", entity.fivehitext);
     row.SetField("asqminhits", entity.asqminhits);
     row.SetField("asqminhitslev", entity.asqminhitslev);
     row.SetField("fivehiminhits", entity.fivehiminhits);
     row.SetField("fivehiminhitslev", entity.fivehiminhitslev);
     row.SetField("asqmaxdolldiff", entity.asqmaxdolldiff);
     row.SetField("asqmaxdolllev", entity.asqmaxdolllev);
     row.SetField("fivehimaxdolldiff", entity.fivehimaxdolldiff);
     row.SetField("fivehimaxdolllev", entity.fivehimaxdolllev);
     row.SetField("asqtransferfl", entity.asqtransferfl);
     row.SetField("asqtransferlev", entity.asqtransferlev);
     row.SetField("fivehitransferfl", entity.fivehitransferfl);
     row.SetField("fivehitransferlev", entity.fivehitransferlev);
     row.SetField("mergeop", entity.mergeop);
     row.SetField("mergelp", entity.mergelp);
     row.SetField("mthusage", entity.mthusage);
     row.SetField("whserank", entity.whserank);
     row.SetField("usagemethod", entity.usagemethod);
     row.SetField("usage", entity.usage);
     row.SetField("safetyqty", entity.safetyqty);
     row.SetField("userfield", entity.userfield);
 }
コード例 #2
0
        public static Icipfetchadjresults BuildIcipfetchadjresultsFromRow(DataRow row)
        {
            Icipfetchadjresults entity = new Icipfetchadjresults();

            entity.cmessage          = row.IsNull("cmessage") ? string.Empty : row.Field <string>("cmessage");
            entity.threshcalcop      = row.IsNull("threshcalcop") ? 0 : row.Field <int>("threshcalcop");
            entity.threshcalcdiff    = row.IsNull("threshcalcdiff") ? decimal.Zero : row.Field <decimal>("threshcalcdiff");
            entity.fivehicalcop      = row.IsNull("fivehicalcop") ? 0 : row.Field <int>("fivehicalcop");
            entity.fivehicalcdiff    = row.IsNull("fivehicalcdiff") ? decimal.Zero : row.Field <decimal>("fivehicalcdiff");
            entity.threshcalclp      = row.IsNull("threshcalclp") ? 0 : row.Field <int>("threshcalclp");
            entity.fivehicalclp      = row.IsNull("fivehicalclp") ? 0 : row.Field <int>("fivehicalclp");
            entity.fivehicalcqty     = row.IsNull("fivehicalcqty") ? decimal.Zero : row.Field <decimal>("fivehicalcqty");
            entity.minthreshold      = row.IsNull("minthreshold") ? 0 : row.Field <int>("minthreshold");
            entity.minthreshexpdt    = row.Field <DateTime?>("minthreshexpdt");
            entity.highsale1         = row.IsNull("highsale1") ? decimal.Zero : row.Field <decimal>("highsale1");
            entity.highchar1         = row.IsNull("highchar1") ? string.Empty : row.Field <string>("highchar1");
            entity.highsaledt1       = row.Field <DateTime?>("highsaledt1");
            entity.highsaleno1       = row.IsNull("highsaleno1") ? string.Empty : row.Field <string>("highsaleno1");
            entity.threshrefer       = row.IsNull("threshrefer") ? string.Empty : row.Field <string>("threshrefer");
            entity.highsale2         = row.IsNull("highsale2") ? decimal.Zero : row.Field <decimal>("highsale2");
            entity.highchar2         = row.IsNull("highchar2") ? string.Empty : row.Field <string>("highchar2");
            entity.highsaledt2       = row.Field <DateTime?>("highsaledt2");
            entity.highsaleno2       = row.IsNull("highsaleno2") ? string.Empty : row.Field <string>("highsaleno2");
            entity.highsale3         = row.IsNull("highsale3") ? decimal.Zero : row.Field <decimal>("highsale3");
            entity.highchar3         = row.IsNull("highchar3") ? string.Empty : row.Field <string>("highchar3");
            entity.highsaledt3       = row.Field <DateTime?>("highsaledt3");
            entity.highsaleno3       = row.IsNull("highsaleno3") ? string.Empty : row.Field <string>("highsaleno3");
            entity.highsale4         = row.IsNull("highsale4") ? decimal.Zero : row.Field <decimal>("highsale4");
            entity.highchar4         = row.IsNull("highchar4") ? string.Empty : row.Field <string>("highchar4");
            entity.highsaledt4       = row.Field <DateTime?>("highsaledt4");
            entity.highsaleno4       = row.IsNull("highsaleno4") ? string.Empty : row.Field <string>("highsaleno4");
            entity.asqcalcop         = row.IsNull("asqcalcop") ? 0 : row.Field <int>("asqcalcop");
            entity.asqcalcdiff       = row.IsNull("asqcalcdiff") ? decimal.Zero : row.Field <decimal>("asqcalcdiff");
            entity.highsale5         = row.IsNull("highsale5") ? decimal.Zero : row.Field <decimal>("highsale5");
            entity.highchar5         = row.IsNull("highchar5") ? string.Empty : row.Field <string>("highchar5");
            entity.highsaledt5       = row.Field <DateTime?>("highsaledt5");
            entity.highsaleno5       = row.IsNull("highsaleno5") ? string.Empty : row.Field <string>("highsaleno5");
            entity.asqcalclp         = row.IsNull("asqcalclp") ? 0 : row.Field <int>("asqcalclp");
            entity.asqcalcusage      = row.IsNull("asqcalcusage") ? decimal.Zero : row.Field <decimal>("asqcalcusage");
            entity.asqlinehits       = row.IsNull("asqlinehits") ? 0 : row.Field <int>("asqlinehits");
            entity.fivehitext        = row.IsNull("fivehitext") ? string.Empty : row.Field <string>("fivehitext");
            entity.asqminhits        = row.IsNull("asqminhits") ? 0 : row.Field <int>("asqminhits");
            entity.asqminhitslev     = row.IsNull("asqminhitslev") ? string.Empty : row.Field <string>("asqminhitslev");
            entity.fivehiminhits     = row.IsNull("fivehiminhits") ? 0 : row.Field <int>("fivehiminhits");
            entity.fivehiminhitslev  = row.IsNull("fivehiminhitslev") ? string.Empty : row.Field <string>("fivehiminhitslev");
            entity.asqmaxdolldiff    = row.IsNull("asqmaxdolldiff") ? decimal.Zero : row.Field <decimal>("asqmaxdolldiff");
            entity.asqmaxdolllev     = row.IsNull("asqmaxdolllev") ? string.Empty : row.Field <string>("asqmaxdolllev");
            entity.fivehimaxdolldiff = row.IsNull("fivehimaxdolldiff") ? decimal.Zero : row.Field <decimal>("fivehimaxdolldiff");
            entity.fivehimaxdolllev  = row.IsNull("fivehimaxdolllev") ? string.Empty : row.Field <string>("fivehimaxdolllev");
            entity.asqtransferfl     = row.Field <bool>("asqtransferfl");
            entity.asqtransferlev    = row.IsNull("asqtransferlev") ? string.Empty : row.Field <string>("asqtransferlev");
            entity.fivehitransferfl  = row.Field <bool>("fivehitransferfl");
            entity.fivehitransferlev = row.IsNull("fivehitransferlev") ? string.Empty : row.Field <string>("fivehitransferlev");
            entity.mergeop           = row.IsNull("mergeop") ? 0 : row.Field <int>("mergeop");
            entity.mergelp           = row.IsNull("mergelp") ? 0 : row.Field <int>("mergelp");
            entity.mthusage          = row.IsNull("mthusage") ? 0 : row.Field <int>("mthusage");
            entity.whserank          = row.IsNull("whserank") ? string.Empty : row.Field <string>("whserank");
            entity.usagemethod       = row.IsNull("usagemethod") ? string.Empty : row.Field <string>("usagemethod");
            entity.usage             = row.IsNull("usage") ? decimal.Zero : row.Field <decimal>("usage");
            entity.safetyqty         = row.IsNull("safetyqty") ? decimal.Zero : row.Field <decimal>("safetyqty");
            entity.userfield         = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }