protected void ASPxScheduler1_AppointmentRowInserted(object sender, ASPxSchedulerDataInsertedEventArgs e)
    {
        SqlConnection connection = new SqlConnection(CarsSchedulingDataSource.ConnectionString);
        object        id         = null;

        connection.Open();
        try
        {
            using (SqlCommand cmd = new SqlCommand("SELECT IDENT_CURRENT('CarScheduling')", connection))
                id = Convert.ToInt32(cmd.ExecuteScalar());
            e.KeyFieldValue = id;
        }
        finally
        {
            connection.Close();
        }
    }
 void ControlOnAppointmentRowInserted(object sender, ASPxSchedulerDataInsertedEventArgs e)
 {
     // Autoincremented primary key case
     e.KeyFieldValue = this.lastInsertedAppointmentId;
 }
 protected void ASPxScheduler1_AppointmentRowInserted(object sender,
                                                      ASPxSchedulerDataInsertedEventArgs e)
 {
     // Specify new ID field value.
     e.KeyFieldValue = this.lastInsertedAppointmentId;
 }
Exemple #4
0
 // DXCOMMENT: This handler is called after a new record that contains appointment information has been inserted into the datasource
 protected void Scheduler_AppointmentRowInserted(object sender, ASPxSchedulerDataInsertedEventArgs e)
 {
     // DXCOMMENT: This method sets the value of the key field for the appointment's data record
     e.KeyFieldValue = this.lastInsertedAppointmentId;
 }
 void ControlOnAppointmentRowInserted(object sender, ASPxSchedulerDataInsertedEventArgs e)
 {
     e.KeyFieldValue = this.lastInsertedAppointmentId;
 }
 protected void ASPxScheduler1_AppointmentRowInserted(object sender, ASPxSchedulerDataInsertedEventArgs e)
 {
     e.KeyFieldValue = this.insertedAppointmentsId[this.insertedAppointmentsId.Count - 1];
 }
Exemple #7
0
 // DXCOMMENT: This handler is called after a new record that contains appointment information has been inserted into the datasource
 protected void Scheduler_AppointmentRowInserted(object sender, ASPxSchedulerDataInsertedEventArgs e)
 {
     // DXCOMMENT: This method sets the value of the key field for the appointment's data record
     e.KeyFieldValue = this.lastInsertedAppointmentId;
 }
Exemple #8
0
 protected void ASPxScheduler1_AppointmentRowInserted(object sender, ASPxSchedulerDataInsertedEventArgs e)
 {
     e.KeyFieldValue = this.objectInstance.ObtainLastInsertedId();
 }