Ejemplo n.º 1
0
 void item_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
 {
     if (e.PropertyName != "IsChanged")
     {
         BookingRoomServiceDetail item = (BookingRoomServiceDetail)sender;
         item.IsChanged = true;
     }
 }
Ejemplo n.º 2
0
 void gvwServiceDetails_CellEditEnded(object sender, Telerik.Windows.Controls.GridViewCellEditEndedEventArgs e)
 {
     if (e.NewData != null && e.Cell.ParentRow.Item != null)
     {
         BookingRoomServiceDetail currentRow = (BookingRoomServiceDetail)e.Cell.ParentRow.Item;
         string columnName = e.Cell.Column.UniqueName;
         if (currentRow != null && columnName == "Quantity")
         {
             currentRow.TotalPrice = currentRow.Price * currentRow.Quantity;
         }
     }
 }
Ejemplo n.º 3
0
 void gvwServiceDetails_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     if (_bookingRoomServiceItem != null)
     {
         BookingRoomServiceDetail newItem = new BookingRoomServiceDetail();
         newItem.BookingRoomServiceId = this.BookingServiceId;
         newItem.Unit       = _bookingRoomServiceItem.Unit;
         newItem.Price      = _bookingRoomServiceItem.Price;
         newItem.Quantity   = 0;
         newItem.TotalPrice = 0;
         newItem.IsChanged  = true;
         e.NewObject        = newItem;
     }
 }