Beispiel #1
0
        protected void ImageButtonAdd_Click(object sender, ImageClickEventArgs e)
        {
            Classes.Time t = new Classes.Time();
            string Date = t.ConvertToShamsiDateString(DateTime.Now);

            SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["ProfilesConnectionString"].ConnectionString);
            SqlCommand sqlCmd = new SqlCommand("sp_statsAdd", sqlConn);

            try
            {
                sqlCmd.CommandType = CommandType.StoredProcedure;
                sqlCmd.Parameters.Add("@SubmitDate", SqlDbType.VarChar).Value = Date;

                sqlConn.Open();
                sqlCmd.ExecuteNonQuery();

                sqlCmd.Dispose();
                sqlConn.Dispose();

                DropDownListStats.DataBind();
            }
            catch (Exception ex)
            {

            }
            finally
            {
                sqlConn.Close();
                sqlCmd.Dispose();
                sqlConn.Dispose();
            }
        }
Beispiel #2
0
 protected string ShowDate(Object SubmitDate)
 {
     DateTime Date = Convert.ToDateTime(SubmitDate);
     Classes.Time t = new Classes.Time();
     return t.ConvertToIranTimeString(Date);
 }
 private void OKButton_Click(object sender, RoutedEventArgs e)
 {
     ReturnTime = new Classes.Time(HrUpDwn.Value + (PM.isChecked ? 12 : 0), Min10UpDwn.Value * 10 + Min1UpDwn.Value, 0);
     this.DialogResult = true;
 }