示例#1
0
        public void print(bool ispre)
        {
            Cursor.Current = Cursors.WaitCursor;
            CP_ADOS4_TAB obj = bll.Get(_obj?.ID ?? 0);

            if (obj == null)
            {
                MessageBox.Show("请保存后再预览打印!", "软件提示");
                return;
            }
            try
            {
                TB_CHILDBASE     baseobj = new tb_childbasebll().Get(_cpwomeninfo.cd_id);
                cp_ados4_printer printer = new cp_ados4_printer(baseobj, obj);
                printer.Print(ispre);
            }
            catch (Exception ex)
            {
                MessageBox.Show("系统异常,请联系管理员!");
                throw ex;
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
示例#2
0
 private void buttonX11_Click(object sender, EventArgs e)
 {
     if (_obj != null)
     {
         var obj = new CP_ADOS4_TAB();
         obj.UPDATE_TIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
         _list.Add(obj);
         update_time.DataSource    = null;//数据源先置空,否则同一个对象不会刷新
         update_time.ValueMember   = "id";
         update_time.DisplayMember = "update_time";
         update_time.DataSource    = _list;
         update_time.SelectedIndex = _list.Count - 1;
     }
 }
示例#3
0
 /// <summary>
 /// 刷新列表
 /// </summary>
 /// <param name="id"></param>
 public void RefreshCode(int id)
 {
     Cursor.Current = Cursors.WaitCursor;
     _obj           = bll.Get(id);
     if (_obj != null)
     {
         CommonHelper.setForm(_obj, panel1.Controls);
     }
     else
     {
         SetDefault();
     }
     Cursor.Current = Cursors.Default;
 }
示例#4
0
        private void buttonX1_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            CP_ADOS4_TAB obj = getObj();

            if (bll.SaveOrUpdate(obj))
            {
                MessageBox.Show("保存成功!");
                RefreshRecordList();
                update_time.SelectedIndex = _list.IndexOf(_list.FirstOrDefault(t => t.UPDATE_TIME == obj.UPDATE_TIME));
            }
            else
            {
                MessageBox.Show("保存失败!");
            }
            Cursor.Current = Cursors.Default;
        }
示例#5
0
        private CP_ADOS4_TAB getObj()
        {
            if (pgzqm.Text.Trim() == "")
            {
                pgzqm.Text = globalInfoClass.UserName;
            }
            CP_ADOS4_TAB obj = CommonHelper.GetObjMenzhen <CP_ADOS4_TAB>(panel1.Controls, _cpwomeninfo.cd_id);

            obj.HOSPITAL = _hospital;
            if (_obj != null)
            {
                obj.ID           = _obj.ID;
                obj.OPERATE_CODE = _obj.OPERATE_CODE;
                obj.OPERATE_NAME = _obj.OPERATE_NAME;
                obj.OPERATE_TIME = _obj.OPERATE_TIME;
            }

            return(obj);
        }
示例#6
0
 public cp_ados4_printer(TB_CHILDBASE baseobj, CP_ADOS4_TAB obj)
 {
     InitializeComponent();
     _baseobj = baseobj;
     _obj     = obj;
 }