Avatar of Tech_Men
Tech_Men
Flag for Israel asked on

scheduled deal

hi there ,

i my program i have a scheduled deals for exsample :

i have a payper deal the customer want to publish an adds in my payper
the adds need to be published every 7 days from the start day
and every 7 days i need to decrease the performance shows from the deal

if custoer a have 24 Shows and every 7 days there is a show in the payper i need to update the Performance show to 22
if 14 days are over from the deal strat day .


how can i do it ?

thanks ....
C#

Avatar of undefined
Last Comment
Tech_Men

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
whatsit2002

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Tech_Men

ASKER
this is what i am trying to do  :

SqlConnection MyCon = new SqlConnection();
MyCon.ConnectionString = BL.Conn.ConnString();
MyCon.Close();
MyCon.Open();

                IDbCommand cmd = MyCon.CreateCommand();
                cmd.CommandText = "SELECT * FROM SpyDeal";
      IDataReader reader8 = cmd.ExecuteReader();

      while (reader8.Read())
      {
                      int Every = Int32.Parse(reader8["MofaEvery"].ToString()); // this is the num of days
            DateTime dt = (DateTime)(reader8["LastDateShow"]); // from this date i need to count forward
            DateTime dt2 = dt.AddDays(Every); // if the dt2 is == to the Every i need to do something
                        
            TimeSpan Diff = dt2 - dt;
            
            // i need to chek if the dt are >= dt2  how can i do it ?


      {
                        
}
      reader8.Close();
      MyCon.Close();
            
}
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes