public CTBenhNhanCondition GetInfCTBenhNhanCondition() { CTBenhNhanCondition bnCon = new CTBenhNhanCondition(); bnCon.Ankle = chkAnkleSprain.Checked; bnCon.Elbow = chkLateral.Checked; bnCon.FootPlantar = chkPlantar.Checked; bnCon.FootPronation = chkPronation.Checked; bnCon.FootSupination = chkSupination.Checked; bnCon.Hip = chkDegenerationHip.Checked; bnCon.IDCTBenhNhan = lblCTBenhNhan.Text; bnCon.KneeACL = chkALC.Checked; bnCon.KneeDegeneration = chkDegenerationKnee.Checked; bnCon.KneeMCL = chkMLC.Checked; bnCon.KneeMeniscus = chkMeniscus.Checked; bnCon.PostureHyperLordosis = chkHyper.Checked; bnCon.PostureKyphosis = chkKyphosis.Checked; bnCon.SacroiliacDegeneration = chkDegenerated.Checked; bnCon.SacroiliacInbalance = chkImbalance.Checked; bnCon.SacroiliacInflammation = chkInflammation.Checked; bnCon.SacroiliacNormail = chkNormal.Checked; bnCon.ScoliosisCervico = chkCervivo.Checked; bnCon.ScoliosisCervival = chkCervival.Checked; bnCon.ScoliosisLumbar = chkLumber.Checked; bnCon.ScoliosisThoracic = chkThoracic.Checked; bnCon.ScoliosisThoracolumbar = chkThoracolumbar.Checked; bnCon.ShoulderACJoint = chkShoulderACJoint.Checked; bnCon.ShoulderAdhesive = chkShoulderAdhesive.Checked; bnCon.ShoulderBursitis = chkBursitis.Checked; bnCon.ShoulderImpingement = chkShoulderImpingement.Checked; bnCon.ShoulderRotator = chkShoulderRotatorCuff.Checked; bnCon.Wrist = chkWrist.Checked; return(bnCon); }
public bool InsertCTBenhNhanCondition(CTBenhNhanCondition CTBenhNhanCondition) { DataClassesDataContext data = new DataClassesDataContext(Connection); data.CTBenhNhanConditions.InsertOnSubmit(CTBenhNhanCondition); try { data.SubmitChanges(); return(true); } catch (Exception e) { return(false); } }
private void btnSavePrint_Click(object sender, System.EventArgs e) { try { //if (CheckValidatePatient()) //{ // BenhNhan bn = GetInfBenhNhan(); // qlND.InsertBenhNhan(bn); CTBenhNhan ctbn = GetInfCTBenhNhan(); qlND.InsertCTBenhNhan(ctbn); List <CTBenhNhanComplaint> listComplaint = GetInfCTBenhNhanComplaint(); qlND.InsertListCTBenhNhanComplaint(listComplaint); List <CTBenhNhanConditionDicsJoint> listDiscJoint = GetInfCTBenhNhanConditionDicsJoint(); qlND.InsertListCTBenhNhanConditionDicsJoint(listDiscJoint); CTBenhNhanCondition cTBenhNhanConditions = GetInfCTBenhNhanCondition(); qlND.InsertCTBenhNhanCondition(cTBenhNhanConditions); List <CTBenhNhanConditionVertebral> listCTBenhNhanConditionVertebral = GetInfCTBenhNhanConditionVertebral(); qlND.InsertListCTBenhNhanConditionVertebral(listCTBenhNhanConditionVertebral); List <CTBenhNhanExcercise> ListCTBenhNhanExcercises = GetInfCTBenhNhanExcercise(); qlND.InsertListCTBenhNhanExcercise(ListCTBenhNhanExcercises); List <CTBenhNhanMRIImage> listCTBenhNhanMRIImage = GetInfCTBenhNhanMRIImage(); qlND.InsertListCTBenhNhanMRIImage(listCTBenhNhanMRIImage); List <CTBenhNhanSnapShot> listCTBenhNhanSnapShot = GetInfCTBenhNhanSnapShot(); qlND.InsertListCTBenhNhanSnapShot(listCTBenhNhanSnapShot); PrintPatient(txtFileNumberPatient.Text, lblCTBenhNhan.Text); //} } catch (Exception) { MessageBox.Show("Save error"); } }
private void btnSavePrint_Click(object sender, System.EventArgs e) { try { if (CheckValidatePatient()) { BenhNhan bn = GetInfBenhNhan(); qlND.InsertBenhNhan(bn); CTBenhNhan ctbn = GetInfCTBenhNhan(); qlND.InsertCTBenhNhan(ctbn); List <CTBenhNhanComplaint> listComplaint = GetInfCTBenhNhanComplaint(); qlND.InsertListCTBenhNhanComplaint(listComplaint); List <CTBenhNhanConditionDicsJoint> listDiscJoint = GetInfCTBenhNhanConditionDicsJoint(); qlND.InsertListCTBenhNhanConditionDicsJoint(listDiscJoint); CTBenhNhanCondition cTBenhNhanConditions = GetInfCTBenhNhanCondition(); qlND.InsertCTBenhNhanCondition(cTBenhNhanConditions); List <CTBenhNhanConditionVertebral> listCTBenhNhanConditionVertebral = GetInfCTBenhNhanConditionVertebral(); qlND.InsertListCTBenhNhanConditionVertebral(listCTBenhNhanConditionVertebral); List <CTBenhNhanExcercise> ListCTBenhNhanExcercises = GetInfCTBenhNhanExcercise(); qlND.InsertListCTBenhNhanExcercise(ListCTBenhNhanExcercises); List <CTBenhNhanMRIImage> listCTBenhNhanMRIImage = GetInfCTBenhNhanMRIImage(); qlND.InsertListCTBenhNhanMRIImage(listCTBenhNhanMRIImage); List <CTBenhNhanSnapShot> listCTBenhNhanSnapShot = GetInfCTBenhNhanSnapShot(); qlND.InsertListCTBenhNhanSnapShot(listCTBenhNhanSnapShot); //PrintPatient(txtFileNumberPatient.Text, lblCTBenhNhan.Text); //Print rptPatientMedical rptAll = new rptPatientMedical(); //rptAll.parThangNam.Value = string.Format("DANH SÁCH CUỘC GỌI TỪ KHÁCH HÀNG THÁNG {0}/{1}", thang, nam); //rptAll.parThangNam.Visible = false; //rptAll.DataSource = list; //BindToBand DetailReportBand cTBenhNhanComplaint = rptAll.Bands["DetailReport_Complant"] as DetailReportBand; cTBenhNhanComplaint.DataSource = listComplaint; DetailReportBand cTBenhNhanMRIImage = rptAll.Bands["DetailReport_MRI"] as DetailReportBand; cTBenhNhanMRIImage.DataSource = listCTBenhNhanMRIImage; DetailReportBand cTBenhNhanDicsJoint = rptAll.Bands["DetailReport_DiscAndJoint"] as DetailReportBand; cTBenhNhanDicsJoint.DataSource = listDiscJoint; //List<CTBenhNhanCondition> listCondition = qlND.GetDSCTBenhNhanConditionByIDCTBenhNhan(lblCTBenhNhan.Text); ////DetailReportBand cTBenhNhanAnkle = rptAll.Bands["DetailReport_Ankle"] as DetailReportBand; ////cTBenhNhanAnkle.DataSource = cTBenhNhanConditions; List <CTBenhNhanCondition> listCondition = new List <CTBenhNhanCondition>(); listCondition.Add(cTBenhNhanConditions); DetailReportBand DetailReport_Ankle = rptAll.Bands["DetailReport_Ankle"] as DetailReportBand; DetailReport_Ankle.DataSource = listCondition; DetailReportBand DetailReport_Elbow = rptAll.Bands["DetailReport_Elbow"] as DetailReportBand; DetailReport_Elbow.DataSource = listCondition; DetailReportBand DetailReport_Foot = rptAll.Bands["DetailReport_Foot"] as DetailReportBand; DetailReport_Foot.DataSource = listCondition; DetailReportBand DetailReport_Hip = rptAll.Bands["DetailReport_Hip"] as DetailReportBand; DetailReport_Hip.DataSource = listCondition; DetailReportBand DetailReport_Knee = rptAll.Bands["DetailReport_Knee"] as DetailReportBand; DetailReport_Knee.DataSource = listCondition; DetailReportBand DetailReport_Posture = rptAll.Bands["DetailReport_Posture"] as DetailReportBand; DetailReport_Posture.DataSource = listCondition; DetailReportBand DetailReport_Sacroiliac = rptAll.Bands["DetailReport_Sacroiliac"] as DetailReportBand; DetailReport_Sacroiliac.DataSource = listCondition; DetailReportBand DetailReport_Scoliosis = rptAll.Bands["DetailReport_Scoliosis"] as DetailReportBand; DetailReport_Scoliosis.DataSource = listCondition; DetailReportBand DetailReport_Shoulder = rptAll.Bands["DetailReport_Shoulder"] as DetailReportBand; DetailReport_Shoulder.DataSource = listCondition; DetailReportBand DetailReport_Wrist = rptAll.Bands["DetailReport_Wrist"] as DetailReportBand; DetailReport_Wrist.DataSource = listCondition; DetailReportBand cTBenhNhanVertebral = rptAll.Bands["DetailReport_Vertebral"] as DetailReportBand; cTBenhNhanVertebral.DataSource = listCTBenhNhanConditionVertebral; DetailReportBand cTBenhNhanSnap = rptAll.Bands["DetailReport_Snap"] as DetailReportBand; cTBenhNhanSnap.DataSource = listCTBenhNhanSnapShot; List <sp_GetDSExcerciseByIDCTBNResult> listEx2 = qlND.GetDSExcerciseByIDCTBN(lblCTBenhNhan.Text); DetailReportBand DetailReport_Excercises = rptAll.Bands["DetailReport_Excercises"] as DetailReportBand; DetailReport_Excercises.DataSource = listEx2; rptAll.parComment.Value = ctbn.Comment.ToString(); rptAll.parComment.Visible = false; rptAll.parDate.Value = ctbn.NgayKham.ToString(); rptAll.parDate.Visible = false; rptAll.parFileNumber.Value = bn.ID.ToString(); rptAll.parFileNumber.Visible = false; rptAll.parName.Value = bn.TenBN.ToString(); rptAll.parName.Visible = false; rptAll.parTreamentFor.Value = ctbn.TreatmentTimeFor.ToString(); rptAll.parTreamentFor.Visible = false; rptAll.parTreamentTime.Value = ctbn.TreatmentTime.ToString(); rptAll.parTreamentTime.Visible = false; rptAll.parTreamentTotal.Value = ctbn.TreatmentTimeFor.ToString(); rptAll.parTreamentTotal.Visible = false; ReportPrintTool tool = new ReportPrintTool(rptAll); //tool.PreviewForm.Shown += new EventHandler(PreviewForm_Shown); tool.ShowPreviewDialog(); } } catch (Exception) { MessageBox.Show("Save error"); } }