コード例 #1
0
 internal int NumberSeasons(clsSeason seasonPeque)
 {
     if (this.SXSeasonID == seasonPeque.SXSeasonID)
     {
         return(2);
     }
     if (this.SXSeasonPrecID == seasonPeque.SXSeasonID)
     {
         return(1);
     }
     return(0);
 }
コード例 #2
0
        internal int SaveVorder()
        {
            clsSeason mySea = new clsSeason();

            mySea.GetSeasonByID(this.SeasonID);

            string sql = "INSERT INTO " + clsGlobals.Gesin + "[tblGIScVorder] ([DivisionID],[VendorID],[VendorSiteID],[DefaultWarehouseID],[CollectionID]," +
                         "[SeasonID],[PurchaseTypeID],[ReferenceNo1],[ReferenceNo2],[ExpShippingDate],[ExpArrivalDate],[OrderTotalQty]," +
                         "[VOStatus],[CreatedByUserID],[CreatedDate],[VONote],[VOMessage],[PDFPrinted])VALUES (" + this.DivisionID + "," +
                         this.VendorID + "," + this.VendorSiteID + "," + this.DefaultWarehouseID + "," + this.CollectionID + "," + mySea.SXSeasonID +
                         "," + this.PurchaseTypeID + ",'" + this.ReferenceNo1 + "','" + this.ReferenceNo2 + "','" + this.ExpShippingDate + "','" +
                         this.ExpArrivalDate + "'," + this.OrderTotalQty + "," + this.VOStatus + "," + clsGlobals.GIPar.UserID + ",GETDATE(),'" +
                         this.VONote + "','" + this.VOMessage + "',0)";

            //Conexion.StartSession();
            Conexion.GDatos.RunSql(sql);
            sql = "SELECT MAX([GIVOID])FROM " + clsGlobals.Gesin + "[tblGIScVorder]";
            int giVOID = Convert.ToInt32(Conexion.GDatos.GetScalarValueSql(sql));

            Conexion.EndSession();
            return(giVOID);
        }