コード例 #1
0
    protected void BookedSlotsRptr_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        EmailLbl.Text        = string.Empty;
        NameLbl.Text         = string.Empty;
        AgeLbl.Text          = string.Empty;
        PhoneLbl.Text        = string.Empty;
        PrescriptionTxt.Text = string.Empty;
        LabTestTxt.Text      = string.Empty;

        if (e.CommandName == "getBookingId")
        {
            BookingId = Convert.ToInt32(e.CommandArgument);
        }
        string query  = "select Name, Email, Gender, Phone from PatientDetails where UserId = (select PatientId  from BookingDetails where BookingId= '" + BookingId + "') ";
        var    reader = all.ExeReader(query);

        {
            if (reader.Read())
            {
                NameLbl.Text  = reader["Name"].ToString();
                EmailLbl.Text = reader["Email"].ToString();
                AgeLbl.Text   = reader["Gender"].ToString();
                PhoneLbl.Text = reader["Phone"].ToString();
            }
        }
    }
コード例 #2
0
    protected void SlotpickerBtn_Click(object sender, EventArgs e)
    {
        string query = "SELECT m_open, m_close, e_open, e_close  FROM doc_timings WHERE doc_id = '" + Session["docid"] + "'";

        var reader = all.ExeReader(query);

        if (reader.Read())
        {
            mOpen  = Convert.ToInt32(reader["m_open"]);
            mClose = Convert.ToInt32(reader["m_close"]);
            eOpen  = Convert.ToInt32(reader["e_open"]);
            eClose = Convert.ToInt32(reader["e_close"]);
        }
        all.CloseConnection();
        string query1 = "select  convert(char(5), slot_time , 108) [time],slot_id from doc_slots where slot_id >= '" + mOpen + "'AND slot_id <='" + mClose + "' AND slot_id not in (select Slotid from BookingDetails where Date ='" + datepicker.Text + "')";

        all.Repeater(MorningSlotRptr, query1);
        string query2 = "select  convert(char(5), slot_time , 108) [time],slot_id from doc_slots where slot_id >= '" + eOpen + "' AND slot_id <='" + eClose + "' AND slot_id not in (select Slotid from BookingDetails where Date ='" + datepicker.Text + "')";

        all.Repeater(EveningSlotRptr, query2);
        MorningSlotRptr.Visible    = true;
        EveningSlotRptr.Visible    = true;
        head1.Visible              = true;
        head2.Visible              = true;
        SlotpickerBtn.Visible      = false;
        BookAppointmentBtn.Enabled = true;
    }