Exemplo n.º 1
0
 /// <summary>
 /// DatarowToclsOrder(): Transforms a DataRow into a OrderExtended Object
 /// </summary>
 /// <param name="fieldName">DataRow</param>
 /// <returns>OrderExtended-Objekt</returns>
 private clsOrderExtended DatarowToclsOrder(DataRow _dr)
 {
     clsOrderExtended _myOrder = new clsOrderExtended();
     clsHelper h = new clsHelper();
     //und hier die Daten nach Index
     _myOrder.ID = (int)_dr["OID"];
     _myOrder.ProductId = h.AddIntFieldValue(_dr, "OFKProduktId");
     _myOrder.ProductName = h.AddStringFieldValue(_dr, "PName");
     _myOrder.UserId = h.AddIntFieldValue(_dr, "OFKUserId");
     _myOrder.UserName = h.AddStringFieldValue(_dr, "UName");
     _myOrder.OrderDate = Convert.ToDateTime(_dr["ODate"]);
     _myOrder.OrderExtras = h.AddIntFieldValue(_dr, "OExtras");
     _myOrder.OrderSize = h.AddIntFieldValue(_dr, "OSize");
     _myOrder.OrderCount = h.AddIntFieldValue(_dr, "OCount");
     _myOrder.OrderSum = h.AddIntFieldValue(_dr, "OSum");
     _myOrder.OrderDelivery = h.AddBoolFieldValue(_dr, "ODelivery");
     _myOrder.OrderStorno = h.AddIntFieldValue(_dr, "OStorno");
     return _myOrder;
 }
Exemplo n.º 2
0
 /// <summary>
 /// DatarowToClsUser(): Transforms a DataRow into a User Object
 /// </summary>
 /// <param name="fieldName">DataRow</param>
 /// <returns>User-Objekt</returns>
 private clsUser DatarowToClsUser(DataRow _dr)
 {
     clsUser _myUser = new clsUser();
     clsHelper h = new clsHelper();
     //und hier die Daten nach Index
     _myUser.ID = (int)_dr["UID"];
     _myUser.Name = h.AddStringFieldValue(_dr, "UName");
     _myUser.Address = h.AddStringFieldValue(_dr, "UAddress");
     _myUser.Distance = h.AddIntFieldValue(_dr, "UDistance");
         _myUser.IsAdmin = h.AddBoolFieldValue(_dr, "UIsAdmin");
     _myUser.Password = h.AddStringFieldValue(_dr, "UPassword");
     return _myUser;
 }