Пример #1
0
        public static void PopulateService(Service input, System.Data.IDataReader reader)
        {
            PopulateRecord(input, reader);
            input.RecordId = input.ServiceId = Utilities.ToInt(reader[Medical.Apartment.Common.Service.ColumnNames.ServiceId]);
            input.OrganisationId = Utilities.ToInt(reader[Medical.Apartment.Common.Service.ColumnNames.OrganisationId]);
            input.Name = Utilities.ToString(reader[Medical.Apartment.Common.Service.ColumnNames.Name]);
            input.Description = Utilities.ToString(reader[Medical.Apartment.Common.Service.ColumnNames.Description]);
            input.IsLegacy = Utilities.ToBool(reader[Medical.Apartment.Common.Service.ColumnNames.IsLegacy]);
            input.Price = Utilities.ToNDecimal(reader[Medical.Apartment.Common.Service.ColumnNames.Price]);
            input.Unit = Utilities.ToString(reader[Medical.Apartment.Common.Service.ColumnNames.Unit]);

        }
Пример #2
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;

        }
Пример #3
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;
        }