Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (this.richTextBox1.Text.Trim() == "")
     {
         MessageBox.Show("理由不能为空,必须填写!");
         this.richTextBox1.Focus();
         return;
     }
     try
     {
         string    sql = "select * from PATH_VARIANT where 1=2";
         DataTable tb  = FrmMdiMain.Database.GetDataTable(sql);
         DataRow   row = tb.NewRow();
         tb.Rows.Add(row);
         row["PATH_VARIANT_ID"] = _pathway_exe_id;//改为执行id
         row["PATHWAY_ID"]      = new Guid(_pathway_id);
         row["CONTENT"]         = this.richTextBox1.Text;
         row["CREATE_DATE"]     = DateManager.ServerDateTimeByDBType(FrmMdiMain.Database);
         row["EMPID_CREATE"]    = FrmMdiMain.CurrentUser.EmployeeId;
         PublicFunction.databaseupdate(sql, tb);
         PublicFunction.UpdatePathWayStatus(FrmMdiMain.Database, _pathway_exe_id, 3);
         PublicFunction.UpdatePathStepStatus(FrmMdiMain.Database, _exe_step_id, 1);
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
 void txtkh_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == '\r')
     {
         try
         {
             string kh = ts_mz_class.Fun.returnKh(Convert.ToInt32(cmbklx.SelectedValue), txtkh.Text);
             txtkh.Text = kh;
             decimal kye   = 0;
             YY_BRXX _brxx = mzys.GetBRXX(Convert.ToInt32(cmbklx.SelectedValue), kh, out kye, out this.kdjid, InstanceForm.BDatabase);
             if (_brxx != null)
             {
                 this.brxx = _brxx;
                 Age age = DateManager.DateToAge(Convert.ToDateTime(brxx.Csrq), InstanceForm.BDatabase);
                 this.txtage.Text = age.AgeNum.ToString();
                 this.txtAgeUnit.SelectedValue = (int)age.Unit;
                 this.txtname.Text             = brxx.Brxm;
                 this.txtxb.SelectedValue      = brxx.Xb;
                 this.txtkye.Text = kye.ToString("0.00");
                 txtdeptname.Text = InstanceForm.BCurrentDept.DeptName;
             }
         }
         catch (Exception error)
         {
             MessageBox.Show(error.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error);
             this.txtage.Text         = "";
             this.txtname.Text        = "";
             this.txtxb.SelectedValue = null;
             this.txtkye.Text         = "0.00";
             txtdeptname.Text         = "";
         }
     }
 }
Exemplo n.º 3
0
        private DateTime Scjksj(int sky)
        {
            string    ssql = "select top 1 * from mz_jkb where jky=" + sky + " order by jkrq desc";//先取交款表的最后交款时间
            DataTable tb   = InstanceForm.BDatabase.GetDataTable(ssql);

            if (tb.Rows.Count == 0)                                                                                                                                                      //如果没有记录
            {
                ssql = "select top 1 sfrq from vi_mz_fpb(nolock) where sfy=" + sky + " and (jkid is null or isnull(jkid,dbo.FUN_GETEMPTYGUID())=dbo.FUN_GETEMPTYGUID() ) order by sfrq"; //就先取发票表里面的第一条收费记录
                DataTable tab = InstanceForm.BDatabase.GetDataTable(ssql);
                DataRow   dr  = tab.NewRow();
                dr["sfrq"] = Convertor.IsNull(InstanceForm.BDatabase.GetDataResult("select top 1 dzrq as sfrq from yy_kdjb_je (nolock) where dzy=" + sky + " and (jkid is null or isnull(jkid,dbo.FUN_GETEMPTYGUID())=dbo.FUN_GETEMPTYGUID() )  order by dzrq "), "2099-12-10 00:00:00");//再取预交金表里面的第一条存款记录
                tab.Rows.Add(dr);
                DataView dv = tab.DefaultView;
                dv.Sort = "sfrq asc";                                //按收费日期排序
                tab     = dv.ToTable();
                if (tab.Rows.Count != 0)                             //如果有记录
                {
                    return(Convert.ToDateTime(tab.Rows[0]["sfrq"])); //取第一条最前面的时间
                }
                else
                {
                    return(Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00"));//否则当前时间
                }
            }
            else
            {
                return(Convert.ToDateTime(tb.Rows[0]["jsrq"]));
            }
        }
 protected override void AccionLimpiar()
 {
     foreach (Control item in this.groupBox1.Controls)
     {
         if (item is TextBox)
         {
             item.Text = "";
         }
         else if (item is NumericUpDown)
         {
             ((NumericUpDown)item).Value = 0;
         }
         else if (item is DateTimePicker)
         {
             ((DateTimePicker)item).Value = DateManager.Ahora();
         }
         else if (item is CheckBox)
         {
             ((CheckBox)item).Checked = false;
         }
         else if (item is CheckedListBox)
         {
             for (int i = 0; i < this.list_Rubros.Items.Count; i++)
             {
                 list_Rubros.SetItemChecked(i, false);
             }
         }
     }
     this.cb_Estado.SelectedIndex      = 0;
     this.cb_Visibilidad.SelectedIndex = 0;
 }
Exemplo n.º 5
0
        private void Frmpyrgzl_Load(object sender, System.EventArgs e)
        {
            try
            {
                DataTable Tb = new DataTable();
                Tb.TableName = "Tb";
                for (int i = 0; i <= this.myDataGrid1.TableStyles[0].GridColumnStyles.Count - 1; i++)
                {
                    if (this.myDataGrid1.TableStyles[0].GridColumnStyles[i].GetType().ToString() == "System.Windows.Forms.DataGridBoolColumn")
                    {
                        Tb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, Type.GetType("System.Int16"));
                    }
                    else
                    {
                        Tb.Columns.Add(this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText, Type.GetType("System.String"));
                    }

                    this.myDataGrid1.TableStyles[0].GridColumnStyles[i].MappingName = this.myDataGrid1.TableStyles[0].GridColumnStyles[i].HeaderText;
                    this.myDataGrid1.TableStyles[0].GridColumnStyles[i].NullText    = "";
                }
                this.myDataGrid1.DataSource = Tb;
                this.myDataGrid1.TableStyles[0].MappingName = "Tb";

                this.dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
                this.dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);

                Addyjks(cmbks, 1);

                cmbks.SelectedValue = InstanceForm.BCurrentDept.DeptId;
            }
            catch (System.Exception err)
            {
                MessageBox.Show("发生错误" + err.Message);
            }
        }
Exemplo n.º 6
0
        public FrmZyzxkssrtj_mx()
        {
            InitializeComponent();

            dtp1.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00");
            dtp2.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59");
        }
Exemplo n.º 7
0
 private void txtnl_Leave(object sender, EventArgs e)
 {
     //string ss = txtnl.Text;
     //ss = ss.Replace("岁", "");
     //ss = ss.Replace("月", "");
     //ss = ss.Replace("天", "");
     //if (txtnl.Text.Trim() != "" && Convertor.IsNumeric(ss) == false)
     //{
     //    MessageBox.Show("年龄请输入数字");
     //    return;
     //}
     //if (txtnl.Text.Trim() != "" && txtnl.Text.Contains("岁") == false && txtnl.Text.Contains("月") == false && txtnl.Text.Contains("天") == false)
     //{
     //    DateTime date = DateManager.AgeToDate(new Age(Convert.ToInt32(ss), AgeUnit.岁), InstanceForm.BDatabase);
     //    dtpcsrq.Value = date;
     //}
     //if (txtnl.Text.Trim() != "" && Convertor.IsNumeric(ss) == true && txtnl.Text.Contains("岁") == true)
     //{
     //    DateTime date = DateManager.AgeToDate(new Age(Convert.ToInt32(ss), AgeUnit.岁), InstanceForm.BDatabase);
     //    dtpcsrq.Value = date;
     //}
     if (txtnl.Text.Trim() != "" && Convertor.IsNumeric(txtnl.Text) == false)
     {
         MessageBox.Show("年龄请输入数字");
         return;
     }
     if (txtnl.Text.Trim() != "")
         dtpcsrq.Value = DateManager.AgeToDate(new Age(Convert.ToInt16(txtnl.Text), (AgeUnit)cmbDW.SelectedIndex), InstanceForm.BDatabase);
     else
         dtpcsrq.Value = DateManager.ServerDateTimeByDBType(TrasenFrame.Forms.FrmMdiMain.Database);
 }
Exemplo n.º 8
0
 private void Frm_Zy_LackDisChargeReport_Load(object sender, EventArgs e)
 {
     this.WindowState = FormWindowState.Maximized;
     dtpBjksj.Value   = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00");
     dtpEjksj.Value   = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59");
     AddInpatientType();
 }
Exemplo n.º 9
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;
            DateTime Date   = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).AddDays(-7);
            DateTime Date_1 = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);

            this.dateTimePicker1.Value = Date;
            this.dateTimePicker2.Value = Date_1;


            txtinpatientNo.InpatientNoLength = Convert.ToInt32(new SystemCfg(5026).Config);
            txtinpatientNo.Text = InpatientNo.GetEmptyZyh();
            zyh = InpatientNo.GetEmptyZyh();

            string    sql    = "";
            DataTable tbWard = new DataTable();

            sql    = "select * from jc_ward where jgbm=" + FrmMdiMain.Jgbm + " order by ward_id";
            tbWard = FrmMdiMain.Database.GetDataTable(sql);
            DataRow dr = tbWard.NewRow();

            dr["ward_id"]   = "-1";
            dr["ward_name"] = "全部";
            tbWard.Rows.Add(dr);
            cmbWard.ValueMember   = "ward_id";
            cmbWard.DisplayMember = "ward_name";
            cmbWard.DataSource    = tbWard;
            cmbWard.SelectedValue = "-1";

            BingData();
        }
Exemplo n.º 10
0
 private void frmInputDate_Load(object sender, System.EventArgs e)
 {
     this.DtpbeginDate.Value   = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);                                                       //服务器当前系统日期
     this.DtpbeginDate.MaxDate = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59"); //系统日期    -最大
     System.TimeSpan diff = new System.TimeSpan(Convert.ToInt32((new SystemCfg(7007)).Config), 0, 0, 0);
     this.DtpbeginDate.MinDate = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).Subtract(diff);                                        //系统日期-Begin_MinDays天 -最小
 }
Exemplo n.º 11
0
 private void Inicio_Load_CargarBarrasDeEstado()
 {
     this.lblUsuario.Text = "Usuario: " + Program.ContextoActual.UsuarioActual.username;
     //this.lblLogPath.Text = "Almacenando log en: " + Program.ContextoActual.LogPath;
     this.lblFechaSistema.Text     = "Fecha: " + DateManager.Format(Program.ContextoActual.FechaActual);
     this.lblConnectionString.Text = "Conectado: " + AppConfigReader.Get("connection_string");
 }
Exemplo n.º 12
0
        void FrmExpPubFee_Load(object sender, EventArgs e)
        {
            try
            {
                saveFileDialog1.DefaultExt = "dbf";//默认后缀名

                //初始化日期21
                DateTime dtStr = DateTime.Parse(DateManager.ServerDateTimeByDBType(InstanceForm._database).AddMonths(-1).ToString("yyyy-MM-dd HH:mm:ss"));
                DateTime dtEnd = DateTime.Parse(DateManager.ServerDateTimeByDBType(InstanceForm._database).ToString("yyyy-MM-dd HH:mm:ss"));

                dtpStart.Value = dtStr;
                dtpEnd.Value   = dtEnd;
            }
            catch { }

            try
            {
                dataGridView1.AllowUserToAddRows    = false;
                dataGridView1.AllowUserToDeleteRows = false;
                dataGridView1.ReadOnly = true;
                this.dataGridView1.AutoGenerateColumns = false;
            }
            catch
            { }

            try
            {
                dataGridView2.AllowUserToAddRows    = false;
                dataGridView2.AllowUserToDeleteRows = false;
                dataGridView2.ReadOnly = true;
                this.dataGridView2.AutoGenerateColumns = false;
            }
            catch
            { }
        }
Exemplo n.º 13
0
        private void Frmxjsrtj_Load(object sender, EventArgs e)
        {
            FunAddComboBox.AddOperator(true, cmbuser, InstanceForm.BDatabase);
            this.WindowState = FormWindowState.Maximized;
            dtp1.Value       = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00");
            dtp2.Value       = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59");

            SystemCfg cfg1054 = new SystemCfg(1054);

            string[] s = cfg1054.Config.ToString().Split(',');
            if (s.Length == 2)
            {
                dtp1.Value = Convert.ToDateTime(dtp1.Value.AddDays(-1).ToShortDateString() + " " + s[0]);
                dtp2.Value = Convert.ToDateTime(dtp2.Value.ToShortDateString() + " " + s[1]);
            }

            FunAddComboBox.AddJgbm(true, cmbjgbm, InstanceForm.BDatabase);
            cmbjgbm.SelectedValue = TrasenFrame.Forms.FrmMdiMain.Jgbm;
            if (_menuTag.Function_Name == "Fun_ts_mz_tjbb_jk_pos")
            {
                label2.Text = "缴款日期";
            }
            else
            {
                label2.Text = "收费日期";
            }
        }
Exemplo n.º 14
0
        private void Frmyjqr_Load(object sender, EventArgs e)
        {
            this.WindowState = FormWindowState.Maximized;

            //SystemCfg sysrq = new SystemCfg(10007, InstanceForm.BDatabase);
            this.dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).AddDays(Convert.ToInt32(1));

            string Bkh = ApiFunction.GetIniString("划价收费", "卡号优先获得焦点", Constant.ApplicationDirectory + "//ClientWindow.ini");

            if (Bkh == "true")
            {
                txtkh.Focus();
            }
            else
            {
                txtmzh.Focus();
            }

            //自动读射频卡
            string sbxh = ApiFunction.GetIniString("医院健康卡", "设备型号", Constant.ApplicationDirectory + "//ClientWindow.ini");

            ts_Read_hospitalCard.Icall ReadCard = ts_Read_hospitalCard.CardFactory.NewCall(sbxh);
            if (ReadCard != null)
            {
                ReadCard.AutoReadCard(_menuTag.Function_Name, cmbklx, txtkh);
            }
        }
Exemplo n.º 15
0
        private void InitializePage()
        {
            btnSave.Attributes["onclick"] = "return validateRequiredFields();";
            btnSave.Text   = Language.GetString(btnSave.Text);
            btnCancel.Text = Language.GetString(btnCancel.Text);

            int resultCount = 0;

            drpParent.DataSource     = Facade.Data.GetPagedData(UserGuid, DataCenterGuid, "CreateDate", 0, 0, ref resultCount);
            drpParent.DataTextField  = "Title";
            drpParent.DataValueField = "Guid";
            drpParent.DataBind();
            drpParent.Items.Insert(0, new ListItem(string.Empty, Guid.Empty.ToString()));

            if (ActionType == "edit")
            {
                Common.Data data = Facade.Data.LoadData(DataGuid);
                txtTitle.Text           = data.Title;
                txtPriority.Text        = data.Priority.ToString();
                txtBreif.Text           = data.Summary;
                txtBody.Text            = data.Content;
                dtpFromDate.Value       = data.FromDate != DateTime.MinValue ? DateManager.GetSolarDate(data.FromDate) : string.Empty;
                dtpToDate.Value         = data.ToDate != DateTime.MinValue ? DateManager.GetSolarDate(data.ToDate) : string.Empty;
                drpParent.SelectedValue = data.ParentGuid.ToString();
            }
        }
Exemplo n.º 16
0
        /// <summary>
        /// 获取诊区的所有的诊室
        /// </summary>
        /// <param name="zqid"></param>
        /// <param name="db"></param>
        /// <returns></returns>
        public DataTable GetZjList(int zqid, RelationalDatabase db)
        {
            string strSql = string.Empty;
            string strZq  = new SystemCfg(3136).Config;

            strSql = string.Format(@"SELECT *, ISNULL(dbo.fun_getEmpName(ZZYS),'未坐诊') AS zzysname FROM dbo.JC_ZJSZ where  ZQID = {0}", zqid);
            if (!string.IsNullOrEmpty(strZq))
            {
                if (strZq == zqid.ToString())
                {
                    string strTemp = DateManager.ServerDateTimeByDBType(db).DayOfWeek.ToString();

                    string[] str3137   = new SystemCfg(3137).Config.Split(';');
                    string   strZjList = "";
                    foreach (string str in str3137)
                    {
                        if (str.Contains(strTemp))
                        {
                            strZjList = str.Split(':')[1];
                        }
                    }
                    strSql = string.Format(@"SELECT *, ISNULL(dbo.fun_getEmpName(ZZYS),'未坐诊') AS zzysname FROM dbo.JC_ZJSZ where  ZQID = {0} and zjid in ({1})", zqid, strZjList);
                }
            }
            DataTable dt = db.GetDataTable(strSql);

            return(dt);
        }
Exemplo n.º 17
0
        private void FrmBussinessReportOfItem_Load(object sender, EventArgs e)
        {
            //FunAddComboBox.AddOperator(true, cmbuser);
            this.WindowState = FormWindowState.Maximized;


            dtpBjksj.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00");
            dtpEjksj.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59");



            SystemCfg cfg1054 = new SystemCfg(1054);

            string[] s = cfg1054.Config.ToString().Split(',');


            //cmbuser.SelectedValue = InstanceForm.BCurrentUser.EmployeeId.ToString();
            //if (cmbuser.SelectedValue == null) cmbuser.SelectedValue = "0";
            //if (cmbuser.SelectedValue.ToString() != InstanceForm.BCurrentUser.EmployeeId.ToString())
            //    this.cmbuser.SelectedValue = "0";
            //FullCmbSfDept();
            //FunAddComboBox.AddJgbm(true, cmbSource, InstanceForm.BDatabase);
            cmbSource.SelectedIndex         = 0;
            cmbGroup.SelectedIndex          = 0;
            cmbDepartMentType.SelectedIndex = 0;
            this.dataGridView1.Width        = this.Width - 40;
            this.panel1.Left = this.Width - this.panel1.Width - 20;
        }
Exemplo n.º 18
0
 private void Frmtitle_Load(object sender, System.EventArgs e)
 {
     this.dtp1.Value      = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
     this.dtp2.Value      = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
     this.chkdjsj.Checked = true;
     FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb");
 }
Exemplo n.º 19
0
        private void FrmZyMzJyCx_Load(object sender, EventArgs e)
        {
            CshMxGrid(this.myDataGrid1);
            CshHzGrid(this.myDataGrid2);
            SystemCfg sysrq = new SystemCfg(8019);

            this.dtprq1.Value            = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).AddDays(Convert.ToInt32(sysrq.Config) * (-1));
            this.dtprq2.Value            = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
            this.chkrq.Checked           = true;
            this.tabControl1.SelectedTab = this.tabPage1;

            //Modify by jchl
            try
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("id", typeof(string));
                dt.Columns.Add("name", typeof(string));

                dt.Rows.Add(new object[] { "-1", "全部" });
                dt.Rows.Add(new object[] { "1", "住院" });
                dt.Rows.Add(new object[] { "2", "门诊" });

                Addcmb(cmbFylb, dt, "id", "name");
                cmbFylb.SelectedIndex = 0;
            }
            catch { }
        }
Exemplo n.º 20
0
 private void Frm_QueryBuessinessOfOperation_Load(object sender, EventArgs e)
 {
     this.WindowState        = FormWindowState.Maximized;
     dtpBjksj.Value          = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00");
     dtpEjksj.Value          = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59");
     cmbSource.SelectedIndex = 0;
 }
Exemplo n.º 21
0
        private void Frmtitle_Load(object sender, System.EventArgs e)
        {
            this.dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
            this.dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);

            //初始化
            FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb");


            if (_menuTag.Function_Name == "Fun_ts_yp_pd_yf" && YpConfig.是否药库(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) == true)
            {
                butnew.Enabled = false;
                butsh.Enabled  = false;
            }

            if (_menuTag.Function_Name == "Fun_ts_yp_pd" && YpConfig.是否药库(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) == false)
            {
                butnew.Enabled = false;
                butsh.Enabled  = false;
            }

            if (_menuTag.Function_Name == "Fun_ts_yp_pd_yf_cx" || _menuTag.Function_Name == "Fun_ts_yp_pd_cx")
            {
                butnew.Visible = false;
            }
        }
Exemplo n.º 22
0
        void FrmSelectSFJL_Load(object sender, EventArgs e)
        {
            dtpTo.Value   = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToString("yyyy-MM-dd") + " 23:59:59");
            dtpFrom.Value = dtpTo.Value.AddSeconds(1).AddDays(-4);

            SelectedFp();
        }
Exemplo n.º 23
0
        private void FrmSSQuery_Load(object sender, System.EventArgs e)
        {
            //			this.Text=PubFunction.sys_date();
            //			dtprq1.Value=Convert.ToDateTime(PubFunction.sys_date());
            DateTime dt = DateManager.ServerDateTimeByDBType(FrmMdiMain.Database);

            dtprq1.Value = dt;
            dtprq2.Value = dtprq1.Value;
            DataTable myTb = null;

            if (this.label1.Text == "安排时间")
            {
                myTb = myQuery.SSapp(Ward_DeptID, dtprq1.Value.Date, dtprq2.Value.Date, 7);
            }
            else
            {
                myTb = myQuery.SSapp(deptID, dtprq1.Value.Date, dtprq2.Value.Date, 1);
            }
            this.myDataGrid1.DataSource = myTb;
            if (myTb.Rows.Count > 0)
            {
                DelDataGridTextBox(myDataGrid1);
            }

            //			this.Text=PubFunction.sys_date();
        }
Exemplo n.º 24
0
 // Constructor by Default
 public BookingManagerTest()
 {
     time = new DateManager();
     fbr  = new FakeBookingRepository(time.DtStartParameter, time.DtEndParameter);
     frr  = new FakeRoomRepository();
     bm   = new BookingManager(fbr, frr);
 }
Exemplo n.º 25
0
        private void listView1_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                DataTable tb = (DataTable)this.DateGridView1.DataSource;
                if (this.DateGridView1.CurrentCell == null)
                {
                    return;
                }
                if (tb.Rows.Count == 0)
                {
                    return;
                }
                Guid   yhlxid = new Guid(tb.Rows[this.DateGridView1.CurrentCell.RowIndex]["ID"].ToString());
                string djsj   = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToString();

                ListViewItem item   = (ListViewItem)listView1.SelectedItems[0];
                string       deptid = item.SubItems["dept_id"].Text;
                string       ssql   = "select * from JC_YH_DEPT_LIMIT where dept_id='" + deptid + "' and yhlx_id='" + yhlxid + "' ";
                DataTable    tb1    = InstanceForm.BDatabase.GetDataTable(ssql);
                if (tb1.Rows.Count > 0)
                {
                    MessageBox.Show("该科室已添加,不能重复添加", "", MessageBoxButtons.OK, MessageBoxIcon.Warning); return;
                }
                ssql = "insert into JC_YH_DEPT_LIMIT(dept_id,yhlx_id,djsj,djy)values('" + deptid + "','" + yhlxid + "','" + djsj + "'," + InstanceForm.BCurrentUser.EmployeeId + ") ";
                InstanceForm.BDatabase.DoCommand(ssql);
                fillyhlx(yhlxid);
            }
            catch (System.Exception err)
            {
                MessageBox.Show(err.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 26
0
 /// <summary>
 /// 保存日志
 /// </summary>
 /// <param name="czlx">操作类型</param>
 /// <param name="cznr">操作内容</param>
 /// <param name="ymc">源名称 相对于主键的表名 请正确输入表名</param>
 /// <param name="ylm">源名称 相对于主键的字段名</param>
 /// <param name="yzj">表的主键ID 所修改的记录的值</param>
 /// <param name="djjgbm">登记机构编码</param>
 /// <param name="djjgbm">目标机构编码 </param>
 /// <param name="mbks">目标科室 即往来科室 主要是用来验证这个科室所属的机构编码.一般不需填写,只有当有业务往来时,才填 比如转科:请填写目的科室</param>
 /// <param name="bz">备注</param>
 /// <param name="database">数据库连接</param>
 public void Save_log(ts_HospData_Share.czlx lx, string cznr, string ymc, string ylm, string yzj, long djjgbm, long mbjgbm, int mbks, string bz, out Guid djid, RelationalDatabase database)
 {
     ts_HospData_Share.ts_update_type ty = new ts_HospData_Share.ts_update_type((int)(lx), database);
     if (ty.BscBz == 0)
     {
         _czlx   = (int)(lx);
         _czks   = TrasenFrame.Forms.FrmMdiMain.CurrentDept.DeptId;
         _czry   = TrasenFrame.Forms.FrmMdiMain.CurrentUser.EmployeeId;
         _cznr   = cznr;
         _ymc    = ymc;
         _ylm    = ylm;
         _yzj    = yzj;
         _djsj   = DateManager.ServerDateTimeByDBType(database).ToString();
         _djy    = TrasenFrame.Forms.FrmMdiMain.CurrentUser.EmployeeId;
         _djjgbm = djjgbm;
         _mbjgbm = mbjgbm;
         _mbks   = mbks;
         _bz     = bz;
         Save(database, out djid);
     }
     else
     {
         djid = Guid.Empty;
     }
 }
Exemplo n.º 27
0
        private void FrmMzcfdp_Load(object sender, EventArgs e)
        {
            try
            {
                ParameterEx[] parameters = new ParameterEx[2];
                parameters[0].Value = InstanceForm.BCurrentDept.DeptId;
                parameters[1].Value = _menuTag.Function_Name;
                parameters[0].Text  = "@dlks";
                parameters[1].Text  = "@funname";
                DataTable tb = InstanceForm.BDatabase.GetDataTable("SP_YP_CFPD_KSYS", parameters, 30);
                AddTree(tb);


                //挂号科室
                Tbks = Fun.GetGhks(false, InstanceForm.BDatabase);
                //挂号医生
                Tbys = Fun.GetGhys(0, InstanceForm.BDatabase);


                dtp1.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 00:00:00");
                dtp2.Value = Convert.ToDateTime(DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase).ToShortDateString() + " 23:59:59");
            }
            catch (System.Exception err)
            {
                MessageBox.Show(err.ToString(), "", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 28
0
        private void FrmTurn_Load(object sender, System.EventArgs e)
        {
            loadData();

            DateTime dt = DateManager.ServerDateTimeByDBType(FrmMdiMain.Database);

            this.dateTimePicker1.Value   = dt;
            this.dateTimePicker1.MaxDate = dt.Date.AddDays(7);

            this.dateTimePicker1.MinDate = dt.Date.AddDays(-2);
            string cfg6031 = new SystemCfg(6031).Config;

            if (cfg6031 == "1")
            {
                dateTimePicker1.Enabled = true;
                //add by zouchihua 2012-02-14 转科医嘱必须大于除手术以为的医嘱的时间
                try
                {
                    string    sql = "select * from zy_orderrecord where inpatient_id='" + this.BinID + "' and baby_id=0 and DELETE_BIT=0 and MNGTYPE in (0,1) and dept_id not in (SELECT DEPTID FROM SS_DEPT) order by ORDER_BDATE desc ";
                    DataTable tb  = InstanceForm._database.GetDataTable(sql);
                    if (tb != null && tb.Rows.Count > 0)
                    {
                        this.dateTimePicker1.MinDate = Convert.ToDateTime(tb.Rows[0]["ORDER_BDATE"].ToString()).AddMinutes(1);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
                dateTimePicker1.Enabled = false;
            }
        }
Exemplo n.º 29
0
        private void SetNlControl(DateTime csrq)
        {
            Age age = DateManager.DateToAge(csrq, InstanceForm.BDatabase);

            txtnl.Text          = age.AgeNum.ToString();
            cmbDW.SelectedIndex = (int)age.Unit;
        }
Exemplo n.º 30
0
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>


        private void Frmxspm_Load(object sender, System.EventArgs e)
        {
            try
            {
                dtp1.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
                dtp2.Value = DateManager.ServerDateTimeByDBType(InstanceForm.BDatabase);
                //初始化
                FunBase.CsDataGrid(this.myDataGrid1, this.myDataGrid1.TableStyles[0], "Tb");



                Yp.AddcmbYjks(cmbyjks, DeptType.药房, InstanceForm.BDatabase, InstanceForm._menuTag.Jgbm);

                if (YpConfig.kslx(InstanceForm.BCurrentDept.DeptId, InstanceForm.BDatabase) != DeptType.未知)
                {
                    cmbyjks.SelectedValue = InstanceForm.BCurrentDept.DeptId;
                    cmbyjks.Enabled       = false;
                }
                Yp.AddCmbYplx(true, Convert.ToInt32(cmbyjks.SelectedValue), cmbyplx, InstanceForm.BDatabase);
                cmbypsx.SelectedIndex = 0;
            }
            catch (System.Exception err)
            {
                MessageBox.Show("发生错误" + err.Message);
            }
        }
 void Awake()
 {
     if (instance == null) {
         instance = this;
     } else {
         Destroy(gameObject);
     }
 }
 void OnDestroy()
 {
     if (instance = this) {
         instance = null;
     }
 }