当前位置: 首页>>代码示例>>C#>>正文


C# Registration.LoadByPrimaryKey方法代码示例

本文整理汇总了C#中Registration.LoadByPrimaryKey方法的典型用法代码示例。如果您正苦于以下问题:C# Registration.LoadByPrimaryKey方法的具体用法?C# Registration.LoadByPrimaryKey怎么用?C# Registration.LoadByPrimaryKey使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Registration的用法示例。


在下文中一共展示了Registration.LoadByPrimaryKey方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: tmrPrint_Tick

        private void tmrPrint_Tick(object sender, EventArgs e)
        {
            lblTimer.Text = DateTime.Now.ToString("dd-MM-yyyy hh:mm:ss:fff");
            Exception exception = new Exception();
                    if (this._dtbMpi.Rows.Count == 0)
                    {
                        this.tmrPrint.Enabled = false;
                        this._dtbMpi = this.GetPrintJob();
                        this.gridListMpiSync.DataSource = this._dtbMpi;
                        if (this._dtbMpi.Rows.Count == 0)
                        {
                            this.tmrPrint.Enabled = true;
                            return;
                        }
                    }
                    this.tmrPrint.Enabled = false;
                    Registration reg = new Registration();
                    Patient pat = new Patient();
                    string regno = (string)gridListMpiSync.Rows[0].Cells["RegistrationNo"].Value;
                    string patientID = (string)gridListMpiSync.Rows[0].Cells["PatientID"].Value;
                    string RscmPatientID = string.Empty;
                    string AdmissionID = string.Empty;
                    bool IsClosed = false;
                    bool IsDischarged = false;
                    bool IsEditedKunjungan = false;
                    bool IsNewKunjungan = false;
                    IsClosed = (bool)(gridListMpiSync.Rows[0].Cells["IsClosed"].Value);
                    IsDischarged = (bool)(gridListMpiSync.Rows[0].Cells["IsDischarged"].Value);
                    IsEditedKunjungan = (bool)(gridListMpiSync.Rows[0].Cells["IsEditedKunjungan"].Value);
                    IsNewKunjungan = (bool)(gridListMpiSync.Rows[0].Cells["IsNewKunjungan"].Value);
                    //Start the logger
                    try
                    {

                        // Tampungan hasil pencarian pasien
                        Temiang.Avicenna.BusinessObject.Mpi.PasienCari.response Pasien_Cari = new Temiang.Avicenna.BusinessObject.Mpi.PasienCari.response();
                        if (reg.LoadByPrimaryKey(regno))
                        {
                            if (pat.LoadByPrimaryKey(patientID))
                            {
                                // Cari pasien ID di MPI Pusat
                                //Temiang.Avicenna.BusinessObject.Mpi.PasienCari.response pasien_cari = new Temiang.Avicenna.BusinessObject.Mpi.PasienCari.response();
                                //Temiang.Avicenna.BusinessObject.Mpi.PasienCari.responsePatientsPatient pasien = new Temiang.Avicenna.BusinessObject.Mpi.PasienCari.responsePatientsPatient();
                                if (pat.MedicalNo != null)
                                    Pasien_Cari = Mpi.ListPasienCari(pat.MedicalNo);
                                if (Pasien_Cari.patients.Count() > 0)
                                {
                                    foreach (Temiang.Avicenna.BusinessObject.Mpi.PasienCari.responsePatients rP in Pasien_Cari.patients)
                                    {
                                        if (rP.patient != null)
                                        {
                                            if (rP.patient.Count() > 0)
                                            {
                                                foreach (Temiang.Avicenna.BusinessObject.Mpi.PasienCari.responsePatientsPatient rPP in rP.patient)
                                                {
                                                    RscmPatientID = rPP.patient_id;
                                                }
                                            }
                                        }
                                    }
                                }
                                // Cari data kunjungan pasien di MPI Pusat
                            }
                        }
                        //////////  DISCHARGE PATIENT /////////////
                        //Discharge outstanding semua kunjungan inpatient kencana
                        //dan create kunjungan baru-yg langsung di-discharge jika data kunjungan belum ada
                        if (IsDischarged && !string.IsNullOrEmpty(RscmPatientID))
                        {
                            // List kunjungan pasien
                            bool IsNothingDischarged = false;
                            Temiang.Avicenna.BusinessObject.Mpi.PasienKunjungan.response pasien_kunjungan = new Temiang.Avicenna.BusinessObject.Mpi.PasienKunjungan.response();
                            pasien_kunjungan = Mpi.ListPasienKunjungan(RscmPatientID);
                            if (pasien_kunjungan.patient.Length > 0)
                            {
                                foreach (Temiang.Avicenna.BusinessObject.Mpi.PasienKunjungan.responsePatient pk_rp in pasien_kunjungan.patient)
                                {
                                    foreach (Temiang.Avicenna.BusinessObject.Mpi.PasienKunjungan.responsePatientAdmission pk_rpa in pk_rp.admission)
                                    {
                                        if (pk_rpa.inpatient_ind == "1" && pk_rpa.admission_org_id == RscmKencanaOrgID && pk_rpa.discharge_dttm == "0000-00-00 00:00:00")
                                        //if (pk_rpa.inpatient_ind == "1" && pk_rpa.discharge_dttm == "0000-00-00 00:00:00")
                                        {
                                            AdmissionID = pk_rpa.admission_id;
                                            Mpi.PatientDischarge(RscmPatientID, AdmissionID, DateTime.Now, RscmKencanaOrgID, reg.RegistrationNo);
                                            MpiSyncKunjungan msk = new MpiSyncKunjungan();
                                            if (msk.LoadByPrimaryKey(regno, patientID))
                                            {
                                                msk.AdmissionID = AdmissionID;
                                                msk.MpiPatientID = RscmPatientID;
                                                msk.IsNewKunjungan = false;
                                                msk.IsEditedKunjungan = false;
                                                msk.IsClosed = false;
                                                msk.IsDischarged = false;
                                                msk.LastUpdatedByUser = "system";
                                                msk.LastUpdatedDateTime = DateTime.Now;
                                                msk.Save();
                                                IsNothingDischarged = true;
                                            }
                                        }

//.........这里部分代码省略.........
开发者ID:trogalko,项目名称:MpiSyncManager,代码行数:101,代码来源:RadForm1.cs


注:本文中的Registration.LoadByPrimaryKey方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。