Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    Session["MasterID"] = "20180128002";

                    //获取信息融合概率及源id
                    BLL.fusion_importance_BLL bll1  = new BLL.fusion_importance_BLL();
                    List <fusion_importance>  data1 = bll1.GetSpecificFusionInfo(Session["MasterID"].ToString());
                    int processdata_ID = data1[0].ProcessData_Source_ID;
                    int alert_ID       = data1[0].Alert_Source_ID;

                    //获取源信息
                    BLL.machine_importance_BLL bll2  = new BLL.machine_importance_BLL();
                    List <machine_importance>  data2 = bll2.GetInfoByID(processdata_ID, alert_ID);

                    //组合信息
                    fusion_display = data2;
                    Model.machine_importance model1 = new machine_importance(data1[0].Id, data1[0].MasterID, "Fusion", data1[0].Generate_Time.ToString(),
                                                                             data1[0].AOI, data1[0].CLN, data1[0].COA, data1[0].DEV, data1[0].DHC, data1[0].DUV, data1[0].EXP, data1[0].OVN, data1[0].PHC, data1[0].SMA, data1[0].ALL);
                    fusion_display.Add(model1);

                    //显示到gridview
                    this.ASPxGridView1.DataSource = fusion_display;
                    this.ASPxGridView1.DataBind();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Page load failed due to" + ex.Message);
            }
        }
        protected void Button3_Click(object sender, EventArgs e)
        {
            try
            {
                //获取最新信息融合概率
                BLL.fusion_importance_BLL bll1  = new BLL.fusion_importance_BLL();
                List <fusion_importance>  data1 = bll1.GetLatestFusionInfo();

                //组合信息
                DAL.problem_handle_record_DAL dal1   = new DAL.problem_handle_record_DAL();
                Model.problem_handle_record   model1 = new problem_handle_record(-1, data1[0].MasterID, "RecordSubmitted", Convert.ToDateTime(Start_Date.Text),
                                                                                 Convert.ToDateTime("2018/1/1 00:00:00"), data1[0].AOI, data1[0].CLN, data1[0].COA, data1[0].DEV, data1[0].DHC, data1[0].DUV, data1[0].EXP, data1[0].OVN,
                                                                                 data1[0].PHC, data1[0].SMA, data1[0].ALL, "", "", -1);
                dal1.add(model1);

                //跳转
                Response.Redirect("ProblemHandle_AllRecord.aspx", false);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Page load failed due to" + ex.Message);
            }
        }