Exemple #1
0
        private void btnRestoreBackup_Click(object sender, EventArgs e)
        {
            clsBackupRestore obj = new clsBackupRestore();

            obj.Restore_HLR_MSC_ASSO_DEST_From_Backup("GUJ");
        }
Exemple #2
0
        public void OnTimerEventHLRMSC_Elapsed(object sender, ElapsedEventArgs e)
        {
            try
            {
                tmrhlrmsc.Enabled = false;
                ////string date1 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                ////int d1 = Int32.Parse(date1.Substring(11, 2));


                String Circle = String.Empty;
                String Vendor = String.Empty;
                String Group  = String.Empty;
                Circle = System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString().ToLower();
                Vendor = System.Configuration.ConfigurationManager.AppSettings["Vendor"].ToString().ToUpper();
                Group  = Circle + "_HLR_MSC";
                ////int startTime = Int32.Parse(System.Configuration.ConfigurationManager.AppSettings["ParsingStartTime"]);
                ////int rangeTime = startTime + 4;
                bool isProcessStart = false;
                //if (System.DateTime.Now.ToString("HH:mm") == System.Configuration.ConfigurationManager.AppSettings["ParsingStartTime"].ToString())
                //{
                if (isProcessStart == false)
                {
                    DataTable dt = ExecuteSQL("Select * from raw_generation_details Where circle Like '" + Circle + "%' and Status='NOT COMPLETED'");
                    if (dt != null)
                    {
                        if (dt.Rows.Count == 0)
                        {
                            dt = null;
                            //For checking in all groups for completion of parsing of MSS,MGW.
                            dt = ExecuteSQL("Select * from parsing_completion_details WHERE CIRCLE Like '" + Circle + "%' and CIRCLE not Like '%hlr_msc'  and Status='NOT COMPLETED'");
                            if (dt != null)
                            {
                                if (dt.Rows.Count == 0)
                                {
                                    dt = null;
                                    //For checking current group has not been started parsing.
                                    dt = ExecuteSQL("Select * from parsing_completion_details Where circle='" + Group + "' and Status='NOT COMPLETED' and START_TIME='0000-00-00 00:00:00' ");
                                    if (dt != null)
                                    {
                                        if (dt.Rows.Count > 0)
                                        {
                                            dt = null;
                                            //For checking raw generation of current group has not been completed.
                                            //dt = ExecuteSQL("Select * from raw_generation_details Where circle='" + Group + "' and Status='NOT COMPLETED'");
                                            //if (dt != null)
                                            //{
                                            //    if (dt.Rows.Count == 0)
                                            //    {
                                            //if (dt.Rows[0]["Status"].ToString() == "COMPLETED")
                                            //{
                                            isProcessStart = true;

                                            clsCSParsingProcess objParse2 = new clsCSParsingProcess();
                                            LogEvent("HLR_MSC instantiating start for " + System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString() + "...", EventLogEntryType.Information);
                                            objParse2.group_name = "HLR_MSC";
                                            objParse2.NeMap      = new string[4];
                                            objParse2.NeMap[0]   = "MSC MAP";
                                            objParse2.NeMap[1]   = "HLR MAP";
                                            objParse2.NeMap[2]   = "ASSOCIATION INFO";
                                            objParse2.NeMap[3]   = "DESTINATION INFO";

                                            objParse2.StartParsing();
                                            LogEvent("HLR_MSC process end for " + System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString() + "...", EventLogEntryType.Information);

                                            LogEvent("Restore_HLR_MSC_ASSO_DEST_From_Backup process start for " + System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString() + "...", EventLogEntryType.Information);
                                            clsBackupRestore objManageBackup = new clsBackupRestore();
                                            objManageBackup.Restore_HLR_MSC_ASSO_DEST_From_Backup(Circle); // For restore data from MSC, HLR, Assosication Info and Destination Info backup table table to their respective tables.
                                            // Stored procedure also check if there is no rows in table(MSC, HLR,Association info, Destination info) then Restore data from their backup tables.
                                            LogEvent("Restore_HLR_MSC_ASSO_DEST_From_Backup process end for " + System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString() + "...", EventLogEntryType.Information);

                                            //clsTransferToNSSFromCS.DCMDataMigration(Circle);
                                            ExecuteSQLQuery(ref conn, "UPDATE  tblprocessupdate SET `status` = 'NOT COMPLETED', `STARTTIME` = '0000-00-00 00:00:00', `ENDTIME`= '0000-00-00 00:00:00' where `circle`= '" + Circle + "'");

                                            objParse2 = null;
                                            //clsCSParsingProcess objParse2 = new clsCSParsingProcess();
                                            //objParse2.group_name = "HLR_MSC";
                                            //objParse2.NeMap = new string[2];
                                            //objParse2.NeMap[0] = "MSC MAP";
                                            //objParse2.NeMap[1] = "HLR MAP";
                                            //objParse2.StartParsing();

                                            ////clsCSParsingProcess objParse3 = new clsCSParsingProcess();
                                            ////objParse3.group_name = "HLR_MSC";
                                            ////objParse3.NeMap = new string[1];
                                            ////objParse3.NeMap[0] = "HLR MAP";
                                            ////objParse3.StartParsing();

                                            //clsCSParsingProcess objParse4 = new clsCSParsingProcess();
                                            //objParse4.group_name = "";
                                            //objParse4.NeMap = new string[1];
                                            //objParse4.NeMap[0] = "ASSOCIATION INFO";
                                            //objParse4.StartParsing();

                                            //clsCSParsingProcess objParse5 = new clsCSParsingProcess();
                                            //objParse5.group_name = "";
                                            //objParse5.NeMap = new string[1];
                                            //objParse5.NeMap[0] = "DESTINATION INFO";
                                            //objParse5.StartParsing();
                                            //LogEvent("tmrGroup4 process end...", EventLogEntryType.Information);
                                            //objParse2 = null;
                                            //objParse4 = null;
                                            //objParse5 = null;

                                            isProcessStart = false;
                                            //}
                                            //    }
                                            //}
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                //}
            }
            catch (Exception ex)
            {
                //throw ex;
                LogEvent("Error in tmrGroup4.Error: " + ex.Message.ToString(), EventLogEntryType.Warning);
            }
            finally
            {
                tmrhlrmsc.Enabled = true;
            }
        }
Exemple #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            clsCSGetRawProcess obj = new clsCSGetRawProcess();

            obj.nodeTypeMain    = new string[3];
            obj.nodeTypeMain[0] = "MSS";
            obj.nodeTypeMain[1] = "GCS";
            obj.nodeTypeMain[2] = "MGW";
            obj.groupName       = "group3";
            obj.StartRawGeneration();

            String Circle = String.Empty;
            String Vendor = String.Empty;

            Circle = System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString().ToUpper();
            Vendor = System.Configuration.ConfigurationManager.AppSettings["Vendor"].ToString().ToUpper();

            clsBackupRestore objManageBackup = new clsBackupRestore();

            objManageBackup.Manage_HLR_MSC_ASSO_DEST_Backup(Circle); // For Transfer data of MSC, HLR, Assosication Info and Destination Info table into their respective backup tables.

            // For Deleting files from drive.
            //try
            //{
            //    string rootFolderPath = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["folderPathForDelete"]);
            //    string days = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["DaysForDeleteRawFile"]);
            //    FolderAndFileOperations obj = new FolderAndFileOperations();
            //    obj.DeleteAllFilesAndFolders(rootFolderPath, days);
            //}
            //catch
            //{
            //}


            // For Starting Raw Generation
            objCSprocess.StartMain();

            //clsTransferToNSSFromCS.DCMDataMigration("UPW");
            //string Errordir = @"D:\PACO\" + System.DateTime.Now.ToString("yyyy-MM-dd");
            //if (System.DateTime.Now.ToString("HH:mm") == System.Configuration.ConfigurationManager.AppSettings["PSStartTime"].ToString())
            //{

            //    if (!Directory.Exists(Errordir))
            //    {
            //        Directory.CreateDirectory(Errordir);

            //    }
            //    if ((!System.IO.File.Exists(Errordir + "\\" + "AWE_NSS_PACO.txt")))
            //    {
            //        File.AppendAllText(Errordir + "\\" + "AWE_NSS_PACO.txt", "DCM PACO process has been started at " + System.DateTime.Now.ToString() + "\r\n");

            //        //Paco_timer.Enabled = false;
            //        //objPSprocess.StartMain();
            //        ////Paco movement
            //        //clsTransferToNSSFromPS.dcm_update();
            //        System.IO.File.Delete(Errordir + "\\" + "AWE_NSS_PACO.txt");
            //    }



            //}
            //if (System.DateTime.Now.ToString("HH:mm") == System.Configuration.ConfigurationManager.AppSettings["PSStartTime"].ToString())
            //{
            //    if (Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["IsPACO"].ToString().ToLower()) == true)
            //    {

            //        System.Threading.Thread.Sleep(60 * 1000 * 2);
            //    }
            //}


            clsCSGetRawProcess obj5 = new clsCSGetRawProcess();

            obj5.nodeTypeMain    = new string[2];
            obj5.nodeTypeMain[0] = "MSS";
            obj5.nodeTypeMain[1] = "MGW";

            obj5.groupName = "group2";

            obj5.StartRawGeneration();

            clsCSParsingProcess objParse1 = new clsCSParsingProcess();

            objParse1.group_name = "group1";
            objParse1.NeMap      = new string[1];
            objParse1.NeMap[0]   = "MSS MAP";
            objParse1.StartParsing();
            if (System.DateTime.Now.ToString("hh:mm") == System.Configuration.ConfigurationManager.AppSettings["ParsingStartTime"].ToString())
            {
            }
        }
Exemple #4
0
        //private void Paco_timer_Elapsed(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        Paco_timer.Enabled = false;
        //        if (System.DateTime.Now.ToString("HH:mm") == System.Configuration.ConfigurationManager.AppSettings["PSStartTime"].ToString())
        //        {
        //            if (Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["IsPACO"].ToString().ToLower()) == true)
        //            {

        //                LogEvent("Timer of PACO for circle " + System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString() + " disabled...", EventLogEntryType.Information);
        //                objPSprocess.StartMain();
        //                //Paco movement
        //                clsTransferToNSSFromPS.dcm_update();
        //                Paco_timer.Enabled = true;
        //                LogEvent("Timer of PACO for circle " + System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString() + " enabled...", EventLogEntryType.Information);
        //            }
        //        }

        //    }
        //    catch (Exception ex)
        //    {
        //        LogEvent("Timer for PACO [Error while starting the service: " + ex.Message + "]", EventLogEntryType.Error);
        //    }
        //    finally
        //    {
        //        Paco_timer.Enabled = true;
        //    }
        //}
        private void CS_timer_Elapsed(object sender, EventArgs e)
        {
            String Circle = String.Empty;
            String Vendor = String.Empty;

            Circle = System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString().ToUpper();
            Vendor = System.Configuration.ConfigurationManager.AppSettings["Vendor"].ToString().ToUpper();
            try
            {
                CS_timer.Enabled = false;
                if (System.DateTime.Now.ToString("HH:mm") == System.Configuration.ConfigurationManager.AppSettings["CSStartTime"].ToString())
                {
                    //DataTable dt = ExecuteSQL("Select ifnull(Status,'') as Status from tblProcessUpdate Where DCMProcess='CS' and Circle='" + Circle + "'  and Vendor='" + Vendor + "' ");
                    //if (dt.Rows.Count > 0)
                    //{
                    //    if ((dt.Rows[0]["Status"].ToString() == "") || (dt.Rows[0]["Status"].ToString().Contains("COMPLETED")))
                    //    {
                    //if (ExecuteNonQuery("Update tblProcessUpdate Set StartTime='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',EndTime='0000-00-00 00:00:00',Status='IN PROGRESS' Where DCMProcess='CS' and Circle='" + Circle + "'  and Vendor='" + Vendor + "'") == 1)
                    //{
                    //ExecuteNonQuery("Update tblProcessUpdate Set StartTime='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',EndTime='0000-00-00 00:00:00',Status='IN PROGRESS' Where DCMProcess='CS' and Circle='" + Circle + "'  and Vendor='" + Vendor + "'");

                    LogEvent("Timer of CS for circle " + System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString() + " started...", EventLogEntryType.Information);

                    clsBackupRestore objManageBackup = new clsBackupRestore();
                    objManageBackup.Manage_HLR_MSC_ASSO_DEST_Backup(Circle); // For Transfer data of MSC, HLR, Assosication Info and Destination Info table into their respective backup tables.

                    // For Deleting files from drive.
                    try
                    {
                        string rootFolderPath       = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["folderPathForDelete"]);
                        string days                 = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["DaysForDeleteRawFile"]);
                        FolderAndFileOperations obj = new FolderAndFileOperations();
                        obj.DeleteAllFilesAndFolders(rootFolderPath, days);
                    }
                    catch
                    {
                    }


                    // For Starting Raw Generation
                    objCSprocess.StartMain();


                    //ExecuteNonQuery("Update tblProcessUpdate Set EndTime='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',Status='COMPLETED' Where DCMProcess='CS' and Circle='" + Circle + "' and Vendor='" + Vendor + "'");
                    LogEvent("Timer of CS for circle " + System.Configuration.ConfigurationManager.AppSettings["CircleName"].ToString() + " end...", EventLogEntryType.Information);

                    //}
                    //    }

                    //}
                }
            }
            catch (Exception ex)
            {
                LogEvent("Timer for CS [Error while starting the service: " + ex.Message + "]", EventLogEntryType.Error);
                ExecuteSQLQuery(ref conn, "Update tblProcessUpdate Set EndTime='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "',Status='NOT COMPLETED',ErrorMsg='" + ex.Message.ToString() + "' Where DCMProcess='CS' and Circle='" + Circle + "'  and Vendor='" + Vendor + "'");
            }
            finally
            {
                CS_timer.Enabled = true;
            }
        }