コード例 #1
0
 public ShowBedWindow(bed bed)
 {
     InitializeComponent();
     _viewModel = DataContext as ShowOneBedViewModel;
     if (_viewModel != null)
     {
         _viewModel.Initilize(bed);
         _viewModel.RegistrationBedEvent += viewModel_RegistrationBedEvent;
     }
 }
コード例 #2
0
 public void Initilize(bed bed)
 {
     Bed = new BedForRedact
     {
         Id = bed.Id,
         Floor = bed.room.Floor,
         RoomNumber = bed.room.Number,
         RoomId = bed.RoomId,
         Price = bed.Price,
         Status = bed.Status,
         Mark = bed.Mark,
         OrderBed = new List<order_bed>()
     };
     Recalck();
     PropertyChanged += ShowOneBedViewModel_PropertyChanged;
     Title = "Просмотр места №:" + Bed.Id;
 }
コード例 #3
0
ファイル: IdCard_DAL.cs プロジェクト: atmosphereqq/Hospitals
        public List <bed> Bed_select()
        {
            List <bed>    Bed    = new List <bed>();
            SqlDataReader reader = DBHelper.SectionRoomSelect("p_bed_select");

            while (reader.Read())
            {
                bed B = new bed();
                B.Idsickroom = int.Parse(reader[0] + "");
                B.Idbed      = int.Parse(reader[1] + "");
                B.KId        = int.Parse(reader[2] + "");
                B.State      = reader[3] + "";
                Bed.Add(B);
            }
            DBHelper.con.Close();
            DBHelper.con.Dispose();
            DBHelper.cmd.Dispose();
            return(Bed);
        }
コード例 #4
0
 public BedForSelect(bed bed)
 {
     Bed = bed;
     Status =
         ProjectSettings.DbContext.status.Where(item => item.ForBed && item.Id==bed.Status).Select(item => item.Text).FirstOrDefault();
 }