コード例 #1
0
        private void PopulatePatientInsurance(string patientNo)
        {
            MembershipType.Value = "Principal";
            PatientInsuranceDAL   patInsurance      = new PatientInsuranceDAL();
            PatientInsuranceModel patInsuranceModel = new PatientInsuranceModel();

            oDs = new DataSet();

            patInsuranceModel.PatientNo = patientNo;
            oDs = patInsurance.SelectByPatientNo(patInsuranceModel);
            if (oDs != null)
            {
                if (oDs.Tables[0].Rows.Count > 0)
                {
                    ddlInsuranceCompany.SelectedValue = oDs.Tables[0].Rows[0][2].ToString();
                    txtDateStart.Value   = oDs.Tables[0].Rows[0][3].ToString();
                    txtDateExpire.Value  = oDs.Tables[0].Rows[0][4].ToString();
                    txtPolicyNo.Value    = oDs.Tables[0].Rows[0][5].ToString();
                    MembershipType.Value = oDs.Tables[0].Rows[0][6].ToString();
                    txtEmployeeNo.Value  = oDs.Tables[0].Rows[0][9].ToString();
                    txtCompany.Value     = oDs.Tables[0].Rows[0][10].ToString();
                    Remarks.Value        = oDs.Tables[0].Rows[0][8].ToString();
                }
            }
        }
コード例 #2
0
        private void LoadPatientInsurance(string patientNo)
        {
            PatientInsuranceDAL patientInsurance = new PatientInsuranceDAL();

            oDs = new DataSet();

            oDs = patientInsurance.SeachPatient(patientNo);
            if (oDs != null)
            {
                InsuranceNo.Value        = oDs.Tables[0].Rows[0]["PolicyNo"].ToString();
                ddlCompany.SelectedValue = oDs.Tables[0].Rows[0]["InsuranceID"].ToString();
            }
        }
コード例 #3
0
        private void SaveInsurance()
        {
            PatientInsuranceDAL   patInsurance      = new PatientInsuranceDAL();
            PatientInsuranceModel patInsuranceModel = new PatientInsuranceModel();

            string sUserName = Session["User"].ToString();

            patInsuranceModel.PatientNo          = PatientNo.Value;
            patInsuranceModel.InsuranceID        = Convert.ToInt16(ddlInsuranceCompany.SelectedValue);
            patInsuranceModel.StartDate          = Convert.ToDateTime(txtDateStart.Value);
            patInsuranceModel.ExpirationDate     = Convert.ToDateTime(txtDateExpire.Value);
            patInsuranceModel.PolicyNo           = txtPolicyNo.Value;
            patInsuranceModel.MembershipType     = MembershipType.Value;
            patInsuranceModel.PrincipalPatientNo = "";
            patInsuranceModel.EmployeeNo         = txtEmployeeNo.Value;
            patInsuranceModel.Company            = txtCompany.Value;
            patInsuranceModel.Notes = Remarks.Value;

            patInsurance.InsertPatientInsurance(sUserName, patInsuranceModel);
        }