public void Delete(WholesalerContractClass WholesalerContract)
 {
     using (DbManager db = new DbManager())
     {
         Accessor.Query.Delete(db, WholesalerContract);
     }
 }
        public void Save(WholesalerContractClass WholesalerContract)
        {
            WholesalerContract.BrandCode = brand.BrandCode;

            using (DbManager db = new DbManager())
            {
                try
                {
                    if (WholesalerContract.RecordNo != 0)
                    {
                        Accessor.Query.Update(db, WholesalerContract);
                    }
                    else
                    {
                        Accessor.Query.Insert(db, WholesalerContract);
                    }
                }
                catch (Exception except)
                {
                    throw new System.ArgumentException(except.Message);
                }
            }
        }