예제 #1
0
 protected void btnUpdate_Click(object sender, EventArgs e)
 {
     try
     {
         lblMessage.Text = string.Empty;
         ImageButton imgEdit = (ImageButton)sender;
         GridViewRow row     = (GridViewRow)imgEdit.NamingContainer;
         Session["Bed_Id"] = Convert.ToInt32(row.Cells[0].Text);
         EntityBedMaster lstB = new BedStatusBLL().GetFloorRoomBed(Convert.ToInt32(Session["Bed_Id"]));
         Session["Floor_Id"] = lstB.FloorNo;
         Session["Room_Id"]  = lstB.RoomId;
         txtBedNo.Text       = Convert.ToString(row.Cells[1].Text);
         txtFloorName.Text   = Convert.ToString(row.Cells[3].Text);
         if (!Convert.ToString(row.Cells[5].Text).Equals(" ", StringComparison.CurrentCultureIgnoreCase))
         {
             txtAllocDate.Text = string.Empty;
         }
         else
         {
             txtAllocDate.Text = string.Empty;
         }
         txtRoomNo.Text = Convert.ToString(row.Cells[2].Text);
         GetBedAlloc();
         GetPatientList();
         btnUpdate.Visible = true;
         BtnSave.Visible   = false;
         MultiView1.SetActiveView(View2);
     }
     catch (Exception ex)
     {
         lblMessage.Text = ex.Message;
     }
 }
예제 #2
0
 private void GetBedAlloc()
 {
     try
     {
         List <sp_GetAllBedAllocResult> ldtDept = new BedStatusBLL().GetAllBedAlloc();
         if (ldtDept.Count > 0)
         {
             dgvDepartment.DataSource = ldtDept;
             dgvDepartment.DataBind();
             Session["DepartmentDetail"] = ldtDept;
             int lintRowcount = ldtDept.Count;
             lblRowCount.Text = "<b>Total Records:</b> " + lintRowcount.ToString();
         }
     }
     catch (Exception ex)
     {
         lblMessage.Text = ex.Message;
     }
 }
        private void GetPatientList()
        {
            try
            {
                DataTable tblCat = new BedStatusBLL().GetAllPatient();
                DataRow   dr     = tblCat.NewRow();
                dr["PKId"]     = 0;
                dr["FullName"] = "---Select---";
                tblCat.Rows.InsertAt(dr, 0);

                //ddlPatientName.DataSource = tblCat;
                //ddlPatientName.DataValueField = "PKId";
                //ddlPatientName.DataTextField = "FullName";
                //ddlPatientName.DataBind();
            }
            catch (Exception ex)
            {
                lblMessage.Text = ex.Message;
            }
        }