public DataTable SelectOne(String _id, DB_Handle oDB_Handle) { DL_Client oDL_Client = new DL_Client(); DataTable oDataTable = new DataTable(); try { bool newDBHandle = false; if (oDB_Handle == null) { oDB_Handle = new DB_Handle(); oDB_Handle.OpenConnection(); oDB_Handle.BeginTransaction(); newDBHandle = true; } oDataTable = oDL_Client.SelectOne(_id, oDB_Handle); if (newDBHandle) { oDB_Handle.CommitTransaction(); oDB_Handle.CloseConnection(); } } catch (Exception ex) { oDB_Handle.RollbackTransaction(); oDB_Handle.CloseConnection(); throw ex; } return(oDataTable); }
public void Insert(REF_Client oREF_Client, DB_Handle oDB_Handle) { //** DL_Client oDL_Client = new DL_Client(); try { bool newDBHandle = false; if (oDB_Handle == null) { oDB_Handle = new DB_Handle(); oDB_Handle.OpenConnection(); oDB_Handle.BeginTransaction(); newDBHandle = true; } //** oDL_Client.Insert(oREF_Client, oDB_Handle); if (newDBHandle) { oDB_Handle.CommitTransaction(); oDB_Handle.CloseConnection(); } } catch (Exception ex) { oDB_Handle.RollbackTransaction(); oDB_Handle.CloseConnection(); throw ex; } }
public void DeleteOne(String _dlt_ap_id, DB_Handle oDB_Handle) { DL_Client oDL_Client = new DL_Client(); try { bool newDBHandle = false; if (oDB_Handle == null) { oDB_Handle = new DB_Handle(); oDB_Handle.OpenConnection(); oDB_Handle.BeginTransaction(); newDBHandle = true; } oDL_Client.DeleteOne(_dlt_ap_id, oDB_Handle); if (newDBHandle) { oDB_Handle.CommitTransaction(); oDB_Handle.CloseConnection(); } } catch (Exception ex) { oDB_Handle.RollbackTransaction(); oDB_Handle.CloseConnection(); throw ex; } }
public DataTable getTestsInquiry(String unitCode, String dateOfPrice, out String UnitCodeTitle, out String SpecialPrice, out String SpecialOptionPrice, String userId, String userLab, String testName, bool logEvent) { UnitCodeTitle = String.Empty; SpecialPrice = String.Empty; SpecialOptionPrice = String.Empty; string strLogEvent = (logEvent == true ? "Y" : "N"); return(DL_Client.getTestsInquiry(this.ID, unitCode, dateOfPrice, out UnitCodeTitle, out SpecialPrice, out SpecialOptionPrice, this.Mnemonic, userId, userLab, testName, strLogEvent)); }
public static Boolean getClientCountry(String clientID, out String clientCountry) { clientCountry = DL_Client.getClientCountry(clientID); if (clientCountry.Length > 0) { return(true); } return(false); }
public DataTable getEvents() { if (this.Mnemonic.Length > 0) { return(DL_Client.getEventsByClientMnemonic(this.Mnemonic)); } else { return(DL_Client.getEventsByClientID(this.ID)); } }
private DataTable getRecentIssues(Int32 noOfTopRecords) { if (this.Mnemonic.Length > 0) { return(DL_Client.getRecentIssuesByClientMnemonic(noOfTopRecords, this.Mnemonic)); } else { return(DL_Client.getRecentIssuesByClientID(noOfTopRecords, this.ID)); } }
//AM Issue#32815 05/06/2008 Build Number 0.0.0.9 public Boolean insertReportOption(string strFROMDATE, string strTODATE, String userId, String userLab) { String message = DL_Client.insertReportOption(this._mnemonic, this._autodialGroups, strFROMDATE, strTODATE, userId, userLab); if (message.Length > 0) { return(true); } else { return(false); } }
public static Boolean validatePriceInqPassword(String priceInqPasswd) { String returnString = DL_Client.validatePriceInqPassword(SessionHelper.ClientContext, priceInqPasswd, SessionHelper.UserContext.ID); if (returnString == "0") { return(true); } else { return(false); } }
public void GetClientRevenueDetails(String clientMnemonic) { DataTable clientData = null; if (clientMnemonic.Length > 0) { clientData = DL_Client.getClientDetailsByMnemonic(clientMnemonic); } if (clientData == null) { this.IsValid = false; } else if (clientData.Rows.Count < 1) { this.IsValid = false; } else if (clientData.Rows.Count > 1) { this.IsValid = false; } else { this.IsValid = true; if (clientData.Rows[0]["ClientIsHot"].ToString().ToUpper() == "Y") { this._isHot = true; } else { this._isHot = false; } if (clientData.Rows[0]["ClientIsAllied"].ToString().ToUpper() == "Y") { this._isAllied = true; } else { this._isAllied = false; } this._isNew = (clientData.Rows[0]["ClientIsNew"].ToString().ToUpper() == "Y"); string[] arrClientRevenue = clientData.Rows[0]["ClientRevenue"].ToString().Split('^'); this._revenueFirstMonth = (arrClientRevenue[0].Length == 0 ? "0" : arrClientRevenue[0]); this._revenueSecondMonth = (arrClientRevenue[1].Length == 0 ? "0" : arrClientRevenue[1]); this._revenueThirdMonth = (arrClientRevenue[2].Length == 0 ? "0" : arrClientRevenue[2]); } }
public String validateAutodial(String CLID) { return(DL_Client.validateAutodial(CLID)); }
public Boolean update(String newAccountNote, String priceInqPasswd) { return((DL_Client.updateAccountNote(this.Mnemonic, newAccountNote, priceInqPasswd, SessionHelper.UserContext.canChangeClientPassword) > 0) ? true : false); }
public Client(String clientID) { this._ID = clientID; DataTable clientData = null; if (clientID.Length > 0) { clientData = DL_Client.getClientDetails(clientID); } if (clientData == null) { this.IsValid = false; } else if (clientData.Rows.Count < 1) { this.IsValid = false; } else if (clientData.Rows.Count > 1) { this.IsValid = false; } else { this.IsValid = true; this.NoOfRecentIssues = 5; DataRow dr = clientData.Rows[0]; this._name = dr["CLF_CLNAM"].ToString(); this._mnemonic = dr["CLF_CLMNE"].ToString(); this._phoneNumber = dr["CLF_CLPHN"].ToString(); this._address.Address1 = dr["CLF_CLAD1"].ToString(); this._address.Address2 = dr["CLF_CLAD2"].ToString(); this._address.Address3 = dr["CLF_CLAD3"].ToString(); this._address.Address4 = dr["CLF_CLAD4"].ToString(); this._salesTerritory = dr["CLF_CLTER"].ToString(); this._salesRepresentative = dr["SALES_REP"].ToString(); this._autodialGroups = dr["AutoDial_Group"].ToString(); this._zoasisNumber = dr["ZOASIS_NUMBER"].ToString(); this._routeStop = dr["CLF_CLRTS"].ToString(); this._location = dr["LOCATION"].ToString(); this._alphaName = dr["CLF_CLANAM"].ToString(); this._sortKey = dr["CLF_CLSRT"].ToString(); this._afterHours = dr["CLF_CLAPH"].ToString(); this._fax = dr["CLF_CLFAX"].ToString(); this._ofcContact = dr["CLF_CLCON"].ToString(); this._description = dr["CLF_CLTYP"].ToString(); this._reportingPartials = dr["CLF_PART"].ToString(); this._reportMicroPartials = dr["CLF_PMB"].ToString(); this._comprehensiveFinals = dr["CLF_PCOMP"].ToString(); this._customUnitCodes = dr["CustomUnitCode"].ToString(); this._orderEntryFlashMessage = dr["CLF_FLASH"].ToString(); this._orderEntryInstruction = dr["OEMOEMSG"].ToString(); //this._region = dr["Region"].ToString(); this._salesRepExtension = dr["SalesRepExt"].ToString(); this._salesRepEmail = dr["SalesRepEmail"].ToString(); //+SSM 02/11/2011 #Issue115785 Migrating SalesRep and RelatedChanges this._salesRepCellPh = dr["SalesRepCellPh"].ToString(); this._salesLastModified = dr["LastUpdated"].ToString(); this._salesTerritoryMgr = dr["SalesRepMgrName"].ToString(); this._salesTerritoryMgrCellPh = dr["SalesRepMgrCellPh"].ToString(); this._salesTerritoryMgrEmail = dr["SalesRepMgrEmail"].ToString(); this._salesTerritoryMgrExtension = dr["SalesRepMgrExt"].ToString(); //-SSM this._accountNotes = dr["AccountNotes"].ToString(); this._priceInqPasswd = dr["PriceInqPasswd"].ToString(); if (dr["ClientIsHot"].ToString().ToUpper() == "Y") { this._isHot = true; } else { this._isHot = false; } if (dr["ClientIsAllied"].ToString().ToUpper() == "Y") { this._isAllied = true; } else { this._isAllied = false; } this._isNew = (dr["ClientIsNew"].ToString().ToUpper() == "Y"); string[] arrClientRevenue = dr["ClientRevenue"].ToString().Split('^'); this._revenueFirstMonth = (arrClientRevenue[0].Length == 0 ? "0" : arrClientRevenue[0]); this._revenueSecondMonth = (arrClientRevenue[1].Length == 0 ? "0" : arrClientRevenue[1]); this._revenueThirdMonth = (arrClientRevenue[2].Length == 0 ? "0" : arrClientRevenue[2]); this._inquiryMessages = dr["InquiryMessages"].ToString(); this._clientTimeZone = dr["ClientTimeZone"].ToString(); //this._country = dr["Country"].ToString(); String country; getClientCountry(this.ID, out country); this._country = country; } }