Ejemplo n.º 1
0
        private void searchLookUpGetDischargeInfo_EditValueChanged(object sender, EventArgs e)
        {
            //PatientByOPID(cmbPatient.Properties.View.GetFocusedRowCellValue("OPID").ToString());
            //txtDiagonsisAdmisson.Focus();

            DischargePatient _dischargePatient = new DischargePatient();

            _dischargePatient.OPID    = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("OPID").ToString();
            txtFahterHusbandName.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("FatherHusbandName").ToString();
            txtRegNo.Text             = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("RegNo").ToString();
            txtFahterHusbandName.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("FatherHusbandName").ToString();
            txtGender.Text            = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("Gender").ToString();
            txtAge.Text               = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("Age").ToString();
            txtBloodGroup.Text        = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("BloodGroup").ToString();
            txtConsult.Text           = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("Consult").ToString();
            txtWeight.Text            = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("weight").ToString();
            txtCabinBedNo.Text        = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("Cabin_BedNo").ToString();
            txtContactNo.Text         = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("ContactNo").ToString();
            txtDiagonsisAdmisson.Text = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("DiagOnAdmission").ToString();
            txtDiagOnDischarge.Text   = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("DiagOnDischarge").ToString();
            txtAdmissionOnDate.Text   = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("AddmissionOn").ToString();
            txtDischargeOnDate.Text   = searchLookUpGetDischargeInfo.Properties.View.GetFocusedRowCellValue("DischargeOn").ToString();


            aMedicalManager = new MedicalManager();
            DataTable dataTable = new DataTable();

            gridControl1.DataSource = null;

            dataTable = aMedicalManager.GetDischargeDetails(_dischargePatient);
            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                DataRow rows = tempDrug.NewRow();
                tempDrug.Rows.Add(rows);
                rows["DrugId"]      = dataTable.Rows[i]["DrugId"];
                rows["DrugName"]    = dataTable.Rows[i]["DrugName"];
                rows["Doose"]       = dataTable.Rows[i]["Doose"];
                rows["Description"] = dataTable.Rows[i]["Description"];
                rows["Id"]          = dataTable.Rows[i]["Id"];
            }
            gridControl1.DataSource = tempDrug;


            btnSave.Enabled = false;
            btnEdit.Enabled = true;
        }
Ejemplo n.º 2
0
        private void gridViewDischarge_DoubleClick(object sender, EventArgs e)
        {
            flag = true;
            xtraTabPage1.Show();

            _dischargePatient.OPID = gridViewDischarge.GetFocusedRowCellValue("OPID").ToString();
            cmbPatient.Properties.NullValuePrompt = gridViewDischarge.GetFocusedRowCellValue("PatientName").ToString();

            DataTable data = new DataTable();

            data = new MedicalManager().GetDischargeInfo(_dischargePatient);
            //data = aMedicalManager.GetDischargeInfoMaster();
            //gridControlDischarge.DataSource = data;
            if (data.Rows.Count > 0)
            {
                txtFahterHusbandName.Text = data.Rows[0]["FatherName"].ToString();
                txtRegNo.Text             = data.Rows[0]["RegNo"].ToString();
                txtGender.Text            = data.Rows[0]["Gender"].ToString();
                txtGender.Text            = data.Rows[0]["Gender"].ToString(); txtAge.Text = data.Rows[0]["Age"].ToString();
                txtBloodGroup.Text        = data.Rows[0]["BloodGroup"].ToString();
                //txtConsult.Text = data.Rows[0]["Consult"].ToString();
                txtWeight.Text            = data.Rows[0]["weight"].ToString();
                txtContactNo.Text         = data.Rows[0]["Phone"].ToString();
                txtDiagonsisAdmisson.Text = data.Rows[0]["DiagOnAdmission"].ToString();
                txtDiagOnDischarge.Text   = data.Rows[0]["DiagOnDischarge"].ToString();
                txtAdmissionOnDate.Text   = data.Rows[0]["InputDate"].ToString();
                txtDischargeOnDate.Text   = data.Rows[0]["DischargeOn"].ToString();
                txtAddress.Text           = data.Rows[0]["Address"].ToString();
                txtCabinBedNo.Text        = data.Rows[0]["BedName"].ToString();

                bool Crued = Convert.ToBoolean(data.Rows[0]["Cured"]);
                if (Crued)
                {
                    cured.Checked = true;
                }
                else
                {
                    cured.Checked = false;
                }
                bool dor = Convert.ToBoolean(data.Rows[0]["Dor"]);
                if (dor)
                {
                    Dor.Checked = true;
                }
                else
                {
                    Dor.Checked = false;
                }
                bool Improved = Convert.ToBoolean(data.Rows[0]["Improved"]);
                if (Improved)
                {
                    improved.Checked = true;
                }
                else
                {
                    improved.Checked = false;
                }
                bool dorb = Convert.ToBoolean(data.Rows[0]["Dorb"]);
                if (dorb)
                {
                    Dorb.Checked = true;
                }
                else
                {
                    Dorb.Checked = false;
                }
                bool notImproved = Convert.ToBoolean(data.Rows[0]["NotImproved"]);
                if (notImproved)
                {
                    NotImproved.Checked = true;
                }
                else
                {
                    NotImproved.Checked = false;
                }
            }

            //Grid view start here
            aMedicalManager = new MedicalManager();
            DataTable dataTable = new DataTable();

            gridControl1.DataSource = null;

            dataTable = aMedicalManager.GetDischargeDetails(_dischargePatient);
            for (int i = 0; i < dataTable.Rows.Count; i++)
            {
                DataRow rows = tempDrug.NewRow();
                tempDrug.Rows.Add(rows);
                rows["DrugId"]        = dataTable.Rows[i]["DrugId"];
                rows["DrugName"]      = dataTable.Rows[i]["DrugName"];
                rows["Doose"]         = dataTable.Rows[i]["Doose"];
                rows["Description"]   = dataTable.Rows[i]["Description"];
                rows["Route"]         = dataTable.Rows[i]["Route"];
                rows["RelatedToMeal"] = dataTable.Rows[i]["RelatedToMeal"];
                rows["Id"]            = dataTable.Rows[i]["Id"];
            }
            gridControl1.DataSource = tempDrug;

            btnSave.Enabled = false;
            btnEdit.Enabled = true;
        }