Beispiel #1
0
        private void fg_DoubleClick(object sender, EventArgs e)
        {
            //DataTable table = ds.Tables[0].Rows as DataTable;
            try
            {
                if (ucC1FlexGrid1.fg.RowSel >= 1)
                {
                    int    row        = this.ucC1FlexGrid1.fg.MouseRow;
                    string patient_id = ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "病人主键"].ToString();
                    string pid        = ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "病人住院号"].ToString();
                    if (pid != "")
                    {
                        if (ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "状态"].ToString() == "通过")// && App.UserAccount.UserInfo.User_name == ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "申请人"].ToString())
                        {
                            if (Convert.ToDateTime(ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "借阅失效时间"].ToString()) < App.GetSystemTime())
                            {
                                App.Msg("借阅失效时间已过,请重新申请!");
                                return;
                            }
                            string  sql = "select * from t_in_patient t where t.id='" + patient_id + "'";
                            DataSet ds1 = App.GetDataSet(sql);
                            if (ds1 != null)
                            {
                                if (ds1.Tables[0].Rows.Count > 0)
                                {
                                    //InPatientInfo patientInfo = DataInit.GetIninpatientByPid(ds1.Tables[0]);
                                    //patientInfo.PatientState = "借阅";
                                    //ucDoctorOperater fq = new ucDoctorOperater(patientInfo);
                                    ////frmMain fq = new frmMain(patientInfo, true, patientInfo.Id);
                                    //App.UsControlStyle(fq);
                                    //App.AddNewBusUcControl(fq, "病人文书");
                                    //((Form)this.ParentForm).Close();

                                    Child_EventArgs args = new Child_EventArgs();
                                    args.State   = "借阅";
                                    args.Id      = Convert.ToInt32(ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "病人主键"].ToString());
                                    args.User_Id = ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "申请人编号"].ToString();
                                    if (browse_Book != null)
                                    {
                                        browse_Book(sender, args);
                                    }
                                    ((Form)this.ParentForm).Close();
                                }
                            }
                        }
                        else
                        {
                            App.Msg("只能查看已通过审核的人!");
                            return;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                App.MsgErr(ex.Message);
            }
        }
Beispiel #2
0
 void fg_DoubleClick(object sender, EventArgs e)
 {
     if (ucC1FlexGrid1.fg.RowSel > 0)
     {
         string          state = ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "状态"].ToString();
         Child_EventArgs args  = new Child_EventArgs();
         args.State   = state;
         args.Id      = Convert.ToInt32(ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "病人主键"].ToString());
         args.User_Id = ucC1FlexGrid1.fg[ucC1FlexGrid1.fg.RowSel, "申请人编号"].ToString();
         if (browse_Book != null)
         {
             browse_Book(sender, args);
         }
     }
 }
Beispiel #3
0
 private void 查看病例ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.dataGridView1.SelectedRows != null && this.dataGridView1.SelectedRows.Count > 0)
         {
             if (inPatient != null)
             {
                 string          patient_id = this.dataGridView1.SelectedRows[0].Cells["PATIENT_ID"].Value.ToString().Trim();
                 Child_EventArgs args       = new Child_EventArgs();
                 args.State   = "借阅";
                 args.Id      = Convert.ToInt32(patient_id);
                 args.User_Id = App.UserAccount.UserInfo.User_id;
                 if (browse_Book != null)
                 {
                     browse_Book(sender, args);
                 }
             }
         }
     }
     catch (System.Exception ex)
     {
     }
 }