示例#1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            ThisAddIn.ResetBeginTime();
            XmlDocument doc   = new XmlDocument();
            XmlElement  rules = doc.CreateElement(ElementNames.Rules);

            #region Put into database
            using (gjtEmrService.emrServiceXml es = new gjtEmrService.emrServiceXml())
            {
                try
                {
                    string msg = "";


                    foreach (Control cc in pnlNote.Controls)
                    {
                        FilingUC FilingUC = (FilingUC)cc;
                        msg = es.NewFilingSetup(RegistryID, FilingUC.GetNoteID().Trim(), rules, Globals.DoctorID);
                    }

                    if (pnlNote.Controls.Count == 0)
                    {
                        if (szlx == "个人")
                        {
                            MessageBox.Show("个人归档项目设置为空,将自动引用此人所属科室归档项目", "提示");
                            return;
                        }
                        else
                        {
                            MessageBox.Show("设置完成", "提示");
                            return;
                        }
                    }

                    if (msg == null)
                    {
                        MessageBox.Show("设置完成", "提示");
                        return;
                    }
                    else
                    {
                        MessageBox.Show(msg, ErrorMessage.Error);
                        return;
                    }
                }
                catch (Exception ex)
                {
                    Globals.logAdapter.Record("EX925511256895", ex.Message + ">>" + ex.ToString(), true);

                    return;
                }
            }
            #endregion
            ThisAddIn.ResetBeginTime();
        }
示例#2
0
 private bool IsExist(string noteID)
 {
     foreach (Control cc in pnlNote.Controls)
     {
         FilingUC FilingUC = (FilingUC)cc;
         if (noteID.Trim() == FilingUC.GetNoteID().Trim())
         {
             return(true);
         }
     }
     return(false);
 }
示例#3
0
 private void RemoveFilingUC(string noteID)
 {
     foreach (Control ctrl in pnlNote.Controls)
     {
         FilingUC nuc = (FilingUC)ctrl;
         if (noteID == nuc.GetNoteID())
         {
             pnlNote.Controls.Remove(ctrl);
             noteCount--;
             return;
         }
     }
 }