Skip to content

Instantly share code, notes, and snippets.

View nickmartini's full-sized avatar

Nick Martini nickmartini

View GitHub Profile
public static string BuildDateDirectory()
{
string year = DateTime.Now.Year.ToString();
string month = DateTime.Now.Month.ToString();
string day = DateTime.Now.Day.ToString();
string hour = DateTime.Now.Hour.ToString();
string minute = DateTime.Now.Minute.ToString();
if (month.Length == 1)
month = string.Format("0{0}", month);
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Net;
using System.IO;
using System.Xml;
using System.Xml.Linq;
public void ParseFile()
{
if (!this.hasdeliveries)
return;
XDocument data = XDocument.Load(this.file.FullName);
var q = from x in data.Elements("TRANSFER").Elements("MESSAGE")
select x.Value;
//old asp.net
function travelTo(loc)
{
var currentLoc = String(window.location);
var lastIndex = currentLoc.indexOf("Members/");
var finalLoc = currentLoc.substr(0, lastIndex);
if (loc == "Catalog")
window.location = finalLoc + "Members/Catalog/Default.aspx";
function getDPDiopterDetails(obj) {
var a = obj.id;
var rptIndex = a.substring(0, a.indexOf("ddlDPModel"));
var userID = document.getElementById("ctl00_cMainContent_tbHiddenUserID").value;
var modelElement = document.getElementById(rptIndex + "ddlDPModel");
var diopterElement = document.getElementById(rptIndex + "ddlDPDiopters");
var productIDElement = document.getElementById(rptIndex + "tbDPHiddenProductID");
productIDElement.value = "-1";
string body = string.Format(@"Title: Product Price Request from AMOeasy Catalog{0}Date: {1}{0}********************************{0}Shopper Group: {2} (ID: {3}){0}{0}Shopper Username: {4} (ID: {5}){0}{0}Shopper Information{0}********************************{0}Name: {6} {7}{0}Phone # 1: {8}{0}Phone # 2: {9}{0}Fax #: {10}{0}E-mail 1: {11}{0}E-mail 2: {12}{0}Best Time to Call: {13}{0}{0}Product Details{0}********************************{0}Product ID: {14}{0}Supplier: {15}{0}Supplier SKU: {16}{0}Description: {17}{0}Order Qty/UM: {18}/{19}{0}********************************{0}", Environment.NewLine, DateTime.Now.ToLongDateString(), grp.name, grp.group_id, user.username, user.user_id, user.firstname, user.lastname, address1.phonenum1, address1.phonenum2, address1.faxnum, address1.email1, address1.email2, address1.bestcalltime, prod.product_id, prod.supplier.displayname, prod.supplier_sku, prod.shortdesc, prod.order_qty, prod.order_um);
Desc id parent_id size
----------------------------------------------------
Big black dildo 1 NULL NULL
Big black dildo/1 2 1 1
Big black dildo/2 3 1 2
Big black dildo/3 4 1 3
Big black dildo/4 5 1 4
<table id="menu1" class="menu1_2" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td id="menu1n0" onkeyup="Menu_Key(event)" onmouseout="Menu_Unhover(this)" onmouseover="Menu_HoverStatic(this)">
</td>
<td style="width: 3px;"/>
<td id="menu1n1" onkeyup="Menu_Key(event)" onmouseout="Menu_Unhover(this)" onmouseover="Menu_HoverStatic(this)">
<table class="MenuHorizontalTabsMenuItem menu1_4" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
update product set prsdesc = 'HY-60BBR' where prrfnbr = 1647883 or prprfnbr = 1647883
go
update product set prnbr = 'HY-16271713050021NAJ60042', prldesc2 = 'YA-60BBR060', prldesc3 = 'YA-60BBR/06.00' where prrfnbr = 1647900
go
update product set prnbr = 'HY-16341713050021NAJ60076', prldesc2 = 'YA-60BBR065', prldesc3 = 'YA-60BBR/06.50' where prrfnbr = 1647901
go
update product set prnbr = 'HY-16411713050021NAJ600C1', prldesc2 = 'YA-60BBR070', prldesc3 = 'YA-60BBR/07.00' where prrfnbr = 1647902
go
update product set prnbr = 'HY-16581713060021NAJ600F7', prldesc2 = 'YA-60BBR075', prldesc3 = 'YA-60BBR/07.50' where prrfnbr = 1647903
go
function testHoya(sFld, nFld, bNum) {
// 1 = SKU
// 2 = EXP date (YYMMDD)
// 3 = Serial number
var match = false;
var re = /^\(?01\)?04547480(\d{6})\(?17\)?(\d{6})\(?21\)?(\w+)$/i;
if (re.test(sFld.value)) {
var objRef_SKU = eval("document.forms.$(ADD_IOL_INV_FRM).$(FIELD_SKU)" + nFld);
var objRef_SN = eval("document.forms.$(ADD_IOL_INV_FRM).$(FIELD_SN)" + nFld);
var objRef_MFR = eval("document.forms.$(ADD_IOL_INV_FRM).$(FIELD_MFR)" + nFld);