コード例 #1
0
        public static Oeioloadordtax BuildOeioloadordtaxFromRow(DataRow row)
        {
            Oeioloadordtax entity = new Oeioloadordtax();

            entity.cTaxMethodTy       = row.IsNull("cTaxMethodTy") ? string.Empty : row.Field <string>("cTaxMethodTy");
            entity.nontaxtext         = row.IsNull("nontaxtext") ? string.Empty : row.Field <string>("nontaxtext");
            entity.taxovertext        = row.IsNull("taxovertext") ? string.Empty : row.Field <string>("taxovertext");
            entity.taxdefaulttext     = row.IsNull("taxdefaulttext") ? string.Empty : row.Field <string>("taxdefaulttext");
            entity.spectaxcd          = row.IsNull("spectaxcd") ? string.Empty : row.Field <string>("spectaxcd");
            entity.spectaxcdhidden    = row.Field <bool>("spectaxcdhidden");
            entity.statecd            = row.IsNull("statecd") ? string.Empty : row.Field <string>("statecd");
            entity.statecdhidden      = row.Field <bool>("statecdhidden");
            entity.statecdlabel       = row.IsNull("statecdlabel") ? string.Empty : row.Field <string>("statecdlabel");
            entity.taxauth            = row.IsNull("taxauth") ? string.Empty : row.Field <string>("taxauth");
            entity.taxauthhidden      = row.Field <bool>("taxauthhidden");
            entity.pstlicenseno       = row.IsNull("pstlicenseno") ? string.Empty : row.Field <string>("pstlicenseno");
            entity.pstlicensenohidden = row.Field <bool>("pstlicensenohidden");
            entity.gsttaxamount       = row.IsNull("gsttaxamount") ? decimal.Zero : row.Field <decimal>("gsttaxamount");
            entity.gsttaxamounthidden = row.Field <bool>("gsttaxamounthidden");
            entity.gsttaxamountlabel  = row.IsNull("gsttaxamountlabel") ? string.Empty : row.Field <string>("gsttaxamountlabel");
            entity.psttaxamount       = row.IsNull("psttaxamount") ? decimal.Zero : row.Field <decimal>("psttaxamount");
            entity.psttaxamounthidden = row.Field <bool>("psttaxamounthidden");
            entity.psttaxamountlabel  = row.IsNull("psttaxamountlabel") ? string.Empty : row.Field <string>("psttaxamountlabel");
            entity.txtlabel           = row.IsNull("txtlabel") ? string.Empty : row.Field <string>("txtlabel");
            entity.userfield          = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield");
            return(entity);
        }
コード例 #2
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromOeioloadordtax(ref DataRow row, Oeioloadordtax entity)
 {
     row.SetField("cTaxMethodTy", entity.cTaxMethodTy);
     row.SetField("nontaxtext", entity.nontaxtext);
     row.SetField("taxovertext", entity.taxovertext);
     row.SetField("taxdefaulttext", entity.taxdefaulttext);
     row.SetField("spectaxcd", entity.spectaxcd);
     row.SetField("spectaxcdhidden", entity.spectaxcdhidden);
     row.SetField("statecd", entity.statecd);
     row.SetField("statecdhidden", entity.statecdhidden);
     row.SetField("statecdlabel", entity.statecdlabel);
     row.SetField("taxauth", entity.taxauth);
     row.SetField("taxauthhidden", entity.taxauthhidden);
     row.SetField("pstlicenseno", entity.pstlicenseno);
     row.SetField("pstlicensenohidden", entity.pstlicensenohidden);
     row.SetField("gsttaxamount", entity.gsttaxamount);
     row.SetField("gsttaxamounthidden", entity.gsttaxamounthidden);
     row.SetField("gsttaxamountlabel", entity.gsttaxamountlabel);
     row.SetField("psttaxamount", entity.psttaxamount);
     row.SetField("psttaxamounthidden", entity.psttaxamounthidden);
     row.SetField("psttaxamountlabel", entity.psttaxamountlabel);
     row.SetField("txtlabel", entity.txtlabel);
     row.SetField("userfield", entity.userfield);
 }