This commit is contained in:
2018-06-29 19:47:36 +00:00
commit be7f501333
3769 changed files with 1425961 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversalImports", "UniversalImports\UniversalImports.csproj", "{1DBD900B-4957-44A0-940B-35D865A57CE2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1DBD900B-4957-44A0-940B-35D865A57CE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1DBD900B-4957-44A0-940B-35D865A57CE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1DBD900B-4957-44A0-940B-35D865A57CE2}.Debug|x86.ActiveCfg = Release|Any CPU
{1DBD900B-4957-44A0-940B-35D865A57CE2}.Debug|x86.Build.0 = Release|Any CPU
{1DBD900B-4957-44A0-940B-35D865A57CE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1DBD900B-4957-44A0-940B-35D865A57CE2}.Release|Any CPU.Build.0 = Release|Any CPU
{1DBD900B-4957-44A0-940B-35D865A57CE2}.Release|x86.ActiveCfg = Release|x86
{1DBD900B-4957-44A0-940B-35D865A57CE2}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

View File

@@ -0,0 +1,137 @@
namespace UniversalImports
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.viewFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.pb = new System.Windows.Forms.ToolStripProgressBar();
this.pbr = new System.Windows.Forms.ToolStripProgressBar();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.menuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 24);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.Size = new System.Drawing.Size(611, 415);
this.dataGridView1.TabIndex = 0;
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.importToolStripMenuItem,
this.viewFileToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(611, 24);
this.menuStrip1.TabIndex = 1;
this.menuStrip1.Text = "menuStrip1";
//
// importToolStripMenuItem
//
this.importToolStripMenuItem.Name = "importToolStripMenuItem";
this.importToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
this.importToolStripMenuItem.Text = "&Import";
this.importToolStripMenuItem.Click += new System.EventHandler(this.importToolStripMenuItem_Click);
//
// viewFileToolStripMenuItem
//
this.viewFileToolStripMenuItem.Name = "viewFileToolStripMenuItem";
this.viewFileToolStripMenuItem.Size = new System.Drawing.Size(63, 20);
this.viewFileToolStripMenuItem.Text = "View file";
this.viewFileToolStripMenuItem.Click += new System.EventHandler(this.viewFileToolStripMenuItem_Click);
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.pb,
this.pbr});
this.statusStrip1.Location = new System.Drawing.Point(0, 417);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(611, 22);
this.statusStrip1.TabIndex = 2;
this.statusStrip1.Text = "statusStrip1";
//
// pb
//
this.pb.ForeColor = System.Drawing.Color.Blue;
this.pb.Name = "pb";
this.pb.Size = new System.Drawing.Size(100, 16);
//
// pbr
//
this.pbr.ForeColor = System.Drawing.Color.SpringGreen;
this.pbr.Name = "pbr";
this.pbr.Size = new System.Drawing.Size(100, 16);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(611, 439);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "Form1";
this.Text = "Form1";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem viewFileToolStripMenuItem;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripProgressBar pb;
private System.Windows.Forms.ToolStripProgressBar pbr;
}
}

View File

@@ -0,0 +1,887 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
//******* SAMPLE ********************
//The AyaNova business object library:
using GZTW.AyaNova.BLL;
//The security library required for
//processing the login
using CSLA.Security;
//Used for login confirmation
using System.Threading;
//*************************************
namespace UniversalImports
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
//Initialize AyaNova biz object library
try
{
GZTW.AyaNova.BLL.AyaBizUtils.Initialize();
}
catch (Exception ex)
{
//"crack" the exception to get to the innermost exception
while (ex.InnerException != null)
ex = ex.InnerException;
MessageBox.Show(ex.Message);
return;
}
AyaBizUtils.Login("manager", "letmein");
//confirm the user is logged in:
if (Thread.CurrentPrincipal.Identity.IsAuthenticated == false)
{
//Nope, they are not authenticated so
//show an error and bail out
MessageBox.Show("Login failed");
return;
}
}//eoFormLoad
private void viewFileToolStripMenuItem_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
ReadCSV(dataGridView1, ref dt, @"C:\temp\morrow\wo1.csv");
}
System.Text.StringBuilder sbErrors = new StringBuilder();
private void importToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Media.SystemSounds.Beep.Play();
//erase database
DBManager.EraseDatabase("I_UNDERSTAND_ALL_DATA_WILL_BE_ERASED_AND_I_ACCEPT_RESPONSIBILITY");
this.pb.Maximum = 9;
this.pb.Value = 1;
UserPickList up = UserPickList.GetList(false);
System.Diagnostics.Debug.WriteLine("Can retrieve client list, db ready for import proceeding to first item now...");
//Headoffice
ImportHeadOffice();
this.pb.Value = 2;
//client
ImportClient();
this.pb.Value = 3;
//vendor
ImportVendor();
this.pb.Value = 4;
//unit
ImportUnit();
this.pb.Value = 5;
//pmtemplate
ImportPMTemplate();
this.pb.Value = 6;
//wo1
ImportWorkorder("WORKORDERS-OPEN-2011-0406.csv");
this.pb.Value = 7;
//wo2
ImportWorkorder("WORKORDERS-CLOSED-2011-0405.csv");
this.pb.Value = 8;
//PM
ImportPMWorkorders();
this.pb.Value = 9;
System.Media.SystemSounds.Beep.Play();
if (sbErrors.Length > 0)
{
MessageBox.Show("DONE with errors written to errors.txt in csv folder");
System.IO.File.WriteAllText(@"C:\temp\morrow\errors.txt", sbErrors.ToString());
}
else
MessageBox.Show("Done, no errors");
}
#region Headoffice
Dictionary<string, Guid> HeadOffices = new Dictionary<string, Guid>();
private bool ImportHeadOffice()
{
DataTable dt = new DataTable();
ReadCSV(dataGridView1, ref dt, @"C:\temp\morrow\HEADOFFICE-ROLLUP.csv");
Dictionary<string, string> d = new Dictionary<string, string>();
bool first = true;
pbr.ForeColor = Color.Black;
this.pbr.Maximum = dt.Rows.Count;
this.pbr.Value = 0;
foreach (DataRow dr in dt.Rows)
{
if (first)
{
first = false;
continue;
}
string name = v(dr, 0, 255);
string contact = v(dr, 1, 500);
if (!d.ContainsKey(name))
{
d.Add(name, contact);
}
else
{
//do we have more info than the existing one?
if (d[name].Length < contact.Length)
d[name] = contact;
}
pbr.Value++;
}
pbr.Maximum = d.Count;
pbr.Value = 0;
pbr.ForeColor = Color.Green;
foreach (KeyValuePair<string, string> k in d)
{
HeadOffice h = HeadOffice.NewItem();
h.Name = k.Key;
h.Contact = k.Value;
HeadOffices.Add(k.Key, h.ID);
System.Diagnostics.Debug.WriteLine("About to save headoffice: " + h.Name + " Which is import number:" + pbr.Value.ToString());
h.Save();
pbr.Value++;
}
pbr.Value = 0;
//MessageBox.Show("Done head office");
return true;
}
#endregion
#region Client
Dictionary<string, Guid> ClientList = new Dictionary<string, Guid>();
private bool ImportClient()
{
//0="Client Name"
//1="Account Number"
//2="Bill Head Office"
//3="Head Office"
//4="Contract (Name/Type)"
//5="Contract Expires"
//6="Customer Postal Address"
//7="Client Contact"
//8="CLIENT General Notes"
DataTable dt = new DataTable();
ReadCSV(dataGridView1, ref dt, @"C:\temp\morrow\CLIENT-UpdateContract-2011-0406.csv");
Dictionary<string, Guid> Contracts = new Dictionary<string, Guid>();
bool first = true;
pbr.Value = 0;
pbr.Maximum = dt.Rows.Count;
pbr.ForeColor = Color.Red;
foreach (DataRow dr in dt.Rows)
{
pbr.Value++;
if (first)
{
first = false;
continue;
}
string name = v(dr, 0, 255);
string AccountNumber = v(dr, 1, 255);
bool BillHeadOffice = v(dr, 2, 10).Equals("YES", StringComparison.InvariantCultureIgnoreCase);
string HeadOfficeName = v(dr, 3, 255);
string contractName = v(dr, 4, 255);
if (contractName.Contains("None"))
contractName = string.Empty;
Guid ContractID = Guid.Empty;
string sContractExpires = v(dr, 5, 255);
//parse
DateTime dtContractExpires = new DateTime(2010, 12, 31);
DateTime.TryParse(sContractExpires, out dtContractExpires);
string sAddress = v(dr, 6, 255);
string sContact = v(dr, 7, 500);
string sNotes = v(dr, 8, 32767);
//Unique clients only
if (!ClientList.ContainsKey(name))
{
//add contract?
#region contract
if (contractName != string.Empty)
{
if (!Contracts.ContainsKey(contractName))
{
//add it
Contract ct = Contract.NewItem();
ct.Active = true;
ct.ContractRatesOnly = false;
ct.Name = contractName;
ct.RegionID = GZTW.AyaNova.BLL.Region.DefaultRegionID;
ContractID = ct.ID;
ct.Save();
Contracts.Add(contractName, ContractID);
}
else
ContractID = Contracts[contractName];
}
#endregion contract
//Import client
Client c = Client.NewItem();
c.Name = name;
c.AccountNumber = AccountNumber;
c.HeadOfficeID = HeadOffices[HeadOfficeName];
c.BillHeadOffice = BillHeadOffice;
if (ContractID != Guid.Empty)
{
c.ContractID = ContractID;
c.ContractExpires = dtContractExpires;
}
c.Active = true;
c.MailToAddress.DeliveryAddress = sAddress;
c.Contact = sContact;
c.Notes = sNotes;
ClientList.Add(name, c.ID);
c.Save();
}
}
pbr.Value = 0;
// MessageBox.Show("Done Client");
return true;
}
#endregion
#region Vendor
Dictionary<string, Guid> ImportedManufacturers = new Dictionary<string, Guid>();
private bool ImportVendor()
{
DataTable dt = new DataTable();
ReadCSV(dataGridView1, ref dt, @"C:\temp\morrow\VENDOR-ROLLUP-UNIQUE-2.csv");
List<string> lVendors = new List<string>();
bool first = true;
pbr.Value = 0;
pbr.Maximum = dt.Rows.Count;
pbr.ForeColor = Color.Orange;
foreach (DataRow dr in dt.Rows)
{
pbr.Value++;
if (first)
{
first = false;
continue;
}
string name = v(dr, 0, 255);
//Unique Vendors only
if (!lVendors.Contains(name))
{
lVendors.Add(name);
//Import Vendor
Vendor c = Vendor.NewItem();
c.Name = name;
c.VendorType = VendorTypes.Manufacturer;
c.Save();
ImportedManufacturers.Add(name, c.ID);
}
}
pbr.Value = 0;
// MessageBox.Show("Done Vendor");
return true;
}
#endregion
#region Unit
Dictionary<string, Guid> UnitList = new Dictionary<string, Guid>();
Dictionary<Guid, Guid> UnitClientList = new Dictionary<Guid, Guid>();
private bool ImportUnit()
{
//New
//0="Unit Serial #"
//1="Client"
//2="Description"
//3="Type"
//4="Manufacturer/Vendor"
//5="Model"
//6="Unit Has Own Address"
//7="Unit Address"
//8="Unit Notes"
//9="Unit Text1 (Contract: Option)"
//10="Unit Text2 (Expiration)"
//11="Unit Text3 (Principle Inv)"
//12="Unit Text4 (Value)"
DataTable dt = new DataTable();
ReadCSV(dataGridView1, ref dt, @"C:\temp\morrow\UNIT-ROLLUP-2011-0405.csv");
Dictionary<string, Guid> UnitModelList = new Dictionary<string, Guid>();
Dictionary<string, Guid> UnitModelCategoryList = new Dictionary<string, Guid>();
UnitModelCategories umcList = UnitModelCategories.GetItems();
bool first = true;
pbr.Value = 0;
pbr.Maximum = dt.Rows.Count;
pbr.ForeColor = Color.Goldenrod;
int nUnique = 0;
foreach (DataRow dr in dt.Rows)
{
pbr.Value++;
if (first)
{
first = false;
continue;
}
string serial = v(dr, 0, 255);
//source docs have empty serials as well as duplicate serials
if (string.IsNullOrWhiteSpace(serial))
{
serial = "BLANK IN CSV(" + nUnique++.ToString() + ")";
}
if (UnitList.ContainsKey(serial))
{
serial = serial + " DUPLICATE IN CSV(" + nUnique++.ToString() + ")";
if (serial.Length > 255) throw new System.ApplicationException("TOO LONG");
}
string client = v(dr, 1, 255);
if (string.IsNullOrWhiteSpace(client))
{
client = "CLIENT BLANK IN UNITS CSV(" + nUnique++.ToString() + ")";
}
if (!ClientList.ContainsKey(client))
{
client = client + " (from unitcsv)";
if (!ClientList.ContainsKey(client))
{
Client c = Client.NewItem();
c.Name = client;
c.Notes = "This client created during Unit import because it didn't exist in Client csv file";
ClientList.Add(client, c.ID);
c.Save();
}
}
Guid ClientID = ClientList[client];
string description = v(dr, 2, 255);
string unitmodelcategory = v(dr, 3, 255);
Guid UnitModelCategoryID = Guid.Empty;
string ManufacturerName = v(dr, 4, 255);
Guid VendorID = Guid.Empty;
if (string.IsNullOrWhiteSpace(ManufacturerName))
{
ManufacturerName = "VENDOR BLANK IN UNITS CSV(" + nUnique++.ToString() + ")";
}
if (!ImportedManufacturers.ContainsKey(ManufacturerName))
{
ManufacturerName = ManufacturerName + " (from unitcsv)";
if (!ImportedManufacturers.ContainsKey(ManufacturerName))
{
Vendor c = Vendor.NewItem();
c.Name = ManufacturerName;
c.Notes = "This vendor created during Unit import because it didn't exist in Vendor csv file";
ImportedManufacturers.Add(ManufacturerName, c.ID);
c.Save();
}
}
VendorID = ImportedManufacturers[ManufacturerName];
string modelnumber = v(dr, 5, 255);
Guid UnitModelID = Guid.Empty;
string unitaddress = v(dr, 7, 255);
string unitnotes = v(dr, 8, 32767);
string text1 = v(dr, 9, 255);
string text2 = v(dr, 10, 255);
string text3 = v(dr, 11, 255);
string text4 = v(dr, 12, 255);
//Unit model category
if (!string.IsNullOrWhiteSpace(unitmodelcategory))
{
if (!UnitModelCategoryList.ContainsKey(unitmodelcategory))
{
UnitModelCategory umc = umcList.Add();
umc.Active = true;
umc.Name = unitmodelcategory;
UnitModelCategoryList.Add(unitmodelcategory, umc.ID);
umcList.Save();
}
UnitModelCategoryID = UnitModelCategoryList[unitmodelcategory];
}
//Unit model
if (!string.IsNullOrWhiteSpace(modelnumber))
{
if (!UnitModelList.ContainsKey(modelnumber))
{
UnitModel um = UnitModel.NewItem();
um.Active = true;
um.ModelNumber = modelnumber;
um.VendorID = VendorID;
um.UnitModelCategoryID = UnitModelCategoryID;
UnitModelList.Add(modelnumber, um.ID);
um.Save();
}
UnitModelID = UnitModelList[modelnumber];
}
//Unique Units only
if (!UnitList.ContainsKey(serial))
{
//Import Unit
Unit u = Unit.NewItem();
u.Active = true;
u.Serial = serial;
u.ClientID = ClientID;
u.Description = description;
u.UnitModelID = UnitModelID;
u.GoToAddress.DeliveryAddress = unitaddress;
u.UnitHasOwnAddress = true;
u.Notes = unitnotes;
u.Text1 = text1;
u.Text2 = text2;
u.Text3 = text3;
u.Text4 = text4;
UnitList.Add(serial, u.ID);
UnitClientList.Add(u.ID, ClientID);
u.Save();
}
}
pbr.Value = 0;
return true;
}
#endregion
#region PMTemplate
private bool ImportPMTemplate()
{
//0-TemplateDescription
//1-Service notes
DataTable dt = new DataTable();
ReadCSV(dataGridView1, ref dt, @"C:\temp\morrow\PM-TEMPLATE-2.csv");
bool first = true;
pbr.Value = 0;
pbr.Maximum = dt.Rows.Count;
pbr.ForeColor = Color.Green;
foreach (DataRow dr in dt.Rows)
{
pbr.Value++;
if (first)
{
first = false;
continue;
}
string description = v(dr, 0, 255);
string notes = v(dr, 1, 32767);
Workorder w = Workorder.NewItem(WorkorderTypes.TemplatePreventiveMaintenance);
w.TemplateDescription = description;
w.WorkorderItems[0].TechNotes = notes;
w.Save();
}
pbr.Value = 0;
// MessageBox.Show("Done Workorder");
return true;
}
#endregion
#region Workorder
private bool ImportWorkorder(string csv)
{
//0-serial#
//1-Date m/d/y
//2-ServiceNotes
//3-workorder summary
//4-Travel time
//5-Labor time
//6-Part
//7-User
//8-ClientContact
//NEW FIELDS
//9-Closed "YES" or "NO"
//10-Category - ad hoc text, need to track and generate new ones as required and set wo to them
DataTable dt = new DataTable();
ReadCSV(dataGridView1, ref dt, @"C:\temp\morrow\" + csv);
System.Text.StringBuilder sbErrors = new StringBuilder();
bool first = true;
pbr.Value = 0;
pbr.Maximum = dt.Rows.Count;
if (csv.Contains("CLOSED"))
pbr.ForeColor = Color.Blue;
else
pbr.ForeColor = Color.DarkViolet;
WorkorderCategories Categories = WorkorderCategories.GetItems();
foreach (DataRow dr in dt.Rows)
{
pbr.Value++;
if (first)
{
first = false;
continue;
}
string wodate = v(dr, 1, 255);
DateTime dtWoDate;
if (!DateTime.TryParse(wodate, out dtWoDate))
dtWoDate = DateTime.Now;
string servicenotes = v(dr, 2, 32767);
string wosummary = v(dr, 3, 255);
string traveltime = v(dr, 4, 255);
string labortime = v(dr, 5, 255);
string part = v(dr, 6, 1000);
string username = v(dr, 7, 255);
string clientcontact = v(dr, 8, 1000);
bool Closed = v(dr, 9, 10).Equals("YES", StringComparison.InvariantCultureIgnoreCase);
//Add category or get id of existing if necessary
string Category = v(dr, 10, 255);
Guid CategoryID = Guid.Empty;
if (!string.IsNullOrWhiteSpace(Category))
CategoryID = FetchSertCategory(Categories, Category);
string unitserial = v(dr, 0, 255);
if (string.IsNullOrWhiteSpace(unitserial))
{
sbErrors.AppendLine("Unit serial is blank can't import this workorder. (wosummary: " + v(dr, 3, 255) + " wodate: " + wodate + ")");
continue;
}
//get unit and then get client
if (!UnitList.ContainsKey(unitserial))
{
sbErrors.AppendLine("Unit serial not imported in units: " + unitserial + " can't import this workorder. (wosummary: " + v(dr, 3, 255) + " wodate: " + wodate + ")");
continue;
}
Guid unitID = UnitList[unitserial];
Guid clientID = UnitClientList[unitID];
Workorder w = Workorder.NewItem(WorkorderTypes.Service);
w.ClientID = clientID;
WorkorderItem wi = w.WorkorderItems[0];
wi.UnitID = unitID;
w.WorkorderService.ServiceDate = dtWoDate;
System.Text.StringBuilder sb = new StringBuilder();
if (!string.IsNullOrWhiteSpace(traveltime))
sb.AppendLine("Travel: " + traveltime);
if (!string.IsNullOrWhiteSpace(labortime))
sb.AppendLine("Labor: " + labortime);
if (!string.IsNullOrWhiteSpace(part))
sb.AppendLine("Part: " + part);
if (!string.IsNullOrWhiteSpace(username))
sb.AppendLine("User: " + username);
if (sb.Length > 0)
wi.TechNotes = servicenotes + "\r\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r\n" + sb.ToString();
else
wi.TechNotes = servicenotes;
w.CustomerContactName = clientcontact;
w.Summary = wosummary;
w.WorkorderCategoryID = CategoryID;
if (Closed)
{
w.ServiceCompleted = true;
w.Closed = true;
}
if (!w.IsSavable)
{
System.Diagnostics.Debugger.Break();
}
w.Save();
}
pbr.Value = 0;
return true;
}
#endregion
#region PM workorders
private bool ImportPMWorkorders()
{
//0="PM Unit (Make: Model Serial #)"
//1="Client"
//2="Next Service Date"
//3="Stop Generating Date"
//4="Active"
//5="WorkOrder Category"
//6="Time Span (Months)"
//7="Service Notes"
//8="WorkOrder Number"
//9="Item Summary"
//10="Preventative Maintenance Contact"
DataTable dt = new DataTable();
ReadCSV(dataGridView1, ref dt, @"C:\temp\morrow\PM-2011-0405.csv");
WorkorderCategories Categories = WorkorderCategories.GetItems();
bool first = true;
pbr.Value = 0;
pbr.Maximum = dt.Rows.Count;
pbr.ForeColor = Color.Maroon;
foreach (DataRow dr in dt.Rows)
{
pbr.Value++;
if (first)
{
first = false;
continue;
}
string unitserial = v(dr, 0, 255);
if (string.IsNullOrWhiteSpace(unitserial))
{
sbErrors.AppendLine("Unit serial is blank can't import this PM. (Summary: " + v(dr, 9, 255) + " WO# " + v(dr, 8, 255) + ")");
continue;
}
int StartPositionOfSerialNumber = unitserial.LastIndexOf(" - ");
if (StartPositionOfSerialNumber != -1)
{
//extract the serial number portion
unitserial = unitserial.Substring(StartPositionOfSerialNumber+3).Trim();
}
//get unit and then get client
Guid unitID;
if (!UnitList.TryGetValue(unitserial, out unitID))
{
sbErrors.AppendLine("PM IMPORT ERROR: Unit serial CSV value: [" + v(dr, 0, 255) + "] parsed to this: ["+ unitserial+"] not found in imported units, skipping this PM. (Summary: " + v(dr, 9, 255) + " WO# " + v(dr, 8, 255) + ")");
continue;
}
Guid clientID = UnitClientList[unitID];
string sdate = v(dr, 2, 255);
DateTime dtNextServiceDate = DateTime.MinValue;
if (!DateTime.TryParse(sdate, out dtNextServiceDate))
{
sbErrors.AppendLine("Next service date not parseable: \"" + sdate + "\" can't import this PM. (Summary: " + v(dr, 9, 255) + " WO# " + v(dr, 8, 255) + ")");
continue;
}
sdate = v(dr, 3, 255);
DateTime dtStopGeneratingDate = DateTime.MinValue;
if (!DateTime.TryParse(sdate, out dtStopGeneratingDate))
{
sbErrors.AppendLine("Stop generating date not parseable: \"" + sdate + "\" can't import this PM. (Summary: " + v(dr, 9, 255) + " WO# " + v(dr, 8, 255) + ")");
continue;
}
bool Active = v(dr, 4, 255).Equals("ACTIVE", StringComparison.InvariantCultureIgnoreCase);
//Add category or get id of existing if necessary
string Category = v(dr, 5, 255);
Guid CategoryID = Guid.Empty;
if (!string.IsNullOrWhiteSpace(Category))
CategoryID = FetchSertCategory(Categories, Category);
int TimeSpanMonths = 999;
if (!int.TryParse(v(dr, 6, 255), out TimeSpanMonths))
TimeSpanMonths = 999;//failure to parse code
if (TimeSpanMonths < 1)
TimeSpanMonths = 999;//less than zero is in-valid
string servicenotes = v(dr, 7, 32767);
string WorkorderNumberWTF = v(dr, 8, 255);
string ItemSummary = v(dr, 9, 255);
string Contact = v(dr, 10, 255);
Workorder w = Workorder.NewItem(WorkorderTypes.PreventiveMaintenance);
w.ClientID = clientID;
w.CustomerContactName = Contact;
w.InternalReferenceNumber = WorkorderNumberWTF;
w.WorkorderCategoryID = CategoryID;
WorkorderItem wi = w.WorkorderItems[0];
wi.UnitID = unitID;
wi.TechNotes = servicenotes;
wi.Summary = ItemSummary;
w.WorkorderPreventiveMaintenance.Active = Active;
w.WorkorderPreventiveMaintenance.NextServiceDate = dtNextServiceDate;
w.WorkorderPreventiveMaintenance.StopGeneratingDate = dtStopGeneratingDate;
w.WorkorderPreventiveMaintenance.GenerateSpanUnit = AyaUnitsOfTime.Months;
w.WorkorderPreventiveMaintenance.GenerateSpan = TimeSpanMonths;
//Note defaulted this as not specified
w.WorkorderPreventiveMaintenance.ThresholdSpanUnit = AyaUnitsOfTime.Days;
w.WorkorderPreventiveMaintenance.ThresholdSpan = 7;
w.Save();
}
pbr.Value = 0;
// MessageBox.Show("Done Workorder");
return true;
}
#endregion
private Guid FetchSertCategory(WorkorderCategories cats, string catname)
{
foreach (WorkorderCategory cat in cats)
{
if (cat.Name == catname)
return cat.ID;
}
//Not there, need to add it
WorkorderCategory newcat = cats.Add();
newcat.Name = catname;
newcat.Active = true;
cats = (WorkorderCategories)cats.Save();
return newcat.ID;
}
private string v(DataRow dr, int column, int maxlength)
{
string s = dr[column].ToString().Trim();
if (s.Length > maxlength)
s = s.Substring(0, maxlength);
return s;
}
#region ReadCSV
public static void ReadCSV(DataGridView grid, ref System.Data.DataTable dt, string csvPath)
{
if (dt != null)
{
dt.Clear();
dt = null;
}
bool bHasErrors = false;
System.Text.StringBuilder sbErrors = new System.Text.StringBuilder();
long lRecordsRead = 0;
long lRecordsBad = 0;
Microsoft.VisualBasic.FileIO.TextFieldParser rdr = new Microsoft.VisualBasic.FileIO.TextFieldParser(csvPath);
rdr.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited;
rdr.SetDelimiters(",");
rdr.TrimWhiteSpace = true;
rdr.HasFieldsEnclosedInQuotes = true;
List<string[]> lsRows = new List<string[]>();
int nMaxRowFields = 0;
string[] sCurrentRow;
while (!rdr.EndOfData)
{
try
{
sCurrentRow = rdr.ReadFields();
if (sCurrentRow.Length > nMaxRowFields)
nMaxRowFields = sCurrentRow.Length;
lsRows.Add(sCurrentRow);
lRecordsRead++;
}
catch (Microsoft.VisualBasic.FileIO.MalformedLineException ex)
{
bHasErrors = true;
sbErrors.Append("Line ");
sbErrors.Append(ex.Message);
sbErrors.Append(" is not valid and will be skipped.\r\n");
lRecordsBad++;
}
}
if (bHasErrors)
{
MessageBox.Show(lRecordsBad.ToString() + " records were malformed and not able to be read:\r\n\r\n" + sbErrors.ToString());
}
//MessageBox.Show(lRecordsRead.ToString() +
//" records were successfully read from the .csv file.");
dt = new System.Data.DataTable("CSVData");
for (int x = 0; x < nMaxRowFields; x++)
{
dt.Columns.Add("Column" + (x + 1).ToString(), typeof(string));
}
foreach (string[] sRow in lsRows)
{
System.Data.DataRow dr = dt.NewRow();
int nField = 0;
foreach (string sField in sRow)
{
dr[nField] = sField;
nField++;
}
dt.Rows.Add(dr);
}
grid.DataSource = dt;
}
#endregion read csv
}//eoc
}

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>132, 17</value>
</metadata>
</root>

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace UniversalImports
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("UniversalImports")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("UniversalImports")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("cfc7607a-f68d-4f6c-a709-1f063a1c940c")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace UniversalImports.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UniversalImports.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace UniversalImports.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1DBD900B-4957-44A0-940B-35D865A57CE2}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>UniversalImports</RootNamespace>
<AssemblyName>UniversalImports</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets>
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
</PropertyGroup>
<ItemGroup>
<Reference Include="CSLA">
<HintPath>dependencies\CSLA.dll</HintPath>
</Reference>
<Reference Include="CSLA.Core.Bindablebase">
<HintPath>dependencies\CSLA.Core.Bindablebase.dll</HintPath>
</Reference>
<Reference Include="CSLA.Server.DataPortal">
<HintPath>dependencies\CSLA.Server.DataPortal.dll</HintPath>
</Reference>
<Reference Include="FirebirdSql.Data.FirebirdClient">
<HintPath>dependencies\FirebirdSql.Data.FirebirdClient.dll</HintPath>
</Reference>
<Reference Include="GZTW.AyaNova.BLL">
<HintPath>dependencies\GZTW.AyaNova.BLL.dll</HintPath>
</Reference>
<Reference Include="GZTW.Data">
<HintPath>dependencies\GZTW.Data.dll</HintPath>
</Reference>
<Reference Include="GZTW.Profile">
<HintPath>dependencies\GZTW.Profile.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="config.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- DEVXPPRO Use the test sql database
<ConnectionType>DataBase</ConnectionType>
<DataBaseType>MSSQL</DataBaseType>
<DataBaseConnectionString>Server=WIN732BIT\SQLEXPRESS2K8;initial catalog=Morrow;User Id=sa; Password=abraxis;</DataBaseConnectionString>
-->
<!-- Use the TEST embedded Firebird database -->
<ConnectionType>DataBase</ConnectionType>
<DataBaseType>FireBird</DataBaseType>
<DataBaseConnectionString>ServerType=1;DataBase=C:\temp\morrow\MORROW.FDB;Dialect=3;</DataBaseConnectionString>
<!-- Use server FIREBIRD
<ConnectionType>DataBase</ConnectionType>
<DataBaseType>FireBird</DataBaseType>
<DataBaseConnectionString>ServerType=0;DataSource=localhost;DataBase=MORROW;User=SYSDBA;Password=masterkey;Dialect=3;</DataBaseConnectionString>
-->
</configuration>