Пример #1
0
        private void Form_cssz_Load(object sender, EventArgs e)
        {
            xtBiz xtbiz = new xtBiz();

            dt = xtbiz.Get_xt_cssz();
            dgv_cssz.DataSource = dt;
            gridViewColumnsSyle();
        }
Пример #2
0
        private void btn_add_Click(object sender, EventArgs e)
        {
            xtBiz   xtbiz = new xtBiz();
            DataRow dr    = dt.NewRow();

            dr[3] = Convert.ToInt16(xtbiz.GetHmz("xtgnid", 1));
            dr[4] = Convert.ToInt16(treeView1.SelectedNode.Name);
            dt.Rows.Add(dr);
        }
Пример #3
0
        private void btn_save_Click(object sender, EventArgs e)
        {
            xtBiz xtbiz = new xtBiz();

            xtbiz.Update_xt_cssz(dt);
            MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            #region 日志记录
            loginbiz.WriteLog(this.Name.Trim(), "【" + Program.username + "】" + "在电脑【" + ma.HostName() + "】上修改了参数设置!IP:" + Program.hostip, Program.username);
            #endregion
        }
Пример #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            int    i;
            string xmbh = txtXmbh.Text.Trim();
            string bl   = txtBl.Text.Trim();

            if (bl == "")
            {
                bl = "1";
            }
            if (comn.DoubleYz(bl) == -1)
            {
                MessageBox.Show("数字格式错误!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (add)//增加
            {
                if (txtXmmc.Text.Trim() == "")
                {
                    MessageBox.Show("项目名称不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }

                xtBiz xtBiz = new xtBiz();
                xmbh         = xtBiz.GetHmz("jy_xmbh", 1);
                txtXmbh.Text = xmbh;
                i            = jyjkBiz.InsertJyxmb(xmbh, this.jyjxbh, txtXmmc.Text.Trim(), txtXmsx.Text.Trim(), txtDy.Text.Trim(),
                                                   txtXy.Text.Trim(), txtSpy.Text.Trim(), txtXpy.Text.Trim(), txtDw.Text.Trim(), txtMrjg.Text.Trim());
            }
            else
            {
                i = jyjkBiz.UpdateJyxmb(xmbh, cbxTy.Checked, txtXmsx.Text.Trim(), txtDy.Text.Trim(), txtXy.Text.Trim(), txtSpy.Text.Trim(),
                                        txtXpy.Text.Trim(), txtXmmc.Text.Trim(), txtBl.Text.Trim(), txtXssx.Text.Trim(), txtDw.Text.Trim(), txtMrjg.Text.Trim());
            }

            if (i > 0)
            {
                MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                if (add)
                {
                    Clear();
                }
                else
                {
                    this.DialogResult = DialogResult.Yes;
                }
            }
        }
Пример #5
0
        private void About_Load(object sender, EventArgs e)
        {
            this.textBoxDescription.Text = "说明:                                    销售热线:                       邮    箱:      ";
            xtBiz  biz         = new xtBiz();
            string str_version = biz.GetXtCsz("version").Trim();

            if (str_version == "2")
            {
                labelProductName.Text = "产品名称:健康体检报告管理系统";
            }
            if (str_version == "1")
            {
                labelProductName.Text = "产品名称:职业健康体检报告系统";
            }
            if (str_version == "3")
            {
                labelProductName.Text = "产品名称:从业体检报告系统";
            }
            if (str_version == "99")
            {
                labelProductName.Text = "产品名称:体检综合信息平台";
            }
        }
Пример #6
0
 /// <summary>
 /// 打印rdlc文件
 /// </summary>
 /// <param name="report">本地报表</param>
 /// <param name="DocumentName">打印文件名称</param>
 /// <param name="DispalyPageSetupDialog">是否显示打印设置对话框</param>
 /// <param name="PageName">打印单据的名字</param>
 /// <param name="PageFw">打印单据的范围</param>
 public void Run(LocalReport report, string DocumentName, bool DispalyPageSetupDialog, string PageName, string PageFw)
 {
     //pw.StartThread();
     try
     {
         if (PageName != "")//取自定义纸张大小
         {
             xtBiz     xtbiz = new xtBiz();
             DataTable dt    = xtbiz.Get_Xt_ggdy(PageName);
             if (dt.Rows.Count == 1)
             {
                 PaperName    = dt.Rows[0]["PaperName"].ToString();
                 PageWidth    = dt.Rows[0]["PageWidth"].ToString();
                 PageHeight   = dt.Rows[0]["PageHeight"].ToString();
                 MarginTop    = dt.Rows[0]["MarginTop"].ToString();
                 MarginLeft   = dt.Rows[0]["MarginLeft"].ToString();
                 MarginRight  = dt.Rows[0]["MarginRight"].ToString();
                 MarginBottom = dt.Rows[0]["MarginBottom"].ToString();
                 PagePrinter  = dt.Rows[0]["PagePrinter"].ToString();
                 if (PageWidth == "")
                 {
                     PageWidth = "0cm";
                 }
                 if (PageHeight == "")
                 {
                     PageHeight = "0cm";
                 }
                 if (MarginTop == "")
                 {
                     MarginTop = "0cm";
                 }
                 if (MarginLeft == "")
                 {
                     MarginLeft = "0cm";
                 }
                 if (MarginRight == "")
                 {
                     MarginRight = "0cm";
                 }
                 if (MarginBottom == "")
                 {
                     MarginBottom = "0cm";
                 }
             }
             else
             {
                 MessageBox.Show("该单据纸张配置【" + PageName + "】没有设置,请联系管理员!", "提示",
                                 MessageBoxButtons.OK, MessageBoxIcon.Warning);
                 return;
             }
         }
         Export(report, PageName);
         if (PageFw == "")
         {
             m_currentPageIndex = 0;
             Print(DocumentName, DispalyPageSetupDialog);
             //pw.StopThread();
         }
         else
         {
             string[] str_fw = PageFw.Split('-');
             int      begin  = 0;
             int      end    = 0;
             try
             {
                 if (str_fw.Length == 1)
                 {
                     begin = Convert.ToInt32(str_fw[0]);
                     end   = Convert.ToInt32(str_fw[0]);
                 }
                 else
                 {
                     begin = Convert.ToInt32(str_fw[0]);
                     end   = Convert.ToInt32(str_fw[1]);
                 }
                 if (begin > end)
                 {
                     MessageBox.Show("该单据自定义打印页数填写有误,请检查!", "提示",
                                     MessageBoxButtons.OK, MessageBoxIcon.Warning);
                     return;
                 }
             }
             catch
             {
                 MessageBox.Show("该单据自定义打印页数填写有误,请检查!", "提示",
                                 MessageBoxButtons.OK, MessageBoxIcon.Warning);
                 return;
             }
             for (int i = begin; i <= end; i++)
             {
                 m_PageIndex        = i;
                 m_currentPageIndex = 0;
                 Print(DocumentName, DispalyPageSetupDialog);
                 //pw.StopThread();
             }
         }
     }
     catch
     {
     }
     finally
     {
         Dispose();
     }
 }
Пример #7
0
        //private PrintWaiting pw = new PrintWaiting();

        /// <summary>
        /// 打印rdlc文件
        /// </summary>
        /// <param name="report">本地报表</param>
        /// <param name="DocumentName">打印文件名称</param>
        /// <param name="DispalyPageSetupDialog">是否显示打印设置对话框</param>
        /// <param name="PageName">打印单据的名字</param>
        public void Run(LocalReport report, string DocumentName, bool DispalyPageSetupDialog, string PageName)
        {
            //pw.StartThread();
            try
            {
                if (PageName != "")//取自定义纸张大小
                {
                    xtBiz     xtbiz = new xtBiz();
                    DataTable dt    = xtbiz.Get_Xt_ggdy(PageName);
                    if (dt.Rows.Count == 1)
                    {
                        PaperName = dt.Rows[0]["PaperName"].ToString();
                        //PageWidth = dt.Rows[0]["PageWidth"].ToString();
                        //PageHeight = dt.Rows[0]["PageHeight"].ToString();
                        string w = PageWidth;
                        string h = PageHeight;
                        MarginTop    = dt.Rows[0]["MarginTop"].ToString();
                        MarginLeft   = dt.Rows[0]["MarginLeft"].ToString();
                        MarginRight  = dt.Rows[0]["MarginRight"].ToString();
                        MarginBottom = dt.Rows[0]["MarginBottom"].ToString();
                        PagePrinter  = dt.Rows[0]["PagePrinter"].ToString();
                        if (PageWidth == "")
                        {
                            PageWidth = "0cm";
                        }
                        if (PageHeight == "")
                        {
                            PageHeight = "0cm";
                        }
                        if (MarginTop == "")
                        {
                            MarginTop = "0cm";
                        }
                        if (MarginLeft == "")
                        {
                            MarginLeft = "0cm";
                        }
                        if (MarginRight == "")
                        {
                            MarginRight = "0cm";
                        }
                        if (MarginBottom == "")
                        {
                            MarginBottom = "0cm";
                        }
                    }
                    else
                    {
                        MessageBox.Show("该单据纸张配置【" + PageName + "】没有设置,请联系管理员!", "提示",
                                        MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return;
                    }
                }
                Export(report, PageName);
                m_currentPageIndex = 0;
                Print(DocumentName, DispalyPageSetupDialog);
                //pw.StopThread();
            }
            catch
            { }
            finally
            {
                Dispose();
            }
        }