Click here to Skip to main content
15,118,865 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# hidden files Pin
Dave Kreskowiak20-Oct-12 4:50
mveDave Kreskowiak20-Oct-12 4:50 
GeneralRe: C# hidden files Pin
rachel_m20-Oct-12 14:33
Memberrachel_m20-Oct-12 14:33 
GeneralRe: C# hidden files Pin
Dave Kreskowiak20-Oct-12 21:43
mveDave Kreskowiak20-Oct-12 21:43 
AnswerRe: C# hidden files Pin
Pete O'Hanlon20-Oct-12 5:16
mvePete O'Hanlon20-Oct-12 5:16 
AnswerRe: C# hidden files Pin
jschell20-Oct-12 5:46
Memberjschell20-Oct-12 5:46 
GeneralRe: C# hidden files Pin
rachel_m20-Oct-12 14:38
Memberrachel_m20-Oct-12 14:38 
AnswerRe: C# hidden files Pin
Richard Andrew x6421-Oct-12 13:07
professionalRichard Andrew x6421-Oct-12 13:07 
GeneralRe: C# hidden files Pin
rachel_m21-Oct-12 14:28
Memberrachel_m21-Oct-12 14:28 
The following is an example of the code I am referring to:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.ComponentModel;

namespace eScripts
{
  class Run_e
  {
  private static String strConsoleAppLocation = "C:\\Program Files (x86)\\coname\\1.exe";
  private static String strWebServiceurl = "https://etest//WebService1";
  static void Main(string[] args)
  {
  Process eProcess = new Process();
  try
  {
  String Process_Arguments = null;
  eProcess.StartInfo.UseShellExecute = false;
  eProcess.StartInfo.FileName = strConsoleAppLocation;
  Process_Arguments = strWebServiceurl + " 164 " + cust1";
  eProcess.StartInfo.Arguments = Process_Arguments;
  eProcess.Start();
  eProcess.WaitForExit(1800);
  Process_Arguments = null;
  eDataContext rptData = new eDataContext();
  string[] PkgIDs = rData.Trackings.Where(c => c.Received_Date != null
  .Select(c => c.Package_ID).ToArray();
  foreach (string PkgID in PkgIDs)
  {
  String Process1_Arguments = null;
  Process Process1 = new Process();
  Process1.StartInfo.FileName = strConsoleAppLocation;
  Process1_Arguments = strWebServiceurl + " 10 " + PkgID;
  Process1.StartInfo.Arguments = Process1_Arguments;
  Process1.Start();
  Process1.WaitForExit(1800);
  Process1.Dispose();
  Process1_Arguments = null;
  }
  ateTime StartDateTime = rData.Trackings.Where(c => c.Error_Report_Date != null).Select(c => c.Error_Report_Date).Max().GetValueOrDefault();
  DateTime CurDateTime = DateTime.Now;
  string[] AddPkgIDs = (from rData.Trackings.where(c.tNumber.Substring(0, 3) == "dis"
  select TNumb).Distinct().ToArray();
  if (AddPkgIDs != null)
  {
  foreach (string AddPkgID in AddPkgIDs)
  {
  String Process4_Arguments = null;
  Process Process4 = new Process();
  Process4.StartInfo.FileName = strConsoleAppLocation;
  Process4_Arguments = strWebServiceurl + " 14295 " + AddPkgID;
  Process4.StartInfo.Arguments = Process4_Arguments;
  Process4.Start();
  Process4.WaitForExit(1800); //waits 2 minutes  
  Process4.Dispose();
  }
  }
    }
  
   catch (Exception e)
  {
  Console.WriteLine(e.Message);
  }
    }
  }


The line of code that says,
private static String strConsoleAppLocation = "C:\\Program Files (x86)\\coname\\1.exe";

was orginally setup to be
private static String strConsoleAppLocation = "C:\\allcustomers\\country\\state\\city\customername\\1.exe";


modified 21-Oct-12 20:02pm.

AnswerRe: C# hidden files Pin
Richard Andrew x6421-Oct-12 15:17
professionalRichard Andrew x6421-Oct-12 15:17 
GeneralRe: C# hidden files Pin
jschell22-Oct-12 9:04
Memberjschell22-Oct-12 9:04 
Questionwhats delegate? Pin
mhd.sbt19-Oct-12 9:29
Membermhd.sbt19-Oct-12 9:29 
AnswerRe: whats delegate? Pin
fjdiewornncalwe19-Oct-12 9:36
professionalfjdiewornncalwe19-Oct-12 9:36 
GeneralRe: whats delegate? Pin
mhd.sbt19-Oct-12 9:58
Membermhd.sbt19-Oct-12 9:58 
GeneralRe: whats delegate? Pin
fjdiewornncalwe19-Oct-12 10:05
professionalfjdiewornncalwe19-Oct-12 10:05 
AnswerRe: whats delegate? Pin
Mycroft Holmes19-Oct-12 14:37
professionalMycroft Holmes19-Oct-12 14:37 
QuestionTextbox to enter only alphabet on key press Pin
ks.vignesh19-Oct-12 1:10
Memberks.vignesh19-Oct-12 1:10 
AnswerRe: Textbox to enter only alphabet on key press Pin
Wes Aday19-Oct-12 1:44
professionalWes Aday19-Oct-12 1:44 
Answer1 vote Pin
BobJanova19-Oct-12 3:33
MemberBobJanova19-Oct-12 3:33 
AnswerMy Vote of 1 Pin
Keith Barrow19-Oct-12 5:32
professionalKeith Barrow19-Oct-12 5:32 
QuestionHow to turn off projectors in c# Pin
ravindervilasagar19-Oct-12 0:50
Memberravindervilasagar19-Oct-12 0:50 
AnswerRe: How to turn off projectors in c# Pin
Pete O'Hanlon19-Oct-12 1:26
mvePete O'Hanlon19-Oct-12 1:26 
QuestionHow To Determine the strings language Pin
mohammadkaab18-Oct-12 7:26
Membermohammadkaab18-Oct-12 7:26 
AnswerRe: How To Determine the strings language Pin
Eddy Vluggen18-Oct-12 7:30
professionalEddy Vluggen18-Oct-12 7:30 
AnswerRe: How To Determine the strings language Pin
jschell18-Oct-12 10:34
Memberjschell18-Oct-12 10:34 
AnswerRe: How To Determine the strings language Pin
Richard Deeming18-Oct-12 11:53
mveRichard Deeming18-Oct-12 11:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.