private int Insert_Order(decimal Total_All, string Name, string OrderCode, string Email, string Address, int PaymentID, Guid News_guid, string Desc, DateTime Date, string Phone, decimal ship)
        {
            int _orderID = -1;
            ESHOP_ORDER _order = new ESHOP_ORDER();
            _order.ORDER_TOTAL_ALL = Total_All;
            _order.ORDER_TOTAL_AMOUNT = ship > 0 ? Total_All + ship : Total_All;
            _order.ORDER_SHIPPING_FEE = ship;
            _order.ORDER_NAME = Name;
            _order.ORDER_CODE = OrderCode;
            _order.ORDER_EMAIL = Email;
            _order.ORDER_ADDRESS = Address;
            _order.ORDER_PAYMENT = PaymentID;
            _order.CUSTOMER_OID = News_guid;
            _order.ORDER_PUBLISHDATE = DateTime.Now;
            _order.ORDER_STATUS = 0;
            _order.ORDER_FIELD1 = Desc;
            _order.ORDER_UPDATE = Date;
            _order.ORDER_PHONE = Phone;
            db.ESHOP_ORDERs.InsertOnSubmit(_order);
            db.SubmitChanges();

            var _getOrderID = db.GetTable<ESHOP_ORDER>().Where(a => a.CUSTOMER_OID == News_guid);
            _orderID = _getOrderID.ToList()[0].ORDER_ID;
            return _orderID;
        }
 partial void DeleteESHOP_ORDER(ESHOP_ORDER instance);
 partial void InsertESHOP_ORDER(ESHOP_ORDER instance);
 partial void UpdateESHOP_ORDER(ESHOP_ORDER instance);
        //Inser order
        private int Insert_Order(decimal Total_All, string Name, string OrderCode, string Email, string Address, int PaymentID, Guid News_guid, string Desc, DateTime Date, string Phone, decimal ship)
        {
            int _orderID = -1;
            ESHOP_ORDER _order = new ESHOP_ORDER();
            _order.ORDER_TOTAL_ALL = Total_All;
            _order.ORDER_TOTAL_AMOUNT = ship > 0 ? Total_All + ship : Total_All;
            _order.ORDER_SHIPPING_FEE = ship;
            _order.ORDER_NAME = Name;
            _order.ORDER_CODE = OrderCode;
            _order.ORDER_EMAIL = Email;
            _order.ORDER_ADDRESS = Address;
            _order.ORDER_PAYMENT = PaymentID;
            _order.CUSTOMER_OID = News_guid;
            int _iUserID = Utils.CIntDef(HttpContext.Current.Session["USER_ID"]);
            if (_iUserID != 0)
                _order.CUSTOMER_ID = _iUserID;
            else {
                string _code = Utils.CStrDef(HttpContext.Current.Session["User_Code"]);
                string _codecookie =fun.getCookiePartner();
                if (String.IsNullOrEmpty(_code))
                    _code = _codecookie;
                if (!String.IsNullOrEmpty(_code))
                {
                    int _userid =acc.getUserid(_code);
                    _order.CUSTOMER_ID = _userid;
                }
            }
            _order.ORDER_PUBLISHDATE = DateTime.Now;

            _order.ORDER_STATUS = 0;
            _order.ORDER_FIELD1 = Desc;
            _order.ORDER_UPDATE = Date;
            _order.ORDER_PHONE = Phone;
            db.ESHOP_ORDERs.InsertOnSubmit(_order);
            db.SubmitChanges();

            var _getOrderID = db.GetTable<ESHOP_ORDER>().Where(a => a.CUSTOMER_OID == News_guid);
            _orderID = _getOrderID.ToList()[0].ORDER_ID;
            return _orderID;
        }