Exemplo n.º 1
0
 /// <summary>
 /// Load
 /// </summary>
 void LoadData(decimal applyId)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         DataTable          dtMain     = null;
         DataTable          dtResponse = null;
         clsBIHOrderService svc        = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
         svc.GetSadcRecord(applyId, out dtMain, out dtResponse);
         if (dtMain != null && dtMain.Rows.Count > 0)
         {
             DataRow dr = dtMain.Rows[0];
             #region datawindow.setdata
             dwc.Modify("lbldeptname.text = '" + dr["applydeptname"].ToString() + "'");
             dwc.Modify("lblmedname.text = '" + dr["drugname"].ToString() + "'");
             if (Convert.ToDecimal(dr["pathcheck"].ToString()) == 1)
             {
                 dwc.Modify("chkyes.text = '√'");
                 dwc.Modify("chkno.text = ''");
                 dwc.Modify("lblnodesc.text = '" + dr["pathdesc"].ToString() + "'");
             }
             else
             {
                 dwc.Modify("chkyes.text = ''");
                 dwc.Modify("chkno.text = '√'");
                 dwc.Modify("lblnodesc.text = ''");
             }
             dwc.Modify("lblpatname.text = '" + patVo.m_strPatientName + "'");
             dwc.Modify("lblsex.text = '" + patVo.m_strSex + "'");
             dwc.Modify("lblage.text = '" + patVo.m_strAge + "'");
             dwc.Modify("lblipno.text = '" + patVo.m_strInHospitalNo + "'");
             dwc.Modify("lbldiag.text = '" + dr["clinicdiag"].ToString() + "'");
             dwc.Modify("lblillness.text = '" + dr["medhistory"].ToString() + "'");
             dwc.Modify("lblapplydesc.text = '" + dr["applyreason"].ToString() + "'");
             dwc.Modify("lblapplyopername.text = '" + dr["applyopername"].ToString() + "'");
             dwc.Modify("lblapplyyear.text = '" + Convert.ToDateTime(dr["applydate"].ToString()).ToString("yyyy") + "'");
             dwc.Modify("lblapplymonth.text = '" + Convert.ToDateTime(dr["applydate"].ToString()).ToString("MM") + "'");
             dwc.Modify("lblapplyday.text = '" + Convert.ToDateTime(dr["applydate"].ToString()).ToString("dd") + "'");
             dwc.Modify("lblconfirmdesc.text = '" + dr["directoropinion"].ToString() + "'");
             dwc.Modify("lblconfirmopername.text = '" + dr["directorname"].ToString() + "'");
             if (dr["directorsigndate"] != DBNull.Value)
             {
                 dwc.Modify("lblconfirmyear.text = '" + Convert.ToDateTime(dr["directorsigndate"].ToString()).ToString("yyyy") + "'");
                 dwc.Modify("lblconfirmmonth.text = '" + Convert.ToDateTime(dr["directorsigndate"].ToString()).ToString("MM") + "'");
                 dwc.Modify("lblconfirmday.text = '" + Convert.ToDateTime(dr["directorsigndate"].ToString()).ToString("dd") + "'");
             }
             if (dtResponse != null && dtResponse.Rows.Count > 0)
             {
                 string   conDesc = string.Empty;
                 string   conDoct = string.Empty;
                 DateTime?dtmDoct = null;
                 foreach (DataRow dr3 in dtResponse.Rows)
                 {
                     conDesc += dr3["responsedesc"].ToString() + Environment.NewLine;
                     conDoct += dr3["expertname"].ToString() + " ";
                     if (dr3["responsedate"] != DBNull.Value)
                     {
                         dtmDoct = Convert.ToDateTime(dr3["responsedate"].ToString());
                     }
                 }
                 if (conDesc != string.Empty && dtmDoct != null)
                 {
                     dwc.Modify("lblcondesc.text = '" + conDesc + "'");
                     dwc.Modify("lblcondoctname.text = '" + conDoct + "'");
                     dwc.Modify("lblconyear.text = '" + dtmDoct.Value.ToString("yyyy") + "'");
                     dwc.Modify("lblconmonth.text = '" + dtmDoct.Value.ToString("MM") + "'");
                     dwc.Modify("lblconday.text = '" + dtmDoct.Value.ToString("dd") + "'");
                 }
             }
             #endregion
             SetData(svc.GetSadcResponse(applyId, LoginInfo.m_strEmpID));
         }
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }