Ejemplo n.º 1
0
        /// <summary>
        /// 计算比对结果
        /// </summary>
        void CalcCompareResult()
        {
            DTV.Passport passport = new DTV.Passport();
            Dictionary <string, DataTable> dictionary = new Dictionary <string, DataTable>();

            dictionary.Add("Report", DgvToTable(dgvPassportReport));
            dictionary.Add("Feedback", DgvToTable(dgvPassportFeedback));
            dictionary.Add("Compare", DgvToTable(dgvPassportCompare));
            Dictionary <string, string> result = passport.CalcResult(dictionary);

            tbReport.Text   = result["hzreport"] + result["gtreport"];
            tbFeedback.Text = result["hzfeedback"] + result["gtfeedback"];
            tbCompare.Text  = result["hzcompare"] + result["gtcompare"];
        }
Ejemplo n.º 2
0
        private void UPassportCompare_Load(object sender, EventArgs e)
        {
            DTV.Passport    passport = new DTV.Passport();
            BLL.code_detail cibll    = new DXD.BLL.code_detail();
            cibll.Exists(1);
            //载入证件反馈数据
            //DataSet ds = passport.LoadFeedback(query_id);
            //ds = cibll.CodeConvert(ds, "passport_type");

            //dgvPassportFeedback.DataSource = ds.Tables[0];

            DataSet ds;
            //ds = cibll.GetAllList();
            //载入证件个人报告数据
            //ds = passport.LoadReport(query_id);
            //ds = cibll.CodeConvert(ds, "passport_type");
            //dgvPassportReport.DataSource = ds.Tables[0];

            //载入比对匹配数据
            //ds = passport.LoadCompare(query_id);
            //ds = cibll.CodeConvert(ds, "rep_passport_type");
            //ds = cibll.CodeConvert(ds, "fee_passport_type");
            //dgvPassportCompare.DataSource = ds.Tables[0];

            //this.dgvPassportCompare.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing;
            //this.dgvPassportCompare.ColumnHeadersHeight = this.dgvPassportCompare.ColumnHeadersHeight * 2;
            //this.dgvPassportCompare.ColumnHeadersDefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomCenter;
            //this.dgvPassportCompare.CellPainting += new DataGridViewCellPaintingEventHandler(dgvPassportCompare_CellPainting);
            //this.dgvPassportCompare.Paint += new PaintEventHandler(dgvPassportCompare_Paint);

            //dgvPassportReport.Columns[4].DefaultCellStyle.Format = "yyyy-MM-dd";
            //dgvPassportReport.Columns[5].DefaultCellStyle.Format = "yyyy-MM-dd";
            //dgvPassportFeedback.ClearSelection();
            //dgvPassportReport.ClearSelection();
            //dgvPassportCompare.ClearSelection();

            ////载入比对结果数据
            //DataTable dt = passport.LoadCompareResult(query_id).Tables[0];
            //if (dt.Rows.Count == 0)
            //{
            //    CalcCompareResult();
            //}
        }
Ejemplo n.º 3
0
        private void tsbSaveResult_Click(object sender, EventArgs e)
        {
            Dictionary <string, DataTable> dictionary = new Dictionary <string, DataTable>();
            DataTable dt = DgvToTable(dgvPassportReport);

            dictionary.Add("Report", dt);
            dt = DgvToTable(dgvPassportFeedback);
            dictionary.Add("Feedback", dt);
            dt = DgvToTable(dgvPassportCompare);
            dictionary.Add("Compare", dt);

            DTV.Passport passport = new DTV.Passport();

            Dictionary <string, string> result = passport.CalcResult(dictionary);

            dt = new DataTable();
            dt.Columns.Add("Type", Type.GetType("System.String"));
            dt.Columns.Add("Report", Type.GetType("System.String"));
            dt.Columns.Add("Feedback", Type.GetType("System.String"));
            dt.Columns.Add("Compare", Type.GetType("System.String"));

            DataRow newRow;

            newRow             = dt.NewRow();
            newRow["Type"]     = "护照";
            newRow["Report"]   = result["hzreport"];
            newRow["Feedback"] = result["hzfeedback"];
            newRow["Compare"]  = result["hzcompare"];
            dt.Rows.Add(newRow);
            newRow             = dt.NewRow();
            newRow["Type"]     = "港澳台通行证";
            newRow["Report"]   = result["gtreport"];
            newRow["Feedback"] = result["gtfeedback"];
            newRow["Compare"]  = result["gtcompare"];
            dt.Rows.Add(newRow);
            dictionary.Add("Result", dt);

            MessageBox.Show(passport.SaveCompareResult(dictionary));
        }