Exemple #1
0
 private void GetAdmissionOrInvestigationInfo(string sl, string mm, string yy, int docId)
 {
     strErr = "";
     if (rbtnAdmission.Checked || rbtnInvestigation.Checked)
     {
         var sql = "USP_Get_Admission_Investigation_Info " + sl + "," + mm + "," + yy + "," + (rbtnAdmission.Checked ? "1" : "2") + "," + docId + "," + Utility.DCP;
         objData.OpenConnection("AatickPC-Office", ref strErr);
         var dtInfo = objData.RetriveData(sql, ref strErr);
         objData.CloseConnection();
         if (strErr != "")
         {
             MessageBox.Show("An error occured.\n\nTry again later.");
         }
         else
         {
             if (dtInfo.Rows.Count > 0)
             {
                 grdInfo.DataSource         = dtInfo;
                 grdInfo.Columns[0].Visible = false;
             }
             else
             {
                 MessageBox.Show("No " + (rbtnAdmission.Checked ? "Admission" : "Investigation") + " found.");
                 grdInfo.DataSource = null;
             }
             grdDetails.DataSource = null;
         }
     }
     else
     {
         MessageBox.Show("Please select Admission or Investigation radio button.");
     }
 }
Exemple #2
0
 private void txtinvestigationid_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Enter)
     {
         var arrInvSl = txtinvestigationid.Text.Trim().Split('/');
         if (arrInvSl.Length == 3)
         {
             objData.OpenConnection("AatickPC-Office", ref strErr);
             var strSql =
                 "SELECT PT.Name,PT.PresentAddress,DL.Title+' '+DL.Name+CHAR(13)+DL.Degree+CHAR(13)+DL.Specialist AS DocInfo";
             strSql += " ,dbo.f_Get_Payable_Amount(INV.InvestigationID),dbo.f_get_inv_DiscountAmont(INV.InvestigationID),dbo.f_Get_Inv_PaidAmount(INV.InvestigationID),dbo.f_Get_Inv_ReturnAmount(INV.InvestigationID),INV.InvestigationID,CASE WHEN SP.Paid_Amount>0 THEN 1 ELSE CASE WHEN SP.InvestigationID IS NULL THEN 2 ELSE 0 END END IsPaid,INV.DiscountById,SP.Receive_By,INV.CreatedON ";
             strSql += " FROM dbo_Investigation INV ";
             strSql += " INNER JOIN dbo_Patient_info PT ON PT.P_ID=INV.P_ID";
             strSql += " INNER JOIN dbo_Doctor_List DL ON DL.DocID=INV.DocID";
             strSql += " LEFT JOIN Investigation_SpootCommission SP ON SP.InvestigationID=INV.InvestigationID";
             strSql += " WHERE INV.Invetigation_SL=" + arrInvSl[0] + " AND MONTH(INV.CreatedON)=" + arrInvSl[1] + " AND YEAR(INV.CreatedON)=" + arrInvSl[2];
             var spotCommissionInfo = objData.RetriveData(strSql, ref strErr);
             objData.CloseConnection();
             if (strErr == "" && spotCommissionInfo.Rows.Count > 0)
             {
                 lblName.Text           = spotCommissionInfo.Rows[0][0].ToString();
                 lblAddress.Text        = spotCommissionInfo.Rows[0][1].ToString();
                 lblDoctor.Text         = spotCommissionInfo.Rows[0][2].ToString();
                 lbltotalamount.Text    = spotCommissionInfo.Rows[0][3].ToString();
                 lbltotaldiscount.Text  = spotCommissionInfo.Rows[0][4].ToString();
                 lbltotalpayamount.Text =
                     (double.Parse(spotCommissionInfo.Rows[0][3].ToString()) -
                      double.Parse(spotCommissionInfo.Rows[0][4].ToString())).ToString();
                 lbltotalpaid.Text   = spotCommissionInfo.Rows[0][5].ToString();
                 lbltotalreturn.Text = spotCommissionInfo.Rows[0][6].ToString();
                 lbltotaldue.Text    =
                     (double.Parse(lbltotalpayamount.Text) -
                      double.Parse(spotCommissionInfo.Rows[0][5].ToString()) -
                      double.Parse(spotCommissionInfo.Rows[0][6].ToString())).ToString();
                 int.TryParse(spotCommissionInfo.Rows[0][7].ToString(), out investigationId);
                 InvestigationCreationDate = spotCommissionInfo.Rows[0][11].ToString();
                 btnsave.Enabled           = spotCommissionInfo.Rows[0][8].ToString() != "1";
                 if (spotCommissionInfo.Rows[0][8].ToString() == "1")
                 {
                     MessageBox.Show("Already paid spot commission.");
                     txtreceiveby.Text = spotCommissionInfo.Rows[0][10].ToString();
                 }
                 ShowReport(spotCommissionInfo.Rows[0][8].ToString() == "1");
             }
             else
             {
                 MessageBox.Show(@"Invalid investigation id.");
                 ClearFields();
             }
         }
         else
         {
             MessageBox.Show(@"Invalid investigation id.");
             ClearFields();
         }
     }
 }
        public frmHopitalAdmissionFront()
        {
            InitializeComponent();
            txtgender.DataSource = new List <object>
            {
                new { Text = "Male", Value = "M" },
                new { Text = "Female", Value = "F" }
            };
            txtgender.DisplayMember = "Text";
            txtgender.ValueMember   = "Value";
            txtgender.BackColor     = Color.White;

            txtReligion.DataSource = new List <object>
            {
                new { Text = "Islam", Value = "Islam" },
                new { Text = "Hinduism", Value = "Hinduism" },
                new { Text = "Christianity", Value = "Christianity" },
                new { Text = "Buddhism", Value = "Buddhism" },
                new { Text = "Taoism", Value = "Taoism" },
                new { Text = "Sikhism", Value = "Sikhism" },
                new { Text = "Judaism", Value = "Judaism" }
            };
            txtReligion.DisplayMember = "Text";
            txtReligion.ValueMember   = "Value";
            txtReligion.BackColor     = Color.White;

            objData.OpenConnection("AatickPC-Office", ref strErr);
            SetNewEnv();
            objData.CloseConnection();
            LoadDoctorList(lstdoctorsinformation, "");
            LoadDoctorList(lstDoctors, "");
            btnedit.Enabled = btnpreview.Enabled = false;
        }
Exemple #4
0
        private void frmPathologyLabProcess_Load(object sender, EventArgs e)
        {
            //var parentWindow = ((frmPathologylab)this.Owner);
            //var invID = parentWindow.loadInvestigationID();
            txtInvestigstionID.Text = InvId;

            objData.OpenConnection("AzharPC-Office", ref strErr);
            fillGdv();
            //loadReport();
            objData.CloseConnection();
        }
Exemple #5
0
        private void LoadList()
        {
            var strErr = "";

            objData.OpenConnection("AatickPC-Office", ref strErr);
            var strSql  = "SELECT BI_ID,Name,BI_Number BedNumber,Rate FROM Bed_Information ORDER BY Name";
            var bedList = objData.RetriveData(strSql, ref strErr);

            lstBedInfo.DataSource = bedList;
            objData.CloseConnection();
        }
        public frmMarketingTargetSetup()
        {
            InitializeComponent();
            objData.OpenConnection("AatickPC-Office", ref strErr);
            var sql          = "SELECT EmpID,Name FROM dbo_Employee_Profiles";
            var employeeList = objData.RetriveData(sql, ref strErr);

            objData.CloseConnection();
            cmbEmployee.DisplayMember         = "Name";
            cmbEmployee.ValueMember           = "EmpId";
            cmbEmployee.DataSource            = employeeList;
            cmbEmployee.SelectedIndex         = -1;
            cmbEmployee.SelectedIndexChanged += cmbEmployee_SelectedIndexChanged;
        }
 private void txtDoctorId_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == (char)Keys.Enter)
     {
         btnsave.Enabled = false;
         var docId = txtDoctorId.Text.Trim();
         if (docId == "")
         {
             MessageBox.Show("Please enter doctor id.");
             return;
         }
         objData.OpenConnection("AatickPC-Home", ref strErr);
         var sql             = "USP_Doctor_Payment_Due_Amount " + docId + ",'I'," + Utility.DCP;
         var dtDoctorPayment = objData.RetriveData(sql, ref strErr);
         if (strErr == "" && dtDoctorPayment.Rows.Count > 0)
         {
             txtpayableamount.Text = dtDoctorPayment.Rows[0][0].ToString();
             if (double.Parse(txtpayableamount.Text.Trim()) > 0)
             {
                 btnsave.Enabled = true;
             }
         }
         else
         {
             txtpayableamount.Text = "0";
         }
         strErr = "";
         sql    = "rpt_Doctor_Ledger " + docId + ",'I'," + Utility.DCP;
         var dtDoctorLedger = objData.RetriveData(sql, ref strErr);
         objData.CloseConnection();
         if (strErr == "" && dtDoctorLedger.Rows.Count > 0)
         {
             var reportDoc = new ReportDocument();
             var rptpath   = Utility.ReportPath + "rptDoctorLedger.rpt";
             reportDoc.Load(rptpath);
             reportDoc.SetDataSource(dtDoctorLedger);
             crViewer.ReportSource  = reportDoc;
             crViewer.ToolPanelView = ToolPanelViewType.None;
         }
         else
         {
             crViewer.ReportSource = null;
             MessageBox.Show("No ledger found.");
         }
     }
     else
     {
         e.Handled = !char.IsDigit(e.KeyChar) && !char.IsControl(e.KeyChar);
     }
 }
Exemple #8
0
 private void ShowReport()
 {
     if (dgvDueCollection.SelectedCells.Count > 0)
     {
         var cashId = dgvDueCollection.Rows[dgvDueCollection.SelectedCells[0].RowIndex].Cells[14].Value;
         objData.OpenConnection("AatickPC-Office", ref strErr);
         var sqlCashMemoInfo = "SELECT CAST(CM.CM_SL AS VARCHAR(10))+'/'+CAST(MONTH(CM.CreatedOn) AS VARCHAR(2))+'/'+CAST(YEAR(CM.CreatedOn) AS VARCHAR(4)) AS CashMemoNo";
         sqlCashMemoInfo += " , CAST(Inv.Invetigation_SL AS VARCHAR(10))+'/'+CAST(MONTH(Inv.CreatedOn) AS VARCHAR(2))+'/'+CAST(YEAR(Inv.CreatedOn) AS VARCHAR(4)) AS  InvestigationSlNo";
         sqlCashMemoInfo += " , Inv.CreatedOn,PI.Name,PI.Year,PI.Month,PI.Day,PI.Gender";
         sqlCashMemoInfo +=
             " , CM.Pay_Amount,Inv.DiscountTK,Inv.DiscountPasentance,Inv.DiscountByID,dbo.f_Get_Payable_Amount(Inv.InvestigationID) Payable_Amount,U.Name UserName";
         sqlCashMemoInfo +=
             " FROM dbo_CashMemo CM INNER JOIN dbo_Investigation Inv ON CM.InvetigationID=Inv.InvestigationID";
         sqlCashMemoInfo += " INNER JOIN dbo_Patient_info PI ON PI.P_ID=Inv.P_ID	 ";
         sqlCashMemoInfo += " LEFT JOIN dbo_Users U ON U.User_Id=CM.UserId ";
         sqlCashMemoInfo += " WHERE CM.CM_ID=" + cashId;
         var dtCashMemoInfo = objData.RetriveData(sqlCashMemoInfo, ref strErr);
         objData.CloseConnection();
         var dataset = new DataSet();
         dataset.Tables.Add(dtCashMemoInfo);
         var reportviewer = new frmReport();
         var rptpath      = Utility.ReportPath + "rptDueMoneyReceipt.rpt";
         reportviewer.ReportPath = rptpath;
         reportviewer.Reportds   = dataset;
         reportviewer.Show(this);
     }
 }
Exemple #9
0
 private void frmInvestigationDueCollection_Load(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmlod();
     objData.CloseConnection();
 }
Exemple #10
0
 private void cmbInvestigation_SelectedIndexChanged(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     loadall();
     objData.CloseConnection();
 }
Exemple #11
0
 private void btnDocRefresh_Click(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     getDocList();
     objData.CloseConnection();
 }
 private void button3_Click(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmLoad();
     objData.CloseConnection();
 }
 private void btnnew_Click(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("PolinPC-Office", ref strErr);
     frmload();
     objData.CloseConnection();
 }
Exemple #14
0
        public bool SaveDoctorInfo(Doctor objDoctor)
        {
            string strErr = "";

            objData = new C_Data_Batch();
            objData.OpenConnection("PolinPC-Office", ref strErr);
            string sql = "Insert into dbo_Doctor_list(Title,DocID,Name,Degree,Doctype,Phone,IsPc,Address,Area,Specialist,MarketingBy)";

            sql = sql + " values('" + objDoctor.Title + "','" + objDoctor.DoctorId + "','" + objDoctor.DoctorName + "','" + objDoctor.Degree + "'";
            sql = sql + " ,'" + objDoctor.Doctype + "','" + objDoctor.Phone + "'," + objDoctor.IsPC + ",'" + objDoctor.Address + "'";
            sql = sql + " ,'" + objDoctor.Area + "','" + objDoctor.Specialist + "'," + objDoctor.MarketingBy + ")";

            objData.ExecuteQuery(sql, ref strErr);
            objData.CloseConnection();
            //objData = null;
            if (strErr == "")
            {
                MessageBox.Show("Succefully Insert into Doctor List");
                return(true);
            }
            else
            {
                return(false);
            }
        }
 private void frmServiceWiseList_Load(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmload();
     objData.CloseConnection();
 }
        private void btnsave_Click(object sender, EventArgs e)
        {
            //MessageBox.Show(dgvRetrurn.Rows[0].Cells[0].Value.ToString());
            //MessageBox.Show(dgvRetrurn.Rows[1].Cells[17].Value.ToString());
            objData = new C_Data_Batch();
            objData.OpenConnection("AzharPC-Home", ref strErr);
            string strSQL = "";

            objData.BeginTransaction(ref strErr);
            for (int i = 0; i < dgvRetrurn.Rows.Count - 1; i++)
            {
                if (Convert.ToInt16(dgvRetrurn.Rows[i].Cells[3].Value.ToString()) > 0)
                {
                    strSQL = "update dbo_InvertigationServiceItem set isreturn =1, return_on = getdate(), Return_Amount = " + dgvRetrurn.Rows[i].Cells[3].Value + ", ReturnUserID =" + Utility.userID + " , ReturnUserPC='" + Utility.PcName + "'  where ISI_ID=" + dgvRetrurn.Rows[i].Cells[17].Value;
                    objData.ExecuteQuery(strSQL, ref strErr);
                }
            }

            if (strErr == "")
            {
                string strSqlSpotCommission = "USP_Inv_Calculate_SpotCommission " + txtInvestigationID.Text.Split('/')[0] + "," + txtInvestigationID.Text.Split('/')[1] + "," + txtInvestigationID.Text.Split('/')[2];
                objData.ExecuteQuery(strSqlSpotCommission, ref strErr);
                MessageBox.Show("Investigation return succefully done.");
                objData.CommitTransaction(ref strErr);
            }
            else
            {
                MessageBox.Show("Investigation not return.");
                objData.Rollback(ref strErr);
            }
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            string strSql = "";

            hms.Include_Files.Utility.ComboboxItem Dept = cmbDepartment.SelectedItem as hms.Include_Files.Utility.ComboboxItem;

            if (Dept != null)
            {
                objData = new C_Data_Batch();
                objData.OpenConnection("AzharPC-Home", ref strErr);
                strSql = "Insert into dbo_Designation(DeptID, Designation) values (" + Dept.Value.ToString() + ", '" + txtDesigntionName.Text.ToString() + "')";
                objData.ExecuteQuery(strSql, ref strErr);

                if (strErr.ToString() != "")
                {
                    MessageBox.Show("Designation inserted");
                    frmLoad();
                }
                else
                {
                    MessageBox.Show("Designation not inserted");
                }

                objData.CloseConnection();
            }
            else
            {
                MessageBox.Show("Please Select the Department.");
            }
        }
Exemple #18
0
        private void btnpreview_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtAdmissionId.Text.Trim()))
            {
                MessageBox.Show(@"Please select a patient.");
                return;
            }
            var isSummary = rbtnPatientSummary.Checked;

            if (rbtnPatientDetails.Checked || rbtnPatientSummary.Checked)
            {
                if (isSummary)
                {
                    objData.OpenConnection("AatickPC-Office", ref strErr);
                    var sqlBill    = "USP_HospitalConsultantBill_Summery " + txtAdmissionId.Text;
                    var dtBillInfo = objData.RetriveData(sqlBill, ref strErr);
                    objData.CloseConnection();

                    var rptpath = Utility.ReportPath + "rptHospitalBill.rpt";
                    var report  = new ReportDocument();
                    report.Load(rptpath);
                    report.SetDataSource(dtBillInfo);
                    report.SetParameterValue("UserName", Utility.UserName);
                    var reportviewer = new frmReport(report);
                    reportviewer.Show(this);
                }
            }
            else
            {
                MessageBox.Show(@"Please select any one report option.");
            }
        }
Exemple #19
0
 private void txtinvestigationid_KeyUp(object sender, KeyEventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     fillGridView();
     objData.CloseConnection();
 }
Exemple #20
0
 private void frmPathologylab_Load(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmLoad();
     objData.CloseConnection();
 }
Exemple #21
0
 private void lbPathlab_SelectedIndexChanged(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     fillGridView();
     objData.CloseConnection();
 }
Exemple #22
0
 private void loaddoctor()
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     getDocList(txtdoctorinformation.Text.Trim());
     objData.CloseConnection();
 }
Exemple #23
0
        private void lsttestname_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (isFirstTime != "0")
            {
                return;
            }
            var sql = "select Amount from Dbo_Services where service_id = " + lsttestname.SelectedValue;

            //C_Data_Batch objData;
            strErr  = "";
            objData = new C_Data_Batch();
            objData.OpenConnection("AzharPC-Office", ref strErr);

            var arrServicePrice = objData.RetriveData(sql, ref strErr);

            if (strErr == "")
            {
                if (arrServicePrice.Rows.Count > 0)
                {
                    lblServicePrice.Text = arrServicePrice.Rows[0][0].ToString();
                }
                else
                {
                    lblServicePrice.Text = "";
                }
            }
            else
            {
                lblServicePrice.Text = "";
            }

            objData.CloseConnection();
        }
        private void fillDesignation()
        {
            //throw new NotImplementedException();
            objetdata = new C_Data_Batch();
            string strErr = "";

            objetdata.OpenConnection("PolinPC-Office", ref strErr);
            string strSQL = "";

            hms.Include_Files.Utility.ComboboxItem itms = cmbDepartment.SelectedItem as hms.Include_Files.Utility.ComboboxItem;
            var DeptID = 0;

            if (itms != null)
            {
                DeptID = itms.Value;
                strSQL = "select DegId, Designation from dbo_Designation where DeptID= " + DeptID + " order by DeptID Desc ";
                DataTable arrDept = objetdata.RetriveData(strSQL, ref strErr);
                objetdata.CloseConnection();
                //DataSet ds = new DataSet();
                //ds.Tables.Add(arrDept);
                //dgvEmpprofile.DataSource = ds.Tables["Table1"];
                cmbDesignation.Items.Clear();
                if (arrDept.Rows.Count > 0)
                {
                    for (int i = 0; i < arrDept.Rows.Count; i++)
                    {
                        cmbDesignation.Items.Add(new hms.Include_Files.Utility.ComboboxItem(arrDept.Rows[i][1].ToString(), Convert.ToInt32(arrDept.Rows[i][0].ToString())));
                    }
                }
            }
            else
            {
                MessageBox.Show("Please select the Department");
            }
        }
Exemple #25
0
        public int getDoctorId()
        {
            int    doctorid = 0;
            string strErr   = "";

            string strSQL = "select max(DocID) from dbo_Doctor_list";

            objData = new C_Data_Batch();
            objData.OpenConnection("PolinPC-Office", ref strErr);
            DataTable dtMaxDictorID = objData.RetriveData(strSQL, ref strErr);

            //string[,]  arrMaxDictorID = objData.RetriveDataArray(strSQL, ref strErr);
            objData.CloseConnection();
            if (dtMaxDictorID.Rows.Count > 0)
            {
                if (dtMaxDictorID.Rows[0][0].ToString() != "")
                {
                    doctorid = Convert.ToInt32(dtMaxDictorID.Rows[0][0].ToString()) + 1;
                }
                else
                {
                    doctorid = 1;
                }
            }
            else
            {
                doctorid = 1;
            }

            return(doctorid);
        }
        private void getEmployeeID()
        {
            //throw new NotImplementedException();
            string strErr = "";

            objetdata = new C_Data_Batch();
            string strSQL = "";

            strSQL = "select max(EmpID) from dbo_Employee_Profiles";
            objetdata.OpenConnection("PolinPC-Office", ref strErr);
            Int32     EmpID    = 0;
            DataTable arrEmpID = objetdata.RetriveData(strSQL, ref strErr);

            if (arrEmpID.Rows.Count > 0)
            {
                if (arrEmpID.Rows[0][0].ToString() != "")
                {
                    EmpID = Convert.ToInt32(arrEmpID.Rows[0][0].ToString()) + 1;
                }
                else
                {
                    EmpID = 1;
                }
            }
            else
            {
                EmpID = 1;
            }

            txtEmpployeeID.Text = EmpID.ToString();
        }
 private void btnedit_Click(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     DataEdit();
     objData.CloseConnection();
 }
 private void frmDerpartmentSetup_Load(object sender, EventArgs e)
 {
     objData = new C_Data_Batch();
     objData.OpenConnection("AzharPC-Home", ref strErr);
     frmLoad();
     objData.CloseConnection();
 }
        private void btnpreview_Click(object sender, EventArgs e)
        {
            objData = new C_Data_Batch();
            string strErr = "";

            objData.OpenConnection("PolinPC-Office", ref strErr);
            //txtCategoryID
            string strSQL = "";

            strSQL = "SELECT st.[SIT_ID],s.[Service_Name],st.[OGroup],st.[Entity],st.[Unit],st.[RefRenge],st.[Result_B]  FROM [Dbo_service_Itemwise_Test] ST inner Join Dbo_Services S On St.Service_ID=s.Service_ID order by st.[SIT_ID] desc";
            DataTable arrCatList = objData.RetriveData(strSQL, ref strErr);

            objData.CloseConnection();
            DataSet ds = new DataSet();

            ds.Tables.Add(arrCatList);


            frmReport reportviewer = new frmReport();
            var       rptpath      = Utility.ReportPath + "rptServicesWiseTest.rpt";

            reportviewer.ReportPath = rptpath;
            reportviewer.Reportds   = ds;
            reportviewer.Show(this);
        }
        private void btnsave_Click(object sender, EventArgs e)
        {
            var strSQL    = "";
            var strStatus = "";

            if (rbtnDischarge.Checked == true)
            {
                strStatus = rbtnDischarge.Text;
            }
            else if (rbtnPatientDeath.Checked)
            {
                strStatus = rbtnPatientDeath.Text;
            }
            else if (rbtntransfer.Checked)
            {
                strStatus = rbtntransfer.Text;
            }
            else
            {
                strStatus = "Unknown";
            }

            strSQL = "update Patient_Bed SET isBooked = 0,Note='" + strStatus + "',release_on=getdate(), DischargeUserID = " + Utility.userID + ",DischargeUserPC='" + Utility.PcName + "'  where Admission_id = " + txtAdmissionId.Text + " and isBooked = 1";
            objData.OpenConnection("AzharPC-Office", ref strErr);

            objData.ExecuteQuery(strSQL, ref strErr);
            objData.CloseConnection();
            MessageBox.Show(strErr != "" ? @"Patient Not Discharge." : @"Patient Discharge successfully.");
            Utility.ClearAllControls(this);
        }