示例#1
0
 /// <summary>
 /// Update a database row from a class
 /// </summary>
 public static void UpdateRowFromPorrarlineqtybreak(ref DataRow row, Porrarlineqtybreak entity)
 {
     row.SetField("rowid-poeral", entity.rowidPoeral.ToByteArray());
     row.SetField("title1", entity.title1);
     row.SetField("title2", entity.title2);
     row.SetField("upto1", entity.upto1);
     row.SetField("qtybreak1", entity.qtybreak1);
     row.SetField("price1", entity.price1);
     row.SetField("upto2", entity.upto2);
     row.SetField("qtybreak2", entity.qtybreak2);
     row.SetField("price2", entity.price2);
     row.SetField("upto3", entity.upto3);
     row.SetField("qtybreak3", entity.qtybreak3);
     row.SetField("price3", entity.price3);
     row.SetField("upto4", entity.upto4);
     row.SetField("qtybreak4", entity.qtybreak4);
     row.SetField("price4", entity.price4);
     row.SetField("upto5", entity.upto5);
     row.SetField("qtybreak5", entity.qtybreak5);
     row.SetField("price5", entity.price5);
     row.SetField("upto6", entity.upto6);
     row.SetField("qtybreak6", entity.qtybreak6);
     row.SetField("price6", entity.price6);
     row.SetField("upto7", entity.upto7);
     row.SetField("qtybreak7", entity.qtybreak7);
     row.SetField("price7", entity.price7);
     row.SetField("upto8", entity.upto8);
     row.SetField("qtybreak8", entity.qtybreak8);
     row.SetField("price8", entity.price8);
     row.SetField("price9", entity.price9);
 }
示例#2
0
        public static Porrarlineqtybreak BuildPorrarlineqtybreakFromRow(DataRow row)
        {
            Porrarlineqtybreak entity = new Porrarlineqtybreak();

            entity.rowidPoeral = row.Field <byte[]>("rowid-poeral").ToStringEncoded();
            entity.title1      = row.IsNull("title1") ? string.Empty : row.Field <string>("title1");
            entity.title2      = row.IsNull("title2") ? string.Empty : row.Field <string>("title2");
            entity.upto1       = row.IsNull("upto1") ? string.Empty : row.Field <string>("upto1");
            entity.qtybreak1   = row.IsNull("qtybreak1") ? 0 : row.Field <int>("qtybreak1");
            entity.price1      = row.IsNull("price1") ? decimal.Zero : row.Field <decimal>("price1");
            entity.upto2       = row.IsNull("upto2") ? string.Empty : row.Field <string>("upto2");
            entity.qtybreak2   = row.IsNull("qtybreak2") ? 0 : row.Field <int>("qtybreak2");
            entity.price2      = row.IsNull("price2") ? decimal.Zero : row.Field <decimal>("price2");
            entity.upto3       = row.IsNull("upto3") ? string.Empty : row.Field <string>("upto3");
            entity.qtybreak3   = row.IsNull("qtybreak3") ? 0 : row.Field <int>("qtybreak3");
            entity.price3      = row.IsNull("price3") ? decimal.Zero : row.Field <decimal>("price3");
            entity.upto4       = row.IsNull("upto4") ? string.Empty : row.Field <string>("upto4");
            entity.qtybreak4   = row.IsNull("qtybreak4") ? 0 : row.Field <int>("qtybreak4");
            entity.price4      = row.IsNull("price4") ? decimal.Zero : row.Field <decimal>("price4");
            entity.upto5       = row.IsNull("upto5") ? string.Empty : row.Field <string>("upto5");
            entity.qtybreak5   = row.IsNull("qtybreak5") ? 0 : row.Field <int>("qtybreak5");
            entity.price5      = row.IsNull("price5") ? decimal.Zero : row.Field <decimal>("price5");
            entity.upto6       = row.IsNull("upto6") ? string.Empty : row.Field <string>("upto6");
            entity.qtybreak6   = row.IsNull("qtybreak6") ? 0 : row.Field <int>("qtybreak6");
            entity.price6      = row.IsNull("price6") ? decimal.Zero : row.Field <decimal>("price6");
            entity.upto7       = row.IsNull("upto7") ? string.Empty : row.Field <string>("upto7");
            entity.qtybreak7   = row.IsNull("qtybreak7") ? 0 : row.Field <int>("qtybreak7");
            entity.price7      = row.IsNull("price7") ? decimal.Zero : row.Field <decimal>("price7");
            entity.upto8       = row.IsNull("upto8") ? string.Empty : row.Field <string>("upto8");
            entity.qtybreak8   = row.IsNull("qtybreak8") ? 0 : row.Field <int>("qtybreak8");
            entity.price8      = row.IsNull("price8") ? decimal.Zero : row.Field <decimal>("price8");
            entity.price9      = row.IsNull("price9") ? decimal.Zero : row.Field <decimal>("price9");
            return(entity);
        }