예제 #1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadpoheaderaddlmiscresults(ref DataRow row, Loadpoheaderaddlmiscresults entity)
 {
     row.SetField("totqtyord", entity.totqtyord);
     row.SetField("totlineamt", entity.totlineamt);
     row.SetField("operord", entity.operord);
     row.SetField("enterdt", entity.enterdt);
     row.SetField("totqtyrcv", entity.totqtyrcv);
     row.SetField("totrcvamt", entity.totrcvamt);
     row.SetField("operrcv", entity.operrcv);
     row.SetField("receiptdt", entity.receiptdt);
     row.SetField("jrnlrcv", entity.jrnlrcv);
     row.SetField("totqtycost", entity.totqtycost);
     row.SetField("totcostamt", entity.totcostamt);
     row.SetField("opercost", entity.opercost);
     row.SetField("costeddt", entity.costeddt);
     row.SetField("jrnlcost", entity.jrnlcost);
     row.SetField("totqtyuncost", entity.totqtyuncost);
     row.SetField("totuncostamt", entity.totuncostamt);
     row.SetField("note", entity.note);
     row.SetField("slsnm", entity.slsnm);
     row.SetField("expednm", entity.expednm);
     row.SetField("slsphoneno", entity.slsphoneno);
     row.SetField("exphoneno", entity.exphoneno);
     row.SetField("notehidden", entity.notehidden);
     row.SetField("totcostamthidden", entity.totcostamthidden);
     row.SetField("totuncostamthidden", entity.totuncostamthidden);
     row.SetField("totqtycosthidden", entity.totqtycosthidden);
     row.SetField("totqtyuncosthidden", entity.totqtyuncosthidden);
     row.SetField("uncostedlabelhidden", entity.uncostedlabelhidden);
     row.SetField("totqtyrcvhidden", entity.totqtyrcvhidden);
     row.SetField("totrcvamthidden", entity.totrcvamthidden);
     row.SetField("totlineamthidden", entity.totlineamthidden);
 }
예제 #2
0
        public static Loadpoheaderaddlmiscresults BuildLoadpoheaderaddlmiscresultsFromRow(DataRow row)
        {
            Loadpoheaderaddlmiscresults entity = new Loadpoheaderaddlmiscresults();

            entity.totqtyord           = row.IsNull("totqtyord") ? decimal.Zero : row.Field <decimal>("totqtyord");
            entity.totlineamt          = row.IsNull("totlineamt") ? decimal.Zero : row.Field <decimal>("totlineamt");
            entity.operord             = row.IsNull("operord") ? string.Empty : row.Field <string>("operord");
            entity.enterdt             = row.Field <DateTime?>("enterdt");
            entity.totqtyrcv           = row.IsNull("totqtyrcv") ? decimal.Zero : row.Field <decimal>("totqtyrcv");
            entity.totrcvamt           = row.IsNull("totrcvamt") ? decimal.Zero : row.Field <decimal>("totrcvamt");
            entity.operrcv             = row.IsNull("operrcv") ? string.Empty : row.Field <string>("operrcv");
            entity.receiptdt           = row.Field <DateTime?>("receiptdt");
            entity.jrnlrcv             = row.IsNull("jrnlrcv") ? 0 : row.Field <int>("jrnlrcv");
            entity.totqtycost          = row.IsNull("totqtycost") ? decimal.Zero : row.Field <decimal>("totqtycost");
            entity.totcostamt          = row.IsNull("totcostamt") ? decimal.Zero : row.Field <decimal>("totcostamt");
            entity.opercost            = row.IsNull("opercost") ? string.Empty : row.Field <string>("opercost");
            entity.costeddt            = row.Field <DateTime?>("costeddt");
            entity.jrnlcost            = row.IsNull("jrnlcost") ? 0 : row.Field <int>("jrnlcost");
            entity.totqtyuncost        = row.IsNull("totqtyuncost") ? decimal.Zero : row.Field <decimal>("totqtyuncost");
            entity.totuncostamt        = row.IsNull("totuncostamt") ? decimal.Zero : row.Field <decimal>("totuncostamt");
            entity.note                = row.IsNull("note") ? string.Empty : row.Field <string>("note");
            entity.slsnm               = row.IsNull("slsnm") ? string.Empty : row.Field <string>("slsnm");
            entity.expednm             = row.IsNull("expednm") ? string.Empty : row.Field <string>("expednm");
            entity.slsphoneno          = row.IsNull("slsphoneno") ? string.Empty : row.Field <string>("slsphoneno");
            entity.exphoneno           = row.IsNull("exphoneno") ? string.Empty : row.Field <string>("exphoneno");
            entity.notehidden          = row.Field <bool>("notehidden");
            entity.totcostamthidden    = row.Field <bool>("totcostamthidden");
            entity.totuncostamthidden  = row.Field <bool>("totuncostamthidden");
            entity.totqtycosthidden    = row.Field <bool>("totqtycosthidden");
            entity.totqtyuncosthidden  = row.Field <bool>("totqtyuncosthidden");
            entity.uncostedlabelhidden = row.Field <bool>("uncostedlabelhidden");
            entity.totqtyrcvhidden     = row.Field <bool>("totqtyrcvhidden");
            entity.totrcvamthidden     = row.Field <bool>("totrcvamthidden");
            entity.totlineamthidden    = row.Field <bool>("totlineamthidden");
            return(entity);
        }