예제 #1
0
 private void comboBoxEdit1_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         FillTreeNode(Convert.ToString(CmbLevel.Text).Trim());
         PublicClass.LevelName = Convert.ToString(CmbLevel.Text).Trim();
     }
     catch (Exception ex)
     {
         Errorlogfile.LogFile(ex, ex.ToString(), ex.LineNumber(), this.FindForm().Name);
     }
 }
예제 #2
0
 public void FillPointwise()
 {
     try
     {
         dtPoint = DbClass.getdata(CommandType.Text, "select distinct pt.point_ID,pt.PointName,pt.PointDesc from point pt inner join type_point tp on pt.PointType_ID=tp.id where pt.PointType_ID !='0'");
         foreach (DataRow dr in dtPoint.Rows)
         {
             trlFactoriesPrsnt11.AppendNode(new object[] { Convert.ToString(dr["point_id"]), Convert.ToString(dr["PointName"]), Convert.ToString(dr["PointDesc"]) }, null);
         }
     }
     catch (Exception ex)
     {
         Errorlogfile.LogFile(ex, ex.ToString(), ex.LineNumber(), this.FindForm().Name);
     }
 }
예제 #3
0
 public void FillMachinewise()
 {
     try
     {
         dtMachine = DbClass.getdata(CommandType.Text, "select Machine_ID,name,Description from machine_info");
         foreach (DataRow dr in dtMachine.Rows)
         {
             trlFactoriesPrsnt11.AppendNode(new object[] { Convert.ToString(dr["Machine_ID"]), Convert.ToString(dr["Name"]), Convert.ToString(dr["Description"]) }, null);
         }
     }
     catch (Exception ex)
     {
         Errorlogfile.LogFile(ex, ex.ToString(), ex.LineNumber(), this.FindForm().Name);
     }
 }
예제 #4
0
        public void FillTreeNodeValue(string Level_Name)
        {
            try
            {
                switch (Level_Name)
                {
                case " --Select--":
                {
                    break;
                }

                case "Plant":
                {
                    Insert_Plant(IDVAlue);
                    break;
                }

                case "Area":
                {
                    Insert_Area(IDVAlue);
                    break;
                }

                case "Train":
                {
                    Insert_Train(IDVAlue);
                    break;
                }

                case "Machine":
                {
                    Insert_Machine(IDVAlue);
                    break;
                }

                case "Point":
                {
                    Insert_Point(IDVAlue);
                    break;
                }
                }
            }
            catch (Exception ex)
            {
                Errorlogfile.LogFile(ex, ex.ToString(), ex.LineNumber(), this.FindForm().Name);
            }
        }
예제 #5
0
        public void FillTreeNode(string Level_Name)
        {
            try
            {
                trlFactoriesPrsnt11.Nodes.Clear();
                TxtRouteName.Text = String.Empty;
                TxtRouteID.Text   = string.Empty;
                switch (Level_Name)
                {
                case "--Select--":
                {
                    trlFactoriesPrsnt11.Nodes.Clear();
                    trlRoute11.Nodes.Clear();
                    break;
                }

                case "Plant":
                {
                    trlFactoriesPrsnt11.Nodes.Clear();
                    trlRoute11.Nodes.Clear();
                    FillPlantwise();
                    Fill_TrlRoute_PlantWise();

                    _objMain.lblStatus.Caption = "Status: Selecting Plant";
                    break;
                }

                case "Area":
                {
                    trlFactoriesPrsnt11.Nodes.Clear();
                    trlRoute11.Nodes.Clear();
                    FillAreawise();
                    Fill_TrlRoute_AreaWise();
                    _objMain.lblStatus.Caption = "Status: Selecting Area";
                    break;
                }

                case "Train":
                {
                    trlFactoriesPrsnt11.Nodes.Clear();
                    trlRoute11.Nodes.Clear();
                    FillTrainwise();
                    Fill_TrlRoute_TrainWise();
                    _objMain.lblStatus.Caption = "Status: Selecting Train";
                    break;
                }

                case "Machine":
                {
                    trlFactoriesPrsnt11.Nodes.Clear();
                    trlRoute11.Nodes.Clear();
                    FillMachinewise();
                    Fill_TrlRoute_MachineWise();
                    _objMain.lblStatus.Caption = "Status: Selecting Machine";
                    break;
                }

                case "Point":
                {
                    trlFactoriesPrsnt11.Nodes.Clear();
                    trlRoute11.Nodes.Clear();
                    FillPointwise();
                    Fill_TrlRoute_PointWise();
                    _objMain.lblStatus.Caption = "Status: Selecting Point";
                    break;
                }
                }
            }
            catch (Exception ex)
            {
                Errorlogfile.LogFile(ex, ex.ToString(), ex.LineNumber(), this.FindForm().Name);
            }

            //route_data
        }