private void btnMsgGroupMemExlinput_Click(object sender, EventArgs e)
        {
            try
            {
                clsEmailParser objparser = new clsEmailParser();
                using (OpenFileDialog ofd = new OpenFileDialog())
                {
                    excelData.Clear();
                    ofd.InitialDirectory = System.Windows.Forms.Application.StartupPath;
                    ofd.Filter = "Text Files (*.xlsx)|*.xlsx";

                    if (ofd.ShowDialog() == DialogResult.OK)
                    {
                        txtMsgGroupMemInput.Text = ofd.FileName;
                        excelData = objparser.parseExcel(txtMsgGroupMemInput.Text);
                    }
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
示例#2
0
 private void btnBrowseWithExcelInputCmpMsg_Click_1(object sender, EventArgs e)
 {
     try
     {
         clsEmailParser objparser = new clsEmailParser();
         using (OpenFileDialog ofd = new OpenFileDialog())
         {
             GroupStatus.Cmpmsg_excelData.Clear();
             ofd.InitialDirectory = System.Windows.Forms.Application.StartupPath;
             ofd.Filter = "Text Files (*.xlsx)|*.xlsx";
             AddLoggerComposeMessage("[ " + DateTime.Now + " ] => [ Add Excel Input file please wait... ]");
             if (ofd.ShowDialog() == DialogResult.OK)
             {
                 txtExcelinputpathCmpMsg.Text = ofd.FileName;
                 GroupStatus.Cmpmsg_excelData = objparser.parseExcel(txtExcelinputpathCmpMsg.Text);
                 AddLoggerComposeMessage("[ " + DateTime.Now + " ] => [ Add Excel Input file completed... ]");
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
示例#3
0
        private void btnUploadUserids_Click(object sender, EventArgs e)
        {
            #region old ommented code
            //try
            //{
            //    using (OpenFileDialog ofd = new OpenFileDialog())
            //    {
            //        ofd.Filter = "Text Files (*.txt)|*.txt";
            //        if (ofd.ShowDialog() == DialogResult.OK)
            //        {
            //            txtEndorseUpload.Text = ofd.FileName;
            //            List<string> templist = GlobusFileHelper.ReadFile(ofd.FileName);
            //            lstEndorseUserIds.Clear();
            //            foreach (string item in templist)
            //            {

            //               bool res = NumberHelper.ValidateNumber(item);

            //                string newItem = item.Replace(" ", "").Replace("\t", "");
            //                if (res)
            //                {
            //                    if (!lstEndorseUserIds.Contains(item) && !string.IsNullOrEmpty(newItem))
            //                    {
            //                        lstEndorseUserIds.Add(item);
            //                    }
            //                }
            //                else
            //                {
            //                    AddLoggerEndorsePeople("[ " + DateTime.Now + " ] => [ Please enter a valid User ID ]");
            //                }
            //            }
            //            AddLoggerEndorsePeople("[ " + DateTime.Now + " ] => [ " + lstEndorseUserIds.Count + " UserIds Uploaded ]");
            //        }
            //    }
            //}
            //catch (Exception ex)
            //{
            //    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error -->btnUploadUserids_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
            //    GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnUploadUserids_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.path_EndorsePeople);
            //}
            #endregion

            try
            {
                clsEmailParser objparser = new clsEmailParser();
                using (OpenFileDialog ofd = new OpenFileDialog())
                {
                    GroupStatus.Cmpmsg_excelData.Clear();
                    ofd.InitialDirectory = System.Windows.Forms.Application.StartupPath;
                    ofd.Filter = "Text Files (*.xlsx)|*.xlsx";
                    AddLoggerEndorsePeople("[ " + DateTime.Now + " ] => [ Add Excel Input file please wait... ]");

                    if (ofd.ShowDialog() == DialogResult.OK)
                    {
                        txtEndorseUpload.Text = ofd.FileName;
                        EndorsePeople.Endorse_excelData = objparser.parseExcel(txtEndorseUpload.Text);
                        AddLoggerEndorsePeople("[ " + DateTime.Now + " ] => [ Add Excel Input file completed... ]");
                    }
                }
            }
            catch (Exception ex)
            {
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error -->btnUploadUserids_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.Path_LinkedinErrorLogs);
                GlobusFileHelper.AppendStringToTextfileNewLine("DateTime :- " + DateTime.Now + " :: Error --> btnUploadUserids_Click() >>>> " + ex.Message + "StackTrace --> >>>" + ex.StackTrace, Globals.path_EndorsePeople);
            }
        }
        private void btnscrapperwithinput_Click(object sender, EventArgs e)
        {
            try
            {
                LinkedInManager.linkedInDictionaryExcelInput.Clear();
                clsEmailParser objparser = new clsEmailParser();
                using (OpenFileDialog ofd = new OpenFileDialog())
                {
                    excelData.Clear();
                    ofd.InitialDirectory = System.Windows.Forms.Application.StartupPath;
                    ofd.Filter = "Text Files (*.xlsx)|*.xlsx";
                    if (ofd.ShowDialog() == DialogResult.OK)
                    {
                        txtscrapperwithinput.Text = ofd.FileName;
                        excelData = objparser.parseExcel(txtscrapperwithinput.Text);//.ParseXLSXFile(textBox1.Text);
                        //  ParserClasses.Lstcorporatelink = excelData;
                    }

                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }