Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            fgm_moduler = new FGMModule("FDM", "TT2", "TagGroupDetector");
            Detector_Grid.SettingsDetail.ShowDetailRow = true;
            detector.Columns.Add("Voting1");
            detector.Columns.Add("Voting2");
            DetectorVoting.Tables.AddRange(new DataTable[] { detector, Effect });

            if (!IsPostBack)
            {
                Setup_Zone();
                DetectorVoting.Clear();
            }
            zone = ddl_zone.SelectedValue;
            tagType_HiddenField.Value = zone;


            makeDetectorGridView();
            makeEffectGridView();

            Session["Dataset"] = DetectorVoting;

            Detector_Grid.DataSource = DetectorVoting;
            Detector_Grid.DataBind();
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            fgm_moduler = new FGMModule("FDM", SessionInfo.ProjectName, "TagGroupDetector");
            System_Effect.Tables.AddRange(new DataTable[] { dt_System, dt_Effect });
            //zone = Session["zone"].ToString();
            loc_cause = Session["loc_cause"].ToString();
            if (!IsPostBack)
            {
                Setup_Zone();
            }
            zone = ddl_zone.SelectedItem.Value.ToString();
            if (ddl_System.SelectedIndex < 1)
            {
                Setup_Sys();
            }

            if (ddl_System.SelectedItem != null)
            {
                sys_obid = ddl_System.SelectedItem.Value.ToString();
                makeCauseGrid(sys_obid);
                makeEffectDataset(sys_obid);
            }
            else
            {
                makeCauseGrid("");
                makeEffectDataset("");
            }

            Session["Dataset"] = System_Effect;
        }
Ejemplo n.º 3
0
        protected DataTable make_gv1_editForm()
        {
            fgm_moduler = new FGMModule("LDM", "TT2", "TagGroupDetector");
            //zone = Request.Form["ddl_zone"].ToString();
            //DetectorGroupTag = Request.Form["aa11"].ToString();

            DataTable      dt_effect    = new DataTable();
            DataTable      dt_interface = new DataTable();
            SqlDataAdapter data_adapter;
            string         load_qry = "SELECT OBID, SYS_INTERFACE, N1NAME as [TagNo], ID_ZONE as [Zone], ID_TYPE as [Type], EFFECT_NO as [Seq], DESC_NAME as [Description],  ";

            load_qry = load_qry + " N1NAME + ' | ' + DESC_NAME +' | ' + LOC +' | ' + ACTION_STATUS as [Token], ";
            load_qry = load_qry + " LOC as [Location], ACTION_STATUS as [ActionStatus] FROM TBLEFFECT_SETUP ";
            load_qry = load_qry + " WHERE N1PROJECTNAME = '" + SessionInfo.ProjectName + "' AND N1TERMINATIONDATE = '' ";
            load_qry = load_qry + " AND (ID_ZONE = '" + zone + "' OR ID_ZONE = 'COMMON') ";
            //load_qry = load_qry + " AND ID_ZONE = '" + ddl_zone.SelectedValue + "'" ;
            load_qry     = load_qry + "  ORDER BY N1NAME";
            data_adapter = new SqlDataAdapter(load_qry, fgm_moduler.func_Class.connString);
            data_adapter.Fill(dt_effect);


            string interface_qry = "SELECT DISTINCT SYS_INTERFACE FROM TBLEFFECT_SETUP ";

            //interface_qry = interface_qry + " WHERE N1PROJECTNAME = '" + SessionInfo.ProjectName + "' AND N1TERMINATIONDATE = '' ";
            //interface_qry = interface_qry + " AND ID_ZONE = '" + ddl_zone.SelectedValue + "'" ;
            interface_qry = interface_qry + " ORDER BY SYS_INTERFACE ";
            data_adapter  = new SqlDataAdapter(interface_qry, fgm_moduler.func_Class.connString);
            data_adapter.Fill(dt_interface);

            dt_effect.Columns.Add("check");
            return(dt_effect);
            //gv1.DataSource = dt_effect;
            //gv1.DataBind();
        }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     fgm_moduler = new FGMModule("FDM", SessionInfo.ProjectName, "TagGroupDetector");
     System_Effect.Tables.AddRange(new DataTable[] { dt_System, dt_Effect });
     //zone = Session["zone"].ToString();
     loc_cause = Session["loc_cause"].ToString();
     if (!IsPostBack)
     {
         Setup_Zone();
      
     }
     zone = ddl_zone.SelectedItem.Value.ToString();
     if (ddl_System.SelectedIndex < 1)
     {
         Setup_Sys();
     }  
   
     if (ddl_System.SelectedItem != null)
     {
         sys_obid = ddl_System.SelectedItem.Value.ToString();
         makeCauseGrid(sys_obid);
         makeEffectDataset(sys_obid);
     }
     else
     {
         makeCauseGrid("");
         makeEffectDataset("");
     }
     
     Session["Dataset"] = System_Effect;
    
 }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {          
            fgm_moduler = new FGMModule("FDM", "TT2", "TagGroupDetector");
            Detector_Grid.SettingsDetail.ShowDetailRow = true;
            detector.Columns.Add("Voting1");
            detector.Columns.Add("Voting2");
            DetectorVoting.Tables.AddRange(new DataTable[] { detector, Effect });

            if (!IsPostBack)
            {
                Setup_Zone();
                DetectorVoting.Clear();   
            }
            zone = ddl_zone.SelectedValue;
            tagType_HiddenField.Value = zone;


            makeDetectorGridView();
            makeEffectGridView();
           
            Session["Dataset"] = DetectorVoting;

            Detector_Grid.DataSource = DetectorVoting;
            Detector_Grid.DataBind();
        } 
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            fgm_moduler = new FGMModule("FDM", SessionInfo.ProjectName, "TagGroupDetector");
            System_Effect.Tables.AddRange(new DataTable[] { dt_System, dt_Effect });

            if (!IsPostBack)
            {
                Setup_Sys();
                CauseGrid.DataSource = null;
                CauseGrid.DataBind();
            }
            sys_name = ddl_System.SelectedValue;
            makeCauseGrid(sys_name);
            makeEffectDataset(sys_name);
            Session["Dataset"] = System_Effect;
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            fgm_moduler = new FGMModule("FDM", SessionInfo.ProjectName  , "TagGroupDetector");
            System_Effect.Tables.AddRange(new DataTable[] { dt_System, dt_Effect });

            if (!IsPostBack)
            {
                Setup_Sys();
                CauseGrid.DataSource = null;
                CauseGrid.DataBind();

            }          
            sys_name = ddl_System.SelectedValue;
            makeCauseGrid(sys_name);
            makeEffectDataset(sys_name);
            Session["Dataset"] = System_Effect;
        }
Ejemplo n.º 8
0
        protected DataTable Srch_DropDown(string db_name)
        {
            string load_qry;

            FGMModule fgm_moduler;
            fgm_moduler = new FGMModule("FDM", SessionInfo.ProjectName, "TagGroupDetector");
            SqlDataAdapter data_adapter;
            DataSet ds_datafield = new DataSet();

            load_qry = "SELECT LOOKUPDETNAME, LOOKUPDETDESC FROM LOOKUPDET ";
            load_qry = load_qry + " WHERE LOOKUPNAME = '" + db_name + "' AND DEPENDENTPROJECT = '" + SessionInfo.ProjectName + "' AND TERMINATIONDATE = '' ";
            load_qry = load_qry + " ORDER BY LOOKUPDETDESC ";

            data_adapter = new SqlDataAdapter(load_qry, fgm_moduler.func_Class.admin_connString);
            data_adapter.Fill(ds_datafield, "DropDownItem");


            return ds_datafield.Tables["DropDownItem"];
        }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
                fgm_moduler = new FGMModule("FDM", SessionInfo.ProjectName, "TagGroupDetector");
                tag_type = Request.QueryString["tagType"];
                tagType_HiddenField.Value = tag_type;
                hidden_prj_name.Value = SessionInfo.ProjectName;
                GridGroupDetector.JSProperties["cpConfirmationMessage"] = "";    
            GridGroupDetail.JSProperties["cpConfirmationMessage"] = "";
                GridDetector.JSProperties["cpConfirmationMessage"] = "";

                env_config = new XmlDocument();
                env_config.Load(fgm_moduler.func_Class.get_EnvFilePath());
                if (!IsPostBack)
                {
                    Setup_Zone();
                }
                zone = ddl_zone.SelectedValue;
                Session["zone"] = zone;

            
                if (tag_type == "GroupDetector")
                {
                    btn_Issue.Visible = true;
                    btn_Import.Visible = true;
                    btn_add.Visible = true;
                    btn_delete.Visible = true;
                    btn_save.Visible = true;
                    btn_Export.Visible = true;
                    btn_Export1.Visible = false;
                    makeViewGridGroupDetector();
                    //if (Page.IsCallback || !Page.IsPostBack)
                    //{
                    if (GridGroupDetector.FocusedRowIndex > -1)
                    {
                        int focusedRowIndex = GridGroupDetector.FocusedRowIndex;
                        if (GridGroupDetector.GetRowValues(GridGroupDetector.FocusedRowIndex, "OBID") == null)
                        {
                            focusedRowIndex = 0;
                        }
                        Detector_obid = (string)GridGroupDetector.GetRowValues(focusedRowIndex, "OBID");
                        tagName.Value = (string)GridGroupDetector.GetRowValues(focusedRowIndex, "TagNo");
                        makeViewGridGroupDetail(Detector_obid);
                        Session["S_DB_NAME"] = GridGroupDetail.GetRowValues(GridGroupDetail.FocusedRowIndex, "DB_NAME");
                        makeViewGridEffect(Detector_obid);
                        makeViewGridDetectorDetail(Detector_obid);

                        //gv1temp.Templates.EditForm = new EditFormTemplate();
                        //EditFormTemplate editform_template = new EditFormTemplate();
                        //editform_template.dynamic_effect = dynamic_table_effect;
                        //gv1temp.Templates.EditForm = editform_template;
                    }
                    //}
                }
                else if (tag_type == "Detector")
                {
                    taglist.Style["width"] = "50%";
                    taglist2.Style["width"] = "47%";

                    btn_Issue.Visible = false;
                    btn_Import.Visible = false;
                    btn_add.Visible = false;
                    btn_delete.Visible = false;
                    btn_save.Visible = false;
                    btn_Export.Visible = false;
                    btn_Export1.Visible = true;

                    makeViewGridDetectorList();
                    if (GridGroupDetector.FocusedRowIndex > -1)
                    {
                        Detector_obid = GridGroupDetector.GetRowValues(GridGroupDetector.FocusedRowIndex, "GROUP_OBID").ToString();

                        makeViewGridGroupDetail(Detector_obid);
                        makeViewGridEffect(Detector_obid);
                        //makeViewGridDetectorDetail(Detector_obid);
                        GridDetector.Visible = false;
                    }
                    GridGroupDetail.SettingsEditing.Mode = GridViewEditingMode.Inline;
                    gv1temp.Columns["Command"].Visible = false;

                    //gv1temp.Templates.EditForm = new EditFormTemplate();
               }

        }
Ejemplo n.º 10
0
        protected DataTable make_gv1_editForm()
        {
            fgm_moduler = new FGMModule("LDM", "TT2", "TagGroupDetector");
            //zone = Request.Form["ddl_zone"].ToString();
            //DetectorGroupTag = Request.Form["aa11"].ToString();

            DataTable dt_effect = new DataTable();
            DataTable dt_interface = new DataTable();
            SqlDataAdapter data_adapter;
            string load_qry = "SELECT OBID, SYS_INTERFACE, N1NAME as [TagNo], ID_ZONE as [Zone], ID_TYPE as [Type], EFFECT_NO as [Seq], DESC_NAME as [Description],  ";
            load_qry = load_qry + " N1NAME + ' | ' + DESC_NAME +' | ' + LOC +' | ' + ACTION_STATUS as [Token], ";
            load_qry = load_qry + " LOC as [Location], ACTION_STATUS as [ActionStatus] FROM TBLEFFECT_SETUP ";
            load_qry = load_qry + " WHERE N1PROJECTNAME = '" + SessionInfo.ProjectName + "' AND N1TERMINATIONDATE = '' ";
            load_qry = load_qry + " AND (ID_ZONE = '" + zone + "' OR ID_ZONE = 'COMMON') ";
            //load_qry = load_qry + " AND ID_ZONE = '" + ddl_zone.SelectedValue + "'" ;
            load_qry = load_qry + "  ORDER BY N1NAME";
            data_adapter = new SqlDataAdapter(load_qry, fgm_moduler.func_Class.connString);
            data_adapter.Fill(dt_effect);


            string interface_qry = "SELECT DISTINCT SYS_INTERFACE FROM TBLEFFECT_SETUP ";
            //interface_qry = interface_qry + " WHERE N1PROJECTNAME = '" + SessionInfo.ProjectName + "' AND N1TERMINATIONDATE = '' ";
            //interface_qry = interface_qry + " AND ID_ZONE = '" + ddl_zone.SelectedValue + "'" ;
            interface_qry = interface_qry + " ORDER BY SYS_INTERFACE ";
            data_adapter = new SqlDataAdapter(interface_qry, fgm_moduler.func_Class.connString);
            data_adapter.Fill(dt_interface);

            dt_effect.Columns.Add("check");
            return dt_effect;
            //gv1.DataSource = dt_effect;
            //gv1.DataBind();
        }