Exemplo n.º 1
0
        public pDetails_Manual(clsDoctor d)
        {
            //BindingContext = d;

            InitializeComponent();
            //khai báo từng đối tượng và gắn dữ liệu vào từng đối tượng

            lblName.Text        = d.Name;
            lblTitle.Text       = d.Title;
            lblPhoneNumber.Text = d.PhoneNumber;
            lblAddress.Text     = d.Address;
            img1.Source         = new Uri(d.ImagePath);
        }
Exemplo n.º 2
0
        public pDetails(clsDoctor d)
        {
            doctor  = d;
            doctor1 = new clsDoctor()
            {
                Name        = d.Name,
                Title       = d.Title,
                PhoneNumber = d.PhoneNumber,
                Address     = d.Address,
                ImagePath   = d.ImagePath
            };
            //dùng bindingcontext của ms, gắn dữ liêu trong file xaml
            BindingContext = doctor1;

            InitializeComponent();
            Title = "Edit Doctor";

            //lblName.Text = d.Name;
            //lblTitle.Text = d.Title;
            //lblPhoneNumber.Text = d.PhoneNumber;
            //lblAddress.Text = d.Address;
            //img1.Source = new Uri(d.ImagePath);
        }
Exemplo n.º 3
0
        public pDetails(clsDoctor d, string mode)
        {
            _mode = mode;

            doctor  = d;
            doctor1 = new clsDoctor()
            {
                Name        = "",
                Title       = "",
                PhoneNumber = "",
                Address     = "",
                ImagePath   = ""
            };
            //dùng bindingcontext của ms, gắn dữ liêu trong file xaml
            BindingContext = doctor1;

            InitializeComponent();
            Title = "New Doctor";
            //lblName.Text = d.Name;
            //lblTitle.Text = d.Title;
            //lblPhoneNumber.Text = d.PhoneNumber;
            //lblAddress.Text = d.Address;
            //img1.Source = new Uri(d.ImagePath);
        }
Exemplo n.º 4
0
        private void Add_Clicked(object sender, EventArgs e)
        {
            clsDoctor m = new clsDoctor();

            Navigation.PushAsync(new pDetails(m, "add"));
        }
Exemplo n.º 5
0
        private void ItemTapped(object sender, ItemTappedEventArgs e)
        {
            clsDoctor m = (clsDoctor )e.Item;

            Navigation.PushAsync(new pDetails(m));
        }