/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromPrinterinitialize(ref DataRow row, Printerinitialize entity) { row.SetField("widefl", entity.widefl); row.SetField("printtypes", entity.printtypes); row.SetField("demandfl", entity.demandfl); row.SetField("printtitle", entity.printtitle); row.SetField("printtype", entity.printtype); row.SetField("printernm", entity.printernm); row.SetField("faxto1", entity.faxto1); row.SetField("faxto2", entity.faxto2); row.SetField("faxphoneno", entity.faxphoneno); row.SetField("faxfrom", entity.faxfrom); row.SetField("faxcom", entity.faxcom); row.SetField("faxpriorityfl", entity.faxpriorityfl); row.SetField("filefl", entity.filefl); row.SetField("printoptfl", entity.printoptfl); row.SetField("queue", entity.queue); row.SetField("queueenabled", entity.queueenabled); row.SetField("whse", entity.whse); row.SetField("whsevisible", entity.whsevisible); row.SetField("whseprtno", entity.whseprtno); row.SetField("oeprintype", entity.oeprintype); row.SetField("emailaddr", entity.emailaddr); row.SetField("outputover", entity.outputover); }
public static Printerinitialize BuildPrinterinitializeFromRow(DataRow row) { Printerinitialize entity = new Printerinitialize(); entity.widefl = row.Field <bool>("widefl"); entity.printtypes = row.IsNull("printtypes") ? string.Empty : row.Field <string>("printtypes"); entity.demandfl = row.Field <bool>("demandfl"); entity.printtitle = row.IsNull("printtitle") ? string.Empty : row.Field <string>("printtitle"); entity.printtype = row.IsNull("printtype") ? string.Empty : row.Field <string>("printtype"); entity.printernm = row.IsNull("printernm") ? string.Empty : row.Field <string>("printernm"); entity.faxto1 = row.IsNull("faxto1") ? string.Empty : row.Field <string>("faxto1"); entity.faxto2 = row.IsNull("faxto2") ? string.Empty : row.Field <string>("faxto2"); entity.faxphoneno = row.IsNull("faxphoneno") ? string.Empty : row.Field <string>("faxphoneno"); entity.faxfrom = row.IsNull("faxfrom") ? string.Empty : row.Field <string>("faxfrom"); entity.faxcom = row.IsNull("faxcom") ? string.Empty : row.Field <string>("faxcom"); entity.faxpriorityfl = row.Field <bool>("faxpriorityfl"); entity.filefl = row.Field <bool>("filefl"); entity.printoptfl = row.Field <bool>("printoptfl"); entity.queue = row.IsNull("queue") ? string.Empty : row.Field <string>("queue"); entity.queueenabled = row.Field <bool>("queueenabled"); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.whsevisible = row.Field <bool>("whsevisible"); entity.whseprtno = row.IsNull("whseprtno") ? 0 : row.Field <int>("whseprtno"); entity.oeprintype = row.IsNull("oeprintype") ? string.Empty : row.Field <string>("oeprintype"); entity.emailaddr = row.IsNull("emailaddr") ? string.Empty : row.Field <string>("emailaddr"); entity.outputover = row.IsNull("outputover") ? string.Empty : row.Field <string>("outputover"); return(entity); }