Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- //START UP PROCCESS
- //
- private void JobViewer_Load(object sender, EventArgs e)
- {
- timer1.Start(); //CLOCK
- int BrowserVer, RegVal;
- // get the installed IE version
- using (WebBrowser Wb = new WebBrowser())
- BrowserVer = Wb.Version.Major;
- // set the appropriate IE version
- if (BrowserVer >= 11)
- RegVal = 11001;
- else if (BrowserVer == 10)
- RegVal = 10001;
- else if (BrowserVer == 9)
- RegVal = 9999;
- else if (BrowserVer == 8)
- RegVal = 8888;
- else
- RegVal = 7000;
- // set the actual key
- RegistryKey Key = Registry.CurrentUser.OpenSubKey(@"SOFTWAREMicrosoftInternet ExplorerMainFeatureControlFEATURE_BROWSER_EMULATION", true);
- Key.SetValue(System.Diagnostics.Process.GetCurrentProcess().ProcessName + ".exe", RegVal, RegistryValueKind.DWord);
- Key.Close();
- contextMenuStrip1.Renderer = new ToolStripProfessionalRenderer(new ColorTable());
- }
- //
- //OPEN PERSON'S FILE LOCATION
- //
- private void FLoc1_Click(object sender, EventArgs e)
- {
- DisplayJobs.Navigate(@"F:Internal JobsJobsChad");
- }
- private void FLoc2_Click(object sender, EventArgs e)
- {
- DisplayJobs.Navigate(@"F:Internal JobsJobsDan");
- }
- private void FLoc3_Click(object sender, EventArgs e)
- {
- DisplayJobs.Navigate(@"F:Internal JobsJobsErv");
- }
- private void FLoc4_Click(object sender, EventArgs e)
- {
- DisplayJobs.Navigate(@"F:Internal JobsJobsJacob");
- }
- private void FLoc5_Click(object sender, EventArgs e)
- {
- DisplayJobs.Navigate(@"F:Internal JobsJobsNate");
- }
- private void FLoc6_Click(object sender, EventArgs e)
- {
- DisplayJobs.Navigate(@"F:Internal JobsJobsMiller");
- }
- private void FLoc7_Click(object sender, EventArgs e)
- {
- DisplayJobs.Navigate(@"F:Internal JobsJobsTerry");
- }
- private void FLoc8_Click(object sender, EventArgs e)
- {
- DisplayJobs.Navigate(@"F:Internal JobsJobsKelley");
- }
- private void FLoc9_Click(object sender, EventArgs e)
- {
- DisplayJobs.Navigate(@"F:Internal JobsJobsJenny");
- }
- private void DisplayJobs_DocumentCompleted(object sender,
- WebBrowserDocumentCompletedEventArgs e)
- {
- JobPath.Text = DisplayJobs.Url.ToString();
- }
- private void JobPath_TextChanged(object sender, EventArgs e)
- {
- textBox1.Text = JobPath.Text.Remove(0, 8);
- FilesMade();
- try
- {
- lblContact.Text = File.ReadAllText((@textBox1.Text +
- @"PropertiesContact.txt"));
- lblJobName.Text = File.ReadAllText(@textBox1.Text +
- @"PropertiesJobName.txt");
- lblBidDate.Text = File.ReadAllText(@textBox1.Text +
- @"PropertiesBidDate.txt");
- lblEngineer.Text = File.ReadAllText(@textBox1.Text +
- @"PropertiesEngineer.txt");
- lblTakeOff.Text = File.ReadAllText(@textBox1.Text +
- @"PropertiesTakeOff.txt");
- lblReceived.Text = File.ReadAllText(@textBox1.Text +
- @"PropertiesReceived.txt");
- lblVendor.Text = File.ReadAllText(@textBox1.Text +
- @"PropertiesVendor.txt");
- //Specific Person Notes
- lblJDNotes.Text = File.ReadAllText(@textBox1.Text +
- @"PropertiesNotesJDNotes.txt");
- lblNotes.Text = File.ReadAllText(@textBox1.Text + @"PropertiesNotesGNotes.txt");
- ChadNotes.Text = File.ReadAllText(@textBox1.Text + @"PropertiesNotesCNotes.txt");
- DanNotes.Text = File.ReadAllText(@textBox1.Text + @"PropertiesNotesDNotes.txt");
- ErvNotes.Text = File.ReadAllText(@textBox1.Text + @"PropertiesNotesENotes.txt");
- NateNotes.Text = File.ReadAllText(@textBox1.Text + @"PropertiesNotesNNotes.txt");
- TerryMNotes.Text = File.ReadAllText(@textBox1.Text + @"PropertiesNotesTMNotes.txt");
- TerrySNotes.Text = File.ReadAllText(@textBox1.Text + @"PropertiesNotesTSNotes.txt");
- KelleyNotes.Text = File.ReadAllText(@textBox1.Text + @"PropertiesNotesKNotes.txt");
- JenNotes.Text = File.ReadAllText(@textBox1.Text + @"PropertiesNotesJenNotes.txt");
- lblPriorApp.Text = File.ReadAllText(@textBox1.Text + @"PropertiesPriorApp.txt");
- lblProject.Text = File.ReadAllText(@textBox1.Text + @"PropertiesProject.txt");
- lblLocation.Text = File.ReadAllText(@textBox1.Text + @"PropertiesLocation.txt");
- }
- catch
- { }
- //Converts The Bid Date To Long Date
- try
- {
- DateTime convertedtime = DateTime.Parse(lblBidDate.Text);
- JobName.Text = lblJobName.Text;
- JobLocation.Text = lblLocation.Text;
- JobBidDate.Text = convertedtime.ToLongDateString();
- }
- catch { }
- if (Directory.Exists(@textBox1.Text + @"Archive"))
- {
- JobName.Text = "";
- JobLocation.Text = "";
- JobBidDate.Text = "";
- }
- }
- private void JLCont_char(object sender, EventArgs e)
- {
- }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- // if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + "
- - " + lblJobName.Text))
- // btnEdit.Enabled = false;
- if (Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - "
- + lblJobName.Text))
- NewJob.Enabled = true;
- if (Directory.Exists(@textBox1.Text + "\6-Emails"))
- NewJob.Enabled = true;
- if (Directory.Exists(@textBox1.Text + "\6-Emails"))
- btnEdit.Enabled = true;
- }
- //
- //CREATE A NEW JOB
- //
- private wbNewJob wbNwJob = new wbNewJob();
- private void NewJob_Click(object sender, EventArgs e)
- {
- try
- {
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text +
- " - " + lblJobName.Text))
- Directory.CreateDirectory(@textBox1.Text + "\" +
- lblBidDate.Text + " - " + lblJobName.Text);
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\0-Submittals"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\0-Submittals");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\0-Submittals" + "\Properties"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\0-Submittals" + "\Properties");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\0-Submittals" + "\Properties\Notes"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\0-Submittals" + "\Properties\Notes");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\1-Pricing"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\1-Pricing");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\1-Pricing" + "\Properties"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\1-Pricing" + "\Properties");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\1-Pricing" + "\Properties\Notes"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\1-Pricing" + "\Properties\Notes");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\2-Take Off"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\2-Take Off");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\2-Take Off" + "\Properties"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\2-Take Off" + "\Properties");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\2-Take Off" + "\Properties\Notes"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\2-Take Off" + "\Properties\Notes");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\3-Files"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\3-Files");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\3-Files" + "\Properties"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\3-Files" + "\Properties");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\3-Files" + "\Properties\Notes"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\3-Files" + "\Properties\Notes");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\4-Plans"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\4-Plans");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\4-Plans" + "\Properties"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\4-Plans" + "\Properties");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\4-Plans" + "\Properties\Notes"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\4-Plans" + "\Properties\Notes");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\5-Specs"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\5-Specs");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\5-Specs" + "\Properties"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\5-Specs" + "\Properties");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\5-Specs" + "\Properties\Notes"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\5-Specs" + "\Properties\Notes");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\6-Emails"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\6-Emails");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\6-Emails" + "\Properties"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\6-Emails" + "\Properties");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\6-Emails" + "\Properties\Notes"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"\6-Emails" + "\Properties\Notes");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\Properties"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + "\Properties");
- if (!Directory.Exists(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"PropertiesNotes"))
- Directory.CreateDirectory(@textBox1.Text + "\" + lblBidDate.Text + " - " + lblJobName.Text + @"PropertiesNotes");
- }
- catch
- { }
- try
- {
- PriceAllInOnePricingCreate();
- ExcelTakeOffCreate();
- CapsPricingCreate();
- WriteToPropertiesNJ();
- WriteToEmailsNJ();
- WriteToFilesNJ();
- WriteToPlansNJ();
- WriteToPricingNJ();
- WriteToTakeOffNJ();
- WriteToSubmittals();
- WriteToSpecsNJ();
- }
- catch { }
- try
- {
- wbNwJob.Show();
- wbNwJob.lblContact.Text = lblContact.Text;
- wbNwJob.lblJobName.Text = lblJobName.Text;
- wbNwJob.lblLocation.Text = lblLocation.Text;
- wbNwJob.lblBidDate.Text = lblBidDate.Text;
- wbNwJob.lblEngineer.Text = lblEngineer.Text;
- wbNwJob.lblPriorApp.Text = lblPriorApp.Text;
- wbNwJob.lblTakeOff.Text = lblTakeOff.Text;
- wbNwJob.lblProject.Text = lblProject.Text;
- }
- catch { }
- }
- //
- //EDIT AN EXISTING JOB
- //
- private void btnEdit_Click_1(object sender, EventArgs e)
- {
- try
- {
- WriteToPropertiesED();
- WriteToEmailsED();
- WriteToFilesED();
- WriteToPlansED();
- WriteToPricingED();
- WriteToTakeOffED();
- WriteToSubmittalsED();
- WriteToSpecsED();
- }
- finally { MessageBox.Show("The Job Has Been Saved"); }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement