/// <summary> /// Update a database row from a class /// </summary> public static void UpdateRowFromVaeasplitdata(ref DataRow row, Vaeasplitdata entity) { row.SetField("whse", entity.whse); row.SetField("prod", entity.prod); row.SetField("lotno", entity.lotno); row.SetField("seqno", entity.seqno); row.SetField("width1p1", entity.width1p1); row.SetField("width1p2", entity.width1p2); row.SetField("length1p1", entity.length1p1); row.SetField("length1p2", entity.length1p2); row.SetField("width2p1", entity.width2p1); row.SetField("width2p2", entity.width2p2); row.SetField("length2p1", entity.length2p1); row.SetField("length2p2", entity.length2p2); row.SetField("width3p1", entity.width3p1); row.SetField("width3p2", entity.width3p2); row.SetField("length3p1", entity.length3p1); row.SetField("length3p2", entity.length3p2); row.SetField("initqty", entity.initqty); row.SetField("conditioncd", entity.conditioncd); row.SetField("cutwidth1p1", entity.cutwidth1p1); row.SetField("cutwidth1p2", entity.cutwidth1p2); row.SetField("cutlength1p1", entity.cutlength1p1); row.SetField("cutlength1p2", entity.cutlength1p2); row.SetField("cutwidth2p1", entity.cutwidth2p1); row.SetField("cutwidth2p2", entity.cutwidth2p2); row.SetField("cutlength2p1", entity.cutlength2p1); row.SetField("cutlength2p2", entity.cutlength2p2); row.SetField("cutwidth3p1", entity.cutwidth3p1); row.SetField("cutwidth3p2", entity.cutwidth3p2); row.SetField("cutlength3p1", entity.cutlength3p1); row.SetField("cutlength3p2", entity.cutlength3p2); row.SetField("cutqty", entity.cutqty); row.SetField("cutconditioncd", entity.cutconditioncd); row.SetField("newwidth1p1", entity.newwidth1p1); row.SetField("newwidth1p2", entity.newwidth1p2); row.SetField("newlength1p1", entity.newlength1p1); row.SetField("newlength1p2", entity.newlength1p2); row.SetField("newwidth2p1", entity.newwidth2p1); row.SetField("newwidth2p2", entity.newwidth2p2); row.SetField("newlength2p1", entity.newlength2p1); row.SetField("newlength2p2", entity.newlength2p2); row.SetField("newwidth3p1", entity.newwidth3p1); row.SetField("newwidth3p2", entity.newwidth3p2); row.SetField("newlength3p1", entity.newlength3p1); row.SetField("newlength3p2", entity.newlength3p2); row.SetField("newqty", entity.newqty); row.SetField("width1p1format", entity.width1p1format); row.SetField("width1p2format", entity.width1p2format); row.SetField("length1p1format", entity.length1p1format); row.SetField("length1p2format", entity.length1p2format); row.SetField("width2p1format", entity.width2p1format); row.SetField("width2p2format", entity.width2p2format); row.SetField("length2p1format", entity.length2p1format); row.SetField("length2p2format", entity.length2p2format); row.SetField("width3p1format", entity.width3p1format); row.SetField("width3p2format", entity.width3p2format); row.SetField("length3p1format", entity.length3p1format); row.SetField("length3p2format", entity.length3p2format); row.SetField("lengthp1unit", entity.lengthp1unit); row.SetField("lengthp2unit", entity.lengthp2unit); row.SetField("widthp1unit", entity.widthp1unit); row.SetField("widthp2unit", entity.widthp2unit); row.SetField("lengthp2hidden", entity.lengthp2hidden); row.SetField("widthp2hidden", entity.widthp2hidden); row.SetField("enablethirdsegment", entity.enablethirdsegment); row.SetField("icselcrowid", entity.icselcrowid.ToByteArray()); row.SetField("userfield", entity.userfield); }
public static Vaeasplitdata BuildVaeasplitdataFromRow(DataRow row) { Vaeasplitdata entity = new Vaeasplitdata(); entity.whse = row.IsNull("whse") ? string.Empty : row.Field <string>("whse"); entity.prod = row.IsNull("prod") ? string.Empty : row.Field <string>("prod"); entity.lotno = row.IsNull("lotno") ? string.Empty : row.Field <string>("lotno"); entity.seqno = row.IsNull("seqno") ? 0 : row.Field <int>("seqno"); entity.width1p1 = row.IsNull("width1p1") ? decimal.Zero : row.Field <decimal>("width1p1"); entity.width1p2 = row.IsNull("width1p2") ? decimal.Zero : row.Field <decimal>("width1p2"); entity.length1p1 = row.IsNull("length1p1") ? decimal.Zero : row.Field <decimal>("length1p1"); entity.length1p2 = row.IsNull("length1p2") ? decimal.Zero : row.Field <decimal>("length1p2"); entity.width2p1 = row.IsNull("width2p1") ? decimal.Zero : row.Field <decimal>("width2p1"); entity.width2p2 = row.IsNull("width2p2") ? decimal.Zero : row.Field <decimal>("width2p2"); entity.length2p1 = row.IsNull("length2p1") ? decimal.Zero : row.Field <decimal>("length2p1"); entity.length2p2 = row.IsNull("length2p2") ? decimal.Zero : row.Field <decimal>("length2p2"); entity.width3p1 = row.IsNull("width3p1") ? decimal.Zero : row.Field <decimal>("width3p1"); entity.width3p2 = row.IsNull("width3p2") ? decimal.Zero : row.Field <decimal>("width3p2"); entity.length3p1 = row.IsNull("length3p1") ? decimal.Zero : row.Field <decimal>("length3p1"); entity.length3p2 = row.IsNull("length3p2") ? decimal.Zero : row.Field <decimal>("length3p2"); entity.initqty = row.IsNull("initqty") ? decimal.Zero : row.Field <decimal>("initqty"); entity.conditioncd = row.IsNull("conditioncd") ? string.Empty : row.Field <string>("conditioncd"); entity.cutwidth1p1 = row.IsNull("cutwidth1p1") ? decimal.Zero : row.Field <decimal>("cutwidth1p1"); entity.cutwidth1p2 = row.IsNull("cutwidth1p2") ? decimal.Zero : row.Field <decimal>("cutwidth1p2"); entity.cutlength1p1 = row.IsNull("cutlength1p1") ? decimal.Zero : row.Field <decimal>("cutlength1p1"); entity.cutlength1p2 = row.IsNull("cutlength1p2") ? decimal.Zero : row.Field <decimal>("cutlength1p2"); entity.cutwidth2p1 = row.IsNull("cutwidth2p1") ? decimal.Zero : row.Field <decimal>("cutwidth2p1"); entity.cutwidth2p2 = row.IsNull("cutwidth2p2") ? decimal.Zero : row.Field <decimal>("cutwidth2p2"); entity.cutlength2p1 = row.IsNull("cutlength2p1") ? decimal.Zero : row.Field <decimal>("cutlength2p1"); entity.cutlength2p2 = row.IsNull("cutlength2p2") ? decimal.Zero : row.Field <decimal>("cutlength2p2"); entity.cutwidth3p1 = row.IsNull("cutwidth3p1") ? decimal.Zero : row.Field <decimal>("cutwidth3p1"); entity.cutwidth3p2 = row.IsNull("cutwidth3p2") ? decimal.Zero : row.Field <decimal>("cutwidth3p2"); entity.cutlength3p1 = row.IsNull("cutlength3p1") ? decimal.Zero : row.Field <decimal>("cutlength3p1"); entity.cutlength3p2 = row.IsNull("cutlength3p2") ? decimal.Zero : row.Field <decimal>("cutlength3p2"); entity.cutqty = row.IsNull("cutqty") ? decimal.Zero : row.Field <decimal>("cutqty"); entity.cutconditioncd = row.IsNull("cutconditioncd") ? string.Empty : row.Field <string>("cutconditioncd"); entity.newwidth1p1 = row.IsNull("newwidth1p1") ? decimal.Zero : row.Field <decimal>("newwidth1p1"); entity.newwidth1p2 = row.IsNull("newwidth1p2") ? decimal.Zero : row.Field <decimal>("newwidth1p2"); entity.newlength1p1 = row.IsNull("newlength1p1") ? decimal.Zero : row.Field <decimal>("newlength1p1"); entity.newlength1p2 = row.IsNull("newlength1p2") ? decimal.Zero : row.Field <decimal>("newlength1p2"); entity.newwidth2p1 = row.IsNull("newwidth2p1") ? decimal.Zero : row.Field <decimal>("newwidth2p1"); entity.newwidth2p2 = row.IsNull("newwidth2p2") ? decimal.Zero : row.Field <decimal>("newwidth2p2"); entity.newlength2p1 = row.IsNull("newlength2p1") ? decimal.Zero : row.Field <decimal>("newlength2p1"); entity.newlength2p2 = row.IsNull("newlength2p2") ? decimal.Zero : row.Field <decimal>("newlength2p2"); entity.newwidth3p1 = row.IsNull("newwidth3p1") ? decimal.Zero : row.Field <decimal>("newwidth3p1"); entity.newwidth3p2 = row.IsNull("newwidth3p2") ? decimal.Zero : row.Field <decimal>("newwidth3p2"); entity.newlength3p1 = row.IsNull("newlength3p1") ? decimal.Zero : row.Field <decimal>("newlength3p1"); entity.newlength3p2 = row.IsNull("newlength3p2") ? decimal.Zero : row.Field <decimal>("newlength3p2"); entity.newqty = row.IsNull("newqty") ? decimal.Zero : row.Field <decimal>("newqty"); entity.width1p1format = row.IsNull("width1p1format") ? string.Empty : row.Field <string>("width1p1format"); entity.width1p2format = row.IsNull("width1p2format") ? string.Empty : row.Field <string>("width1p2format"); entity.length1p1format = row.IsNull("length1p1format") ? string.Empty : row.Field <string>("length1p1format"); entity.length1p2format = row.IsNull("length1p2format") ? string.Empty : row.Field <string>("length1p2format"); entity.width2p1format = row.IsNull("width2p1format") ? string.Empty : row.Field <string>("width2p1format"); entity.width2p2format = row.IsNull("width2p2format") ? string.Empty : row.Field <string>("width2p2format"); entity.length2p1format = row.IsNull("length2p1format") ? string.Empty : row.Field <string>("length2p1format"); entity.length2p2format = row.IsNull("length2p2format") ? string.Empty : row.Field <string>("length2p2format"); entity.width3p1format = row.IsNull("width3p1format") ? string.Empty : row.Field <string>("width3p1format"); entity.width3p2format = row.IsNull("width3p2format") ? string.Empty : row.Field <string>("width3p2format"); entity.length3p1format = row.IsNull("length3p1format") ? string.Empty : row.Field <string>("length3p1format"); entity.length3p2format = row.IsNull("length3p2format") ? string.Empty : row.Field <string>("length3p2format"); entity.lengthp1unit = row.IsNull("lengthp1unit") ? string.Empty : row.Field <string>("lengthp1unit"); entity.lengthp2unit = row.IsNull("lengthp2unit") ? string.Empty : row.Field <string>("lengthp2unit"); entity.widthp1unit = row.IsNull("widthp1unit") ? string.Empty : row.Field <string>("widthp1unit"); entity.widthp2unit = row.IsNull("widthp2unit") ? string.Empty : row.Field <string>("widthp2unit"); entity.lengthp2hidden = row.Field <bool>("lengthp2hidden"); entity.widthp2hidden = row.Field <bool>("widthp2hidden"); entity.enablethirdsegment = row.Field <bool>("enablethirdsegment"); entity.icselcrowid = row.Field <byte[]>("icselcrowid").ToStringEncoded(); entity.userfield = row.IsNull("userfield") ? string.Empty : row.Field <string>("userfield"); return(entity); }