//1. We move this unnecessary code to CommonRoutine class //public bool IsEmpty(string value) //{ // if (value.Length == 0) // { // return true; // } // return false; //} public void Insert() { CommonRoutine.count++; if (!CommonRoutine.IsEmpty(CustomerCode) && !CommonRoutine.IsEmpty(CustomerName)) { } }
public void Insert() { //Record country info into the db CommonRoutine.count++; if (!CommonRoutine.IsEmpty(CountryCode) && !CommonRoutine.IsEmpty(CountryName)) { } }
//private PageScraper PageScraper { get; set; } public PageAutomation(HTMLDocument HtmlDocument) { this.Document = HtmlDocument; this.CommonAutomationRoutine = new CommonRoutine(HtmlDocument); }
public CustomerClass() { MachineName = CommonRoutine.GetComputerName(); }