hello

Tuesday, 12 June 2012

create reminder in c# (anil kumar software doveloper alwar rajasthan)

File
>globle
<%@ Application Language="C#" %><script RunAt="server">
{
System.Timers.
void Application_Start(object sender, EventArgs e)Timer myTimer = new System.Timers.Timer();// Set the Interval to 5 seconds (5000 milliseconds).myTimer.Interval = 36000000;
myTimer.AutoReset =
myTimer.Elapsed +=
myTimer.Enabled =
}

{

bjcls.Reminder();
}
true;new System.Timers.ElapsedEventHandler(myTimer_Elapsed);true;public void myTimer_Elapsed(object source, System.Timers.ElapsedEventArgs e)clsConnection objcls = new clsConnection();</
app code .cs
public
{


{



{
con.ConnectionString = constr;
con.Open();
}


com.CommandText = str;
com.Connection = con;
da.SelectCommand = com;
da.Fill(ds);
con.Close();


{



{
con.ConnectionString = constr;
con.Open();
}

com.CommandText = str2;
com.Connection = con;
da.SelectCommand = com;
s1 =
con.Close();
mailsend1(s1);

{
con.ConnectionString = constr;
con.Open();
}


com.CommandText = str22;
com.Connection = con;
da.SelectCommand = com;
da.Fill(ds2);
con.Close();

{


{ con.ConnectionString = constr; con.Open(); }

com.CommandText = str222;
com.Connection = con;
da.SelectCommand = com;
s12 =
con.Close();
mailsend1(s12);
}
}
}
}


{
mail =
mail.From =
mail.To.Add(
mail.Subject =
mail.Body =

smtpMail.Port = 25;
smtpMail.Host =
smtpMail.Send(mail);
}
void Reminder()string d = System.DateTime.Now.Hour.ToString();if (d == "14")string s1;string s12;if (con.State == ConnectionState.Closed)DataSet ds = new DataSet();string str = "SELECT * FROM RAIL_ACTION_DETAIL where REMINDER_DATE='" + System.DateTime.Now.ToString("MM/dd/yyyy") + "'";int i;for (i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)String m = ds.Tables[0].Rows[i].ItemArray[0].ToString();String m1 = ds.Tables[0].Rows[i].ItemArray[3].ToString();if (con.State == ConnectionState.Closed)string str2 = "SELECT e.mail_id FROM RAIL_ACTION_MST as m left outer join hr_emp_mst as e on e.signm_id=m.ASSIGNER_SIGNUM where ACTION_ID='" + m + "'";Convert.ToString(com.ExecuteScalar());if (con.State == ConnectionState.Closed)DataSet ds2 = new DataSet();string str22 = "SELECT * FROM RAIL_SUPPORT_TEAM where ACTION_ID='" + m + "'";for (i = 0; i <= ds2.Tables[0].Rows.Count - 1; i++)String m12 = ds2.Tables[0].Rows[i].ItemArray[2].ToString();if (con.State == ConnectionState.Closed)string str222 = "SELECT mail_id from hr_emp_mst where signm_id='" + m12 + "'";Convert.ToString(com.ExecuteScalar());public void mailsend1(string tomailid)new MailMessage();new MailAddress("anil.j.kumar@ericsson.com ");new MailAddress(tomailid));" PEMINDER FOR ROAILING ACTION ITEM LIST";"Message";SmtpClient smtpMail = new SmtpClient();"hostname";
script>

No comments:

Post a Comment