Exemplo n.º 1
0
        /// <summary>
        /// 西药/中成药打印
        /// </summary>
        private void PresPrint()
        {
            DataTable dt       = new DataTable();
            int       rowIndex = -1;

            dt       = dgFeeHead.DataSource as DataTable;
            rowIndex = dgFeeHead.CurrentCell.RowIndex;
            if (rowIndex >= 0)
            {
                DataRow   dr       = dt.Rows[rowIndex];
                DataTable presData = InvokeController("GetPrintPresData", Convert.ToInt32(dr["DocPresHeadID"]), Convert.ToInt32(dr["DocPresNO"])) as DataTable;
                Dictionary <string, object> myDictionary = new Dictionary <string, object>();
                if (presData.Rows.Count > 0)
                {
                    PresPrint presPrint = new PresPrint();
                    InvokeController("GetPatInfo", Tools.ToInt32(dr["PatListID"]));
                    presPrint.PatType       = Tools.ToString(dtPatList.Rows[0]["PatTypeName"]);
                    presPrint.PatName       = txtName.Text;
                    presPrint.VisitNO       = Tools.ToString(dtPatList.Rows[0]["VisitNO"]);
                    presPrint.Sex           = txtSex.Text;
                    presPrint.Age           = txtAge.Text;
                    presPrint.Diagnosis     = strDiseases;
                    presPrint.Address       = Tools.ToString(dtPatList.Rows[0]["Address"]);
                    presPrint.TelPhone      = Tools.ToString(dtPatList.Rows[0]["Mobile"]);
                    presPrint.PresNO        = Tools.ToString(dr["DocPresNO"]);
                    presPrint.PresType      = GetTypeName(Tools.ToString(presData.Rows[0]["IsEmergency"]), Tools.ToString(presData.Rows[0]["IsLunacyPosion"]));
                    presPrint.WorkerName    = (InvokeController("this") as AbstractController).LoginUserInfo.WorkName;
                    presPrint.WorkerID      = (InvokeController("this") as AbstractController).LoginUserInfo.WorkId.ToString();
                    presPrint.DeptName      = Tools.ToString(presData.Rows[0]["DeptName"]);
                    presPrint.PresDate      = Convert.ToDateTime(presData.Rows[0]["PresDate"]).ToString("yyyy-MM-dd hh:mm:ss");
                    presPrint.DoctorName    = Tools.ToString(presData.Rows[0]["DoctorName"]);
                    presPrint.ChannelName   = Tools.ToString(presData.Rows[0]["ChannelName"]);
                    presPrint.FrequencyName = Tools.ToString(presData.Rows[0]["FrequencyName"]);
                    presPrint.DoseNum       = Tools.ToString(presData.Rows[0]["DoseNum"]);
                    presPrint.PrintType     = Tools.ToString(Tools.ToInt32(dr["PresType"]) - 1);
                    presPrint.PatId         = Tools.ToString(dtPatList.Rows[0]["PatListID"]);
                    InvokeController("PrintPres", presPrint, presData);
                }
                else
                {
                    MessageBoxEx.Show("没有可打印的数据");
                }
            }
            else
            {
                MessageBoxEx.Show("没有可打印的数据");
            }
        }
Exemplo n.º 2
0
 public void PrintPres(PresPrint presPrint, DataTable presData)
 {
     InvokeController("OPProject.UI", "PresManageController", "PrintPres", presPrint, presData, true);
 }