本文介绍了功能想要执行每个月的第一天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

private void GetREOSMSDetails()
        {
            string revMail = "[email protected]";
            try
            {
                Templaterev = "";
                SQl = "WS_REO_SMS_Service'";
                REOcoursedr = GDrr.ReadSql(SQl);
                while (REOcoursedr.Read())
                {
                    Templaterev = string.Format(Templates.RevalidationCompletionMessage, REOcoursedr[0].ToString().Trim(), REOcoursedr[2].ToString().Trim(),revMail);
                    SendSMS("ret", REOcoursedr[1].ToString().Trim());
                }
                eventLog1.WriteEntry("Revalidation SMS sent successfully");
                REOcoursedr.Close();
            }
            catch (Exception ex1)
            {
                eventLog1.WriteEntry("Error in GetREOSMSDetails : " + ex1.Message, EventLogEntryType.Error);
            }
        }


        private void Timer1_Elapsed(object source, ElapsedEventArgs e)
        {
             string Tme3;
             string Hourreo, Minutereo, Secondreo;
             Hourreo = "7";
             Minutereo = "01";
             Secondreo = "00";
            Tme3 = Hourreo.ToString() + ":" + Minutereo.ToString() + ":" + Secondreo.ToString();

              if (DateTime.Now.ToString("HH:mm:ss") == Tme3.ToString())
                {
                    GetREOSMSDetails();
                }

        }





来自我上面的代码我想执行GetREOSMSDetails()函数只有每个月的第一天,我怎么能用csharp。





问候,

Narasiman P



from my above code i want to execute the GetREOSMSDetails() function only first day of every month for that how can i do using csharp.


Regards,
Narasiman P

推荐答案


这篇关于功能想要执行每个月的第一天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-08 10:19