コード例 #1
0
        protected void GvMonitoringEffectiveness_RowDeleting(object sender, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
        {
            try
            {
                ASPxGridView grid = sender as ASPxGridView;
                int          id   = e.Keys[0].ToInt32(0);
                int          FaultAuditRecordsId = Session["FaultAuditRecordsId"].ToInt32(0);

                QmRepository.DeleteAttachMent(id);

                AttachFileModelList            = QmRepository.GetAttachmentViewEditIA(FaultAuditRecordsId, 4);
                Session["AttachmentME"]        = AttachFileModelList;
                GvContainmentAction.DataSource = AttachFileModelList;
                GvContainmentAction.DataBind();
            }
            catch (Exception ex)
            {
                //PanelMensajes.ShowOnPageLoad = true;
                //LblMensaje.Text = ex.Message;
            }
            finally
            {
                e.Cancel = true;
            }
        }
コード例 #2
0
        protected void popupReport_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            var temp = e.Parameter.ToString().Split(";");
            int id   = temp[1].ToInt32(0);

            if (id == 0)
            {
                return;
            }

            Session["FaultAuditRecordsId"] = id;
            frmLayoutCheckingCode.DataBind();
            gvIssue.DataBind();

            QmRcaModels rc = new QmRcaModels();

            rc = QmRepository.GetRca(id);

            TbMan1.Text = rc.Man1;
            TbMan2.Text = rc.Man2;
            TbMan3.Text = rc.Man3;
            TbMan4.Text = rc.Man4;
            TbMan5.Text = rc.Man5;

            TbMachine1.Text = rc.Machine1;
            TbMachine2.Text = rc.Machine2;
            TbMachine3.Text = rc.Machine3;
            TbMachine4.Text = rc.Machine4;
            TbMachine5.Text = rc.Machine5;

            TbMaterial1.Text = rc.Material1;
            TbMaterial2.Text = rc.Material2;
            TbMaterial3.Text = rc.Material3;
            TbMaterial4.Text = rc.Material4;
            TbMaterial5.Text = rc.Material5;

            TbMethod1.Text = rc.Method1;
            TbMethod2.Text = rc.Method2;
            TbMethod3.Text = rc.Method3;
            TbMethod4.Text = rc.Method4;
            TbMethod5.Text = rc.Method5;

            //containment
            AttachFileModelList            = QmRepository.GetAttachmentViewEditIA(id, 1);
            Session["Attachment"]          = AttachFileModelList;
            GvContainmentAction.DataSource = AttachFileModelList;
            GvContainmentAction.DataBind();
            // AttachFileModelList = GetFileAttachment;


            //GvRootCauseAnalysis
            AttachFileModelListRC          = QmRepository.GetAttachmentViewEditIA(id, 2);
            Session["AttachmentRC"]        = AttachFileModelListRC;
            GvRootCauseAnalysis.DataSource = AttachFileModelListRC;
            GvRootCauseAnalysis.DataBind();

            //GvCorrectiveAction
            var AttachFileModelListCA = QmRepository.GetAttachmentViewEditIA(id, 3);

            Session["AttachmentCA"]       = AttachFileModelListCA;
            GvCorrectiveAction.DataSource = AttachFileModelListCA;
            GvCorrectiveAction.DataBind();


            //GvMonitoringEffectiveness
            AttachFileModelListME   = QmRepository.GetAttachmentViewEditIA(id, 4);
            Session["AttachmentME"] = AttachFileModelListME;
            GvMonitoringEffectiveness.DataSource = AttachFileModelListME;
            GvMonitoringEffectiveness.DataBind();
        }