示例#1
0
 public static void PopulateEquipment(Equipment input, System.Data.IDataReader reader)
 {
     PopulateRecord(input, reader);
     input.RecordId = input.EquipmentId = Utilities.ToInt(reader[Mimosa.Apartment.Common.Equipment.ColumnNames.EquipmentId]);
     input.OrganisationId = Utilities.ToInt(reader[Mimosa.Apartment.Common.Equipment.ColumnNames.OrganisationId]);
     input.EquipmentName = Utilities.ToString(reader[Mimosa.Apartment.Common.Equipment.ColumnNames.EquipmentName]);
     input.Description = Utilities.ToString(reader[Mimosa.Apartment.Common.Equipment.ColumnNames.Description]);
     input.IsLegacy = Utilities.ToBool(reader[Mimosa.Apartment.Common.Equipment.ColumnNames.IsLegacy]);
     input.RealPrice = Utilities.ToNDecimal(reader[Mimosa.Apartment.Common.Equipment.ColumnNames.RealPrice]);
     input.RentPrice = Utilities.ToNDecimal(reader[Mimosa.Apartment.Common.Equipment.ColumnNames.RentPrice]);
     input.Unit = Utilities.ToString(reader[Mimosa.Apartment.Common.Equipment.ColumnNames.Unit]);
 }
 void gvwEquipments_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     Equipment newItem = new Equipment();
     newItem.RecordId = null;
     newItem.CreatedBy = Globals.UserLogin.UserName;
     newItem.OrganisationId = Globals.UserLogin.UserOrganisationId;
     newItem.IsChanged = true;
     e.NewObject = newItem;
 }
示例#3
0
        public static Equipment Equipment(System.Data.IDataReader reader)
        {
            Equipment result = null;

            if (null != reader && reader.Read())
            {
                result = new Equipment();
                PopulateEquipment(result, reader);
            }

            return result;
        }