Ejemplo n.º 1
0
        private void FillViewCard(int id)
        {
            string sqlString = "SELECT BASE_CALENDAR.*,CONVERT(VARCHAR(10),BASE_CALENDAR.STARTDATE,105) AS DATA, CONVERT(VARCHAR(5),BASE_CALENDAR.STARTDATE,114) AS DALLE,CONVERT(VARCHAR(5),BASE_CALENDAR.ENDDATE,114) AS ALLE, ";

            sqlString += "(ACCOUNT.SURNAME+' '+ACCOUNT.NAME) AS USERNAME ";
            sqlString += "FROM BASE_CALENDAR LEFT OUTER JOIN ACCOUNT ON BASE_CALENDAR.UID = ACCOUNT.UID WHERE BASE_CALENDAR.ID=" + id;
            ViewAppointmentForm.DataSource = DatabaseConnection.CreateDataset(sqlString);
            ViewAppointmentForm.DataBind();
        }
Ejemplo n.º 2
0
        private void FillViewCard(int id)
        {
            string sqlString = "SELECT BASE_EVENTS.*, ";

            sqlString += "(ACCOUNT.SURNAME+' '+ACCOUNT.NAME) AS USERNAME,  (CREATEDBY.SURNAME+' '+CREATEDBY.NAME) AS CREATEUTE ";
            sqlString += "FROM BASE_EVENTS LEFT OUTER JOIN ACCOUNT ON BASE_EVENTS.UID = ACCOUNT.UID LEFT OUTER JOIN ACCOUNT AS CREATEDBY ON BASE_EVENTS.CREATEDBYID = CREATEDBY.UID WHERE BASE_EVENTS.ID=" + id;

            Trace.Warn("ma", sqlString);

            ViewAppointmentForm.DataSource = DatabaseConnection.CreateDataset(sqlString);
            ViewAppointmentForm.DataBind();
            ViewAppointmentForm.Visible = true;
            AppointmentCard.Visible     = false;
        }
 private void btnViewPatientApts_Click(object sender, EventArgs e)
 {
     if (this.patientDataGridView.SelectedRows.Count == 0)
     {
         MessageBox.Show(this, Resources.MainForm_buttonAddAppointment_Click_Please_select_a_user,
                         Resources.MainForm_buttonAddAppointment_Click_Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     else
     {
         var patientId   = ((Patient)this.patientDataGridView.SelectedRows[0].DataBoundItem).PatientId;
         var patientApts = new ViewAppointmentForm(patientId);
         patientApts.ShowDialog();
     }
 }
Ejemplo n.º 4
0
        private void FillViewCard(int id)
        {
            string sqlString = "SELECT BASE_CALENDAR.*,CONVERT(VARCHAR(10),BASE_CALENDAR.STARTDATE,105) AS DATA, CONVERT(VARCHAR(5),BASE_CALENDAR.STARTDATE,114) AS DALLE,CONVERT(VARCHAR(5),BASE_CALENDAR.ENDDATE,114) AS ALLE, " +
                               "(ACCOUNT.SURNAME+' '+ACCOUNT.NAME) AS USERNAME " +
                               "FROM BASE_CALENDAR LEFT OUTER JOIN ACCOUNT ON BASE_CALENDAR.UID = ACCOUNT.UID WHERE BASE_CALENDAR.ID=@ID AND BASE_CALENDAR.UID=@UID";
            DbSqlParameterCollection p = new DbSqlParameterCollection();

            p.Add(new DbSqlParameter("@ID", id));
            p.Add(new DbSqlParameter("@UID", ((UC.ImpersonateUser != 0) ? UC.ImpersonateUser : UC.UserId)));
            DataSet d = DatabaseConnection.SecureCreateDataset(sqlString, p);

            if (d.Tables[0].Rows.Count > 0)
            {
                ViewAppointmentForm.DataSource = d;
                ViewAppointmentForm.DataBind();
                ViewAppointmentForm.Visible = true;
                AppointmentCard.Visible     = false;
            }
            else
            {
                Response.Redirect("/today.aspx?logoff=true");
            }
        }
        private void buttonViewAppointments_Click(object sender, EventArgs e)
        {
            var viewAppointments = new ViewAppointmentForm();

            viewAppointments.ShowDialog();
        }