Example #1
0
        /// <summary>
        /// Create a new ORDER object.
        /// </summary>
        /// <param name="oRDERID">Initial value of the ORDERID property.</param>
        /// <param name="dATA">Initial value of the DATA property.</param>
        /// <param name="cUSTOMERID">Initial value of the CUSTOMERID property.</param>
        public static ORDER CreateORDER(global::System.Int16 oRDERID, global::System.DateTime dATA, global::System.Int16 cUSTOMERID)
        {
            ORDER oRDER = new ORDER();

            oRDER.ORDERID    = oRDERID;
            oRDER.DATA       = dATA;
            oRDER.CUSTOMERID = cUSTOMERID;
            return(oRDER);
        }
Example #2
0
        public Order GetOrder(int orderId)
        {
            ORDER OR = DB.selectOrder(Convert.ToInt16(orderId));
            Order or = new Order();

            or.id   = OR.ORDERID;
            or.data = Convert.ToString(OR.DATA);
            or.idC  = OR.CUSTOMERID;
            try{
                or.valoare = Convert.ToDecimal(OR.VALOARE);
            }
            catch {}
            return(or);
        }
Example #3
0
        public static bool addOrder(DateTime data, Int16 costumerId, Decimal valoare = -1)
        {
            bool added = false;

            using (var testEntities = new TestEntities())
            {
                ORDER order = new ORDER();

                order.DATA       = data;
                order.CUSTOMERID = costumerId;
                if (valoare != -1)
                {
                    order.VALOARE = valoare;
                }
                testEntities.AddToORDER(order);
                testEntities.SaveChanges();
                added = true;
            }
            return(added);
        }
Example #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ORDER EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToORDER(ORDER oRDER)
 {
     base.AddObject("ORDER", oRDER);
 }