Esempio n. 1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromLoadpoaddonsresults(ref DataRow row, Loadpoaddonsresults entity)
 {
     row.SetField("addonno", entity.addonno);
     row.SetField("cAddonNm", entity.cAddonNm);
     row.SetField("addonamt", entity.addonamt);
     row.SetField("addontype", entity.addontype);
     row.SetField("cAddonDistNm", entity.cAddonDistNm);
     row.SetField("addonnet", entity.addonnet);
     row.SetField("cVendCurrSymbol", entity.cVendCurrSymbol);
 }
Esempio n. 2
0
        public static Loadpoaddonsresults BuildLoadpoaddonsresultsFromRow(DataRow row)
        {
            Loadpoaddonsresults entity = new Loadpoaddonsresults();

            entity.addonno         = row.IsNull("addonno") ? 0 : row.Field <int>("addonno");
            entity.cAddonNm        = row.IsNull("cAddonNm") ? string.Empty : row.Field <string>("cAddonNm");
            entity.addonamt        = row.IsNull("addonamt") ? decimal.Zero : row.Field <decimal>("addonamt");
            entity.addontype       = row.Field <bool>("addontype");
            entity.cAddonDistNm    = row.IsNull("cAddonDistNm") ? string.Empty : row.Field <string>("cAddonDistNm");
            entity.addonnet        = row.IsNull("addonnet") ? decimal.Zero : row.Field <decimal>("addonnet");
            entity.cVendCurrSymbol = row.IsNull("cVendCurrSymbol") ? string.Empty : row.Field <string>("cVendCurrSymbol");
            return(entity);
        }