protected void RefreshFence()
        {
            BusinessTier.CareTakerOperation carer = new BusinessTier.CareTakerOperation();
            BusinessTier.SendNotification noti_sender = new BusinessTier.SendNotification();
            string lati1 = Request["lbl_circle1_lat_name"].ToString();
            string lati2 = Request["lbl_circle2_lat_name"].ToString();

            DataTable table = new DataTable();
            table.Columns.Add("FenceNo");
            table.Columns.Add("Latitude");
            table.Columns.Add("Longitude");
            table.Columns.Add("Radius");
            table.Rows.Add("1", "-27.477806", "153.02073", "100");

            string longi1 = Request["lbl_circle1_log_name"].ToString();
            string radius1 = Request["lbl_circle1_radius_name"].ToString();
            table.Rows.Add("2", lati1, longi1, radius1);
            carer.InsertFence("2", lati1, longi1, radius1);

            string longi2 = Request["lbl_circle2_log_name"].ToString();
            string radius2 = Request["lbl_circle2_radius_name"].ToString();
            table.Rows.Add("3", lati2, longi2, radius2);
            carer.InsertFence("3", lati2, longi2, radius2);

            //noti_sender.SendFenceDataToAndroid();
            noti_sender.SendFenceChangingNotification();
            this.gv_fence_details.DataSource = table;
            this.gv_fence_details.DataBind();
        }
 protected void Button1_Click( object sender, EventArgs e )
 {
     string pid = Request["input_name"].Trim().ToString().ToUpper();
     BusinessTier.CareTakerOperation carer = new BusinessTier.CareTakerOperation();
     this.gv_location.DataSource = carer.GetAllLocationRecordsByID(pid);
     this.gv_location.DataBind();
 }
 protected void btn_mypatients_Click( object sender, EventArgs e )
 {
     string pid = this.txtbox_seach.Text.Trim().ToString().ToUpper();
     Data.DataBase.patientsDataTable table = new Data.DataBase.patientsDataTable();
     BusinessTier.CareTakerOperation caretaker = new BusinessTier.CareTakerOperation();
     if ( pid != null )
     {
         if ( pid.Length > 0 )
         {
             table = caretaker.SearchPatientByID(pid);
             if ( table.Rows.Count > 0 )
             {
                 this.gv_mypatient.DataSource = table;
                 this.gv_mypatient.DataBind();
             }
             else
             {
                 this.lbl_search.Text = "No such patient, please check patient id";
                 this.lbl_search.BackColor = System.Drawing.Color.Red;
             }
         }
         else
         {
             table = caretaker.SelectMyPatientViaID("C0001");
             this.gv_mypatient.DataSource = table;
             this.gv_mypatient.DataBind();
         }
     }
 }
 protected void btn_myassign_Click( object sender, EventArgs e )
 {
     string roleID = this.lbl_careid.Text.ToString().ToUpper();
     Data.DataBase.SelectAllAssignmentDetailsDataTable table = new Data.DataBase.SelectAllAssignmentDetailsDataTable();
     BusinessTier.CareTakerOperation caretaker = new BusinessTier.CareTakerOperation();
     table = caretaker.SelectAssignmentDetailsByRole(roleID);
     this.gv_myassign.DataSource = table;
     this.gv_myassign.DataBind();
 }
        protected void Page_Load( object sender, EventArgs e )
        {
            BusinessTier.CareTakerOperation doctor = new BusinessTier.CareTakerOperation();
            string id = ( string )(Session["RoleID"]);
            this.lbl_docID.Text = id;

            this.gv_location.DataSource = doctor.SelectCurrentLocations();
            this.gv_location.DataBind();

            /*
            Timers time = new Timers();
            time.start();
             * */
        }
        protected void Page_Load( object sender, EventArgs e )
        {
            if ( !Page.IsPostBack )
            {
                BusinessTier.CareTakerOperation carer = new BusinessTier.CareTakerOperation();
                string id = ( string )(Session["RoleID"]);
                this.lbl_careid.Text = id;

                this.gv_location.DataSource = carer.SelectCurrentLocations();
                this.gv_location.DataBind();
                /*
                this.gv_fence_details.DataSource = carer.GetFence();
                this.gv_fence_details.DataBind();
                */
                /*
                Timers time = new Timers();
                time.start();
                 * */
            }
        }
Exemplo n.º 7
0
        static void Main( string[] args )
        {
            BusinessTier.CareTakerOperation carer = new BusinessTier.CareTakerOperation();
            BusinessTier.SendNotification sender = new BusinessTier.SendNotification();
            start();
            //Console.WriteLine(carer.InsertFence("2" ,"24.55555", "154.5555", "104"));
            //Console.WriteLine(sender.SendFenceDataToAndroid());

            //Console.WriteLine(sender.GetStatus());
            //Console.WriteLine(now.ToString());
            //BusinessTier.CareTakerOperation carer = new BusinessTier.CareTakerOperation();
            //Console.WriteLine(sender.GetStatus());
            //BusinessTier.SendNotification sender = new BusinessTier.SendNotification();
            //Console.WriteLine(SendNotificationToUser());
            //Console.WriteLine(sender.SendNotificationToCarer("P0003", "Clement,Here is the test!"));

            //start();
            Console.ReadKey();
        }