Exemplo n.º 1
0
        public static Service Service(System.Data.IDataReader reader)
        {
            Service result = null;

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

            return result;
        }
Exemplo n.º 2
0
 public static void PopulateService(Service input, System.Data.IDataReader reader)
 {
     PopulateRecord(input, reader);
     input.RecordId = input.ServiceId = Utilities.ToInt(reader[Mimosa.Apartment.Common.Service.ColumnNames.ServiceId]);
     input.OrganisationId = Utilities.ToInt(reader[Mimosa.Apartment.Common.Service.ColumnNames.OrganisationId]);
     input.Name = Utilities.ToString(reader[Mimosa.Apartment.Common.Service.ColumnNames.Name]);
     input.Description = Utilities.ToString(reader[Mimosa.Apartment.Common.Service.ColumnNames.Description]);
     input.IsLegacy = Utilities.ToBool(reader[Mimosa.Apartment.Common.Service.ColumnNames.IsLegacy]);
     input.Price = Utilities.ToNDecimal(reader[Mimosa.Apartment.Common.Service.ColumnNames.Price]);
     input.Unit = Utilities.ToString(reader[Mimosa.Apartment.Common.Equipment.ColumnNames.Unit]);
 }
Exemplo n.º 3
0
 void gvwServices_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
 {
     Service newItem = new Service();
     newItem.RecordId = null;
     newItem.CreatedBy = Globals.UserLogin.UserName;
     newItem.OrganisationId = Globals.UserLogin.UserOrganisationId;
     newItem.IsChanged = true;
     e.NewObject = newItem;
 }