Ejemplo n.º 1
0
        private void PopulatePatientCase(string caseNo)
        {
            oDAL   = new PatientCaseDAL();
            oClass = new PatientCaseModel();
            oDs    = new DataSet();

            oClass.CaseNo = caseNo;

            oDs          = oDAL.SelectByCaseNo(oClass);
            CaseID.Value = oDs.Tables[0].Rows[0]["ID"].ToString();
            RefNo.Value  = oDs.Tables[0].Rows[0]["CaseNo"].ToString();

            CaseDate.Value                = Convert.ToDateTime(oDs.Tables[0].Rows[0]["CaseDate"]).ToShortDateString();
            PatientNo.Value               = oDs.Tables[0].Rows[0]["PatientNo"].ToString();
            PatientName.Value             = oDs.Tables[0].Rows[0]["PatientName"].ToString();
            DOB.Value                     = Convert.ToDateTime(oDs.Tables[0].Rows[0]["DOB"]).ToShortDateString();
            ddlCompany.SelectedValue      = oDs.Tables[0].Rows[0]["InsuranceCompanyID"].ToString();
            InsuranceNo.Value             = oDs.Tables[0].Rows[0]["InsuranceNo"].ToString();
            ddlHospitalName.SelectedValue = oDs.Tables[0].Rows[0]["FacilityID"].ToString();
            ServiceType.Value             = oDs.Tables[0].Rows[0]["ServiceType"].ToString();
            AdmitDate.Value               = oDs.Tables[0].Rows[0]["StartDate"].ToString();
            DischargeDate.Value           = oDs.Tables[0].Rows[0]["EndDate"].ToString();
            ddlPhysician.SelectedValue    = oDs.Tables[0].Rows[0]["PhysicianID"].ToString();
            Remarks.Value                 = oDs.Tables[0].Rows[0]["Remarks"].ToString();
            ddlStatus.SelectedValue       = oDs.Tables[0].Rows[0]["StatusID"].ToString();
        }
Ejemplo n.º 2
0
        private void PopulateGrid()
        {
            oDAL   = new PatientCaseDAL();
            oClass = new PatientCaseModel();
            DataSet oDs = new DataSet();

            //if (tsbPatName.Text == "")
            //{
            //    oDs = oDAL.SelectAllReferrals();
            //}
            //else
            //{
            //    oClass.FileName = tsbPatName.Text;
            //    oDs = oDAL.SelectReferralsByName(oClass);
            //}
            oDs = oDAL.SelectAll();



            if (oDs != null)
            {
                gvList.DataSource = oDs.Tables[0];
                gvList.DataBind();
            }
        }
Ejemplo n.º 3
0
        private void LoadActiveCasePatient()
        {
            PatientCaseDAL caseDAL = new PatientCaseDAL();

            var data = caseDAL.SelectAll().Tables[0].AsEnumerable().Where(p => p["StatusID"].ToString() == "1").CopyToDataTable();

            ddlPatient.DataSource     = data.DefaultView;
            ddlPatient.DataTextField  = "PatientName";
            ddlPatient.DataValueField = "PatientNo";
            ddlPatient.DataBind();
        }
Ejemplo n.º 4
0
        protected void Ok_ServerClick(object sender, EventArgs e)
        {
            oDAL   = new PatientCaseDAL();
            oClass = new PatientCaseModel();
            string sUserName = Session["User"].ToString();

            oClass.IsDeleted    = true;
            oClass.ReasonDelete = itemname.InnerText;
            string lbl = lblPatientCase.Text;

            oClass.ID = Convert.ToInt32(HiddenFieldPatientCase.Value);
            oDAL.DeleteData(sUserName, oClass);
        }
Ejemplo n.º 5
0
        private void SaveData()
        {
            string sUserName = Session["User"].ToString();

            oDAL   = new PatientCaseDAL();
            oClass = new PatientCaseModel();

            oClass.CaseNo             = RefNo.Value;
            oClass.CaseDate           = Convert.ToDateTime(CaseDate.Value);
            oClass.PatientNo          = PatientNo.Value;
            oClass.ServiceType        = ServiceType.Value;
            oClass.InsuranceCompanyID = Convert.ToInt16(ddlCompany.SelectedValue);
            oClass.InsuranceNo        = InsuranceNo.Value;
            oClass.HospitalID         = Convert.ToInt16(ddlHospitalName.SelectedValue);
            oClass.PhysicianID        = Convert.ToInt16(ddlPhysician.SelectedValue);
            if (AdmitDate.Value != "")
            {
                oClass.StartDate = Convert.ToDateTime(AdmitDate.Value);
            }

            if (DischargeDate.Value != "")
            {
                oClass.EndDate = Convert.ToDateTime(DischargeDate.Value);
            }

            oClass.Remarks  = Remarks.Value;
            oClass.StatusID = Convert.ToInt16(ddlStatus.SelectedValue);

            string id = CaseID.Value;

            if (id == "")
            {
                oDAL.InsertData(sUserName, oClass);
                //lblMsg.Text = "New Record has been saved";
            }
            else
            {
                oClass.ID = Convert.ToInt16(id);
                oDAL.UpdateData(sUserName, oClass);
                // lblMsg.Text = "Record has been updated";
            }
        }