public Protocols.ToolkitResultProtocol CreateEcoHeader(Protocols.DepotRepair.CreateEcoHeaderSetupProtocol setupParam) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); FChoice.Toolkits.Clarify.DepotRepair.CreateEcoHeaderSetup setup; switch (setupParam.ConstructorCue) { case 0: setup = new FChoice.Toolkits.Clarify.DepotRepair.CreateEcoHeaderSetup(setupParam.StartDate, setupParam.EndDate); break; default: throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue)); } if (Global.IsPropertyDirty(1, setupParam.DirtyFieldFlags)) { setup.EcoTitle = setupParam.EcoTitle; } if (Global.IsPropertyDirty(2, setupParam.DirtyFieldFlags)) { setup.EcoType = setupParam.EcoType; } if (Global.IsPropertyDirty(4, setupParam.DirtyFieldFlags)) { setup.CreateDate = setupParam.CreateDate; } if (Global.IsPropertyDirty(8, setupParam.DirtyFieldFlags)) { setup.EffectType = setupParam.EffectType; } if (Global.IsPropertyDirty(16, setupParam.DirtyFieldFlags)) { setup.StartDate = setupParam.StartDate; } if (Global.IsPropertyDirty(32, setupParam.DirtyFieldFlags)) { setup.EndDate = setupParam.EndDate; } if (Global.IsPropertyDirty(64, setupParam.DirtyFieldFlags)) { setup.Status = setupParam.Status; } if (Global.IsPropertyDirty(128, setupParam.DirtyFieldFlags)) { setup.Description = setupParam.Description; } return(new Protocols.ToolkitResultProtocol(toolkit.CreateEcoHeader(setup))); }
public override void DataBind() { base.DataBind(); // Get the ClarifySession for the current user ClarifySession session = Global.GetFCSessionOrLogin(); ClarifyDataSet dataSet = new ClarifyDataSet(session); // Create a generic for the view "qry_case_view" ClarifyGeneric caseGeneric = dataSet.CreateGeneric("qry_case_view"); // Set the DataFields to return in the result set of the query caseGeneric.DataFields.AddRange( new string[] { "id_number", "site_name", "title", "condition", "status", "creation_time", "owner" }); // Set the filter for querying the records caseGeneric.AppendFilter("creation_time", DateOps.MoreThanOrEqual, DateTime.Now.AddDays(DaysBack * -1)); // Set the sorting for the results caseGeneric.AppendSort("creation_time", false); // Query the results caseGeneric.Query(); // Set the datasource of the grid to the generic this.casesCreatedGrid.DataSource = caseGeneric; // Build the DataGrid by calling DataBind() this.casesCreatedGrid.DataBind(); }
public addressForm() { // // Required for Windows Form Designer support // InitializeComponent(); try { FCApp = ClarifyApplication.Initialize(); //this.addAddressLabel.Text = String.Format("Add an Address to the database: {0}", SchemaCache.c ); // Create a new ClarifySession this.session = FCApp.CreateSession(); this.dataSet = new ClarifyDataSet(session); state.DropDownStyle = ComboBoxStyle.DropDownList; country.DropDownStyle = ComboBoxStyle.DropDownList; timeZone.DropDownStyle = ComboBoxStyle.DropDownList; FillCountryDropDown(); FillStateDropDown( country.SelectedItem.ToString() ); FillTimeZoneDropDown( country.SelectedItem.ToString() ); } catch(Exception ex) { string errorMsg = string.Format("Trouble populating form:\n\n{0}", ex.Message); MessageBox.Show(errorMsg, "Demo Initialization Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public Protocols.ToolkitResultProtocol UpdateEcoMaterialDetail(Protocols.DepotRepair.UpdateEcoMaterialDetailSetupProtocol setupParam) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); FChoice.Toolkits.Clarify.DepotRepair.UpdateEcoMaterialDetailSetup setup; switch (setupParam.ConstructorCue) { case 0: setup = new FChoice.Toolkits.Clarify.DepotRepair.UpdateEcoMaterialDetailSetup(setupParam.EcoDetailObjid, setupParam.PartRevisionObjid); break; default: throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue)); } if (Global.IsPropertyDirty(1, setupParam.DirtyFieldFlags)) { setup.EcoDetailObjid = setupParam.EcoDetailObjid; } if (Global.IsPropertyDirty(4, setupParam.DirtyFieldFlags)) { setup.IsRequired = setupParam.IsRequired; } if (Global.IsPropertyDirty(8, setupParam.DirtyFieldFlags)) { setup.Status = setupParam.Status; } if (Global.IsPropertyDirty(32, setupParam.DirtyFieldFlags)) { setup.ElapsedTime = TimeSpan.FromSeconds(setupParam.ElapsedTime); } if (Global.IsPropertyDirty(64, setupParam.DirtyFieldFlags)) { setup.Location = setupParam.Location; } if (Global.IsPropertyDirty(128, setupParam.DirtyFieldFlags)) { setup.Description = setupParam.Description; } if (Global.IsPropertyDirty(256, setupParam.DirtyFieldFlags)) { setup.EcoHeaderIDNum = setupParam.EcoHeaderIDNum; } if (Global.IsPropertyDirty(512, setupParam.DirtyFieldFlags)) { setup.PartRevisionObjid = setupParam.PartRevisionObjid; } return(new Protocols.ToolkitResultProtocol(toolkit.UpdateEcoMaterialDetail(setup))); }
public Protocols.ToolkitResultProtocol DeleteEcoItem(Protocols.DepotRepair.DeleteEcoItemSetupProtocol setupParam) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); FChoice.Toolkits.Clarify.DepotRepair.DeleteEcoItemSetup setup; switch (setupParam.ConstructorCue) { case 0: setup = new FChoice.Toolkits.Clarify.DepotRepair.DeleteEcoItemSetup(setupParam.EcoItemObjid); break; default: throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue)); } if (Global.IsPropertyDirty(1, setupParam.DirtyFieldFlags)) { setup.EcoItemObjid = setupParam.EcoItemObjid; } return(new Protocols.ToolkitResultProtocol(toolkit.DeleteEcoItem(setup))); }
public void beforeAll() { //log4net.Config.XmlConfigurator.Configure(new FileInfo("bootstrap.log4net")); _userClarifySessionConfigurator = MockRepository.GenerateStub <IUserClarifySessionConfigurator>(); _clarifyApplication = MockRepository.GenerateStub <IClarifyApplication>(); _userSessionStartObserver = MockRepository.GenerateStub <IUserSessionStartObserver>(); _userSessionEndObserver = MockRepository.GenerateStub <IUserSessionEndObserver>(); _container = bootstrap_ioc.getContainer(c => { }); _container.Configure(c => { c.For <IUserClarifySessionConfigurator>().Use(_userClarifySessionConfigurator); c.For <IClarifyApplication>().Use(_clarifyApplication); c.For <IUserSessionStartObserver>().Use(_userSessionStartObserver); c.For <IUserSessionEndObserver>().Use(_userSessionEndObserver); }); _cut = _container.GetInstance <ClarifySessionCache>(); _settings = _container.GetInstance <DovetailDatabaseSettings>(); //have to create a REAL session because a test fake just won't do _expectedSession = CreateRealSession(); }
public addressForm() { // // Required for Windows Form Designer support // InitializeComponent(); try { FCApp = ClarifyApplication.Initialize(); //this.addAddressLabel.Text = String.Format("Add an Address to the database: {0}", SchemaCache.c ); // Create a new ClarifySession this.session = FCApp.CreateSession(); this.dataSet = new ClarifyDataSet(session); state.DropDownStyle = ComboBoxStyle.DropDownList; country.DropDownStyle = ComboBoxStyle.DropDownList; timeZone.DropDownStyle = ComboBoxStyle.DropDownList; FillCountryDropDown(); FillStateDropDown(country.SelectedItem.ToString()); FillTimeZoneDropDown(country.SelectedItem.ToString()); } catch (Exception ex) { string errorMsg = string.Format("Trouble populating form:\n\n{0}", ex.Message); MessageBox.Show(errorMsg, "Demo Initialization Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public static void Assign(this CaseDTO @case, EmployeeDTO employee, ClarifySession clarifySession) { new SupportToolkit(clarifySession).AssignCase(new AssignCaseSetup(@case.IDNumber) { UserName = employee.Login }); }
public static void Yank(this EmployeeDTO employee, CaseDTO @case, ClarifySession clarifySession) { new SupportToolkit(clarifySession).YankCase(new YankCaseSetup(@case.IDNumber) { UserName = employee.Login }); }
public Protocols.ToolkitResultProtocol CreateDepotRepairLabor(System.Int32 demandDetailObjid, System.DateTime startDate, System.Int32 duration) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.CreateDepotRepairLabor(demandDetailObjid, startDate, TimeSpan.FromSeconds(duration)))); }
public Protocols.ToolkitResultProtocol CreateDepotRepairMaterial(System.Int32 demandDetailObjid, System.Int32 partRevisionObjid, FChoice.Toolkits.Clarify.RepairPartDisposition disposition) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.CreateDepotRepairMaterial(demandDetailObjid, partRevisionObjid, disposition))); }
public bool Authenticate(string username, string password) { var success = ClarifySession.AuthenticateContact(username, password); _logger.LogDebug("Authentication for contact {0} was {1}successful.".ToFormat(username, success ? "" : "not ")); return(success); }
public Protocols.ToolkitResultProtocol CreateEcoHeader(System.DateTime startDate, System.DateTime endDate) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.CreateEcoHeader(startDate, endDate))); }
protected void Session_End(Object sender, EventArgs e) { if (Session["FCSessionID"] != null) { ClarifySession sess = GetFCSessionOrLogin(); sess.CloseSession(); } }
public string CreateSession(string userName, string password, ClarifyLoginType loginType) { ClarifySession session = ClarifyApplication.Instance.CreateSession(userName, password, loginType); session.RegisterLicenseRequirements(WEB_SERVICES_PRODUCT_ID); return(session.SessionID.ToString()); }
public Protocols.ToolkitResultProtocol UpdateEcoMaterialDetail(System.Int32 ecoDetailObjid, System.Int32 partRevisionObjid) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.UpdateEcoMaterialDetail(ecoDetailObjid, partRevisionObjid))); }
public Protocols.ToolkitResultProtocol ApplyEco(System.Int32 demandDetailObjid, System.String ecoHeaderIDNum) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.ApplyEco(demandDetailObjid, ecoHeaderIDNum))); }
public Protocols.ToolkitResultProtocol CreateEcoItem(FChoice.Toolkits.Clarify.EcoItemAppliesTo appliesTo, System.Boolean isActive, System.String ecoHeaderIDNum, System.Int32 applyPartRevisionObjid, System.Int32 resultPartRevisionObjid) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.CreateEcoItem(appliesTo, isActive, ecoHeaderIDNum, applyPartRevisionObjid, resultPartRevisionObjid))); }
public Protocols.ToolkitResultProtocol UpdateDepotRepairMaterial(System.Int32 materialLogObjid, FChoice.Toolkits.Clarify.RepairPartDisposition disposition) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.UpdateDepotRepairMaterial(materialLogObjid, disposition))); }
public Protocols.ToolkitResultProtocol UpdateEcoItem(System.Int32 ecoItemObjid, System.Boolean isActive, System.String ecoHeaderIDNum) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.UpdateEcoItem(ecoItemObjid, isActive, ecoHeaderIDNum))); }
public Protocols.ToolkitResultProtocol DeleteEcoItem(System.Int32 ecoItemObjid) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.DeleteEcoItem(ecoItemObjid))); }
public Protocols.ToolkitResultProtocol CreateEcoLaborDetail(System.Boolean isRequired, System.Int32 elapsedTime, System.String ecoHeaderIDNum) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.CreateEcoLaborDetail(isRequired, TimeSpan.FromSeconds(elapsedTime), ecoHeaderIDNum))); }
public Protocols.ToolkitResultProtocol CreateEcoMaterialDetail(System.Boolean isRequired, System.String ecoHeaderIDNum, System.Int32 partRevisionObjid) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); return(new Protocols.ToolkitResultProtocol(toolkit.CreateEcoMaterialDetail(isRequired, ecoHeaderIDNum, partRevisionObjid))); }
public void Configure(ClarifySession session) { var utcTimezone = _localeCache.TimeZones.FirstOrDefault(t => t.UtcOffsetSeconds == 0); if(utcTimezone == null) throw new ApplicationException("No timezone with a zero GMT offset was found."); session.LocalTimeZone = utcTimezone; }
public ClarifyGenericSrvIUD(ClarifySession session) { if (session == null) { throw new ArgumentNullException("session"); } dataSet = new ClarifyDataSet(session); }
public ClarifyGenericSrvQuery(ClarifySession session) { if (session == null) { throw new ArgumentNullException("session"); } dataSet = new ClarifyDataSet(session); }
protected override void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); // Get the ClarifySession session = Global.GetFCSessionOrLogin(); }
public void Configure(ClarifySession session) { var utcTimezone = _localeCache.TimeZones.FirstOrDefault(t => t.UtcOffsetSeconds == 0); if (utcTimezone == null) { throw new ApplicationException("No timezone with a zero GMT offset was found."); } session.LocalTimeZone = utcTimezone; }
override protected void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); // Get the ClarifySession session = Global.GetFCSessionOrLogin(); }
public bool Authenticate(string username, string password) { //HACK to make sure SDK is spun up. ICK _clarifyApplicationFactory.Create(); var success = ClarifySession.AuthenticateContact(username, password); _logger.LogDebug("Authentication for contact {0} was {1}successful.".ToFormat(username, success ? "" : "not ")); return(success); }
public static void AddNotes(this CaseDTO @case, int numberOfNotes, ClarifySession clarifySession) { var supportToolkit = new SupportToolkit(clarifySession); for (var i = 0; i < numberOfNotes; i++) { supportToolkit.LogCaseNote(new LogCaseNoteSetup(@case.IDNumber) { Notes = "case notes" }); } }
public ModifierResultProtocol[] Update(ModifierProtocol[] modificationItems) { if (modificationItems == null) { throw new ArgumentNullException("modificationItems"); } ClarifySession session = Global.GetSession(AuthHeader); ClarifyGenericSrvIUD iud = new ClarifyGenericSrvIUD(session); return(iud.Process(modificationItems)); }
public Protocols.ToolkitResultProtocol UpdateEcoItem(Protocols.DepotRepair.UpdateEcoItemSetupProtocol setupParam) { ClarifySession session = Global.GetSession(AuthHeader); FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit toolkit = new FChoice.Toolkits.Clarify.DepotRepair.DepotRepairToolkit(session); FChoice.Toolkits.Clarify.DepotRepair.UpdateEcoItemSetup setup; switch (setupParam.ConstructorCue) { case 0: setup = new FChoice.Toolkits.Clarify.DepotRepair.UpdateEcoItemSetup(setupParam.EcoItemObjid, setupParam.IsActive, setupParam.EcoHeaderIDNum); break; default: throw new InvalidOperationException(string.Format("Constructor index '{0}' does not exist.", setupParam.ConstructorCue)); } if (Global.IsPropertyDirty(1, setupParam.DirtyFieldFlags)) { setup.EcoItemObjid = setupParam.EcoItemObjid; } if (Global.IsPropertyDirty(2, setupParam.DirtyFieldFlags)) { setup.AppliesTo = setupParam.AppliesTo; } if (Global.IsPropertyDirty(4, setupParam.DirtyFieldFlags)) { setup.IsActive = setupParam.IsActive; } if (Global.IsPropertyDirty(8, setupParam.DirtyFieldFlags)) { setup.EcoHeaderIDNum = setupParam.EcoHeaderIDNum; } if (Global.IsPropertyDirty(16, setupParam.DirtyFieldFlags)) { setup.ApplyPartRevisionObjid = setupParam.ApplyPartRevisionObjid; } if (Global.IsPropertyDirty(32, setupParam.DirtyFieldFlags)) { setup.ResultPartRevisionObjid = setupParam.ResultPartRevisionObjid; } return(new Protocols.ToolkitResultProtocol(toolkit.UpdateEcoItem(setup))); }
private void visitSession(ClarifySession session, bool isConfigured = true, bool isObserved = true) { if (isConfigured) { _sessionConfigurator.Configure(session); _logger.LogDebug("Configured created session."); } if (isObserved) { _sessionStartObserver().SessionStarted(wrapSession(session)); _logger.LogDebug("Observed created session."); } }
protected override void OnInit(EventArgs e) { // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); base.OnInit(e); // Get the ClarifySession session = Global.GetFCSessionOrLogin(); dataSet = new ClarifyDataSet(session); // Get the name of the table that contains the name of current user userTable = session.LoginType == ClarifyLoginType.Contact ? "contact" : "employee"; }
private void Page_Load(object sender, System.EventArgs e) { // Get the ClarifySession from the Globa.asax. session = Global.GetFCSessionOrLogin(); if( !IsPostBack ) { // Get the name of the table for the user currently logged in string userTableName = ClarifyLoginType.Contact == session.LoginType ? "contact" : "employee"; // Get the name of the user string name = session[ userTableName + ".first_name" ].ToString(); // Set the welcome message on the page welcomeLabel.Text = "Welcome " + name + "."; } }
public ClarifySessionWrapper(ClarifySession clarifySession) { ClarifySession = clarifySession; }
public static void Dispatch(this CaseDTO @case, string queueName, ClarifySession clarifySession) { new SupportToolkit(clarifySession).DispatchCase(new DispatchCaseSetup(@case.IDNumber, queueName)); }
private static void close(ClarifySession session) { session.CloseSession(); }
public void Configure(ClarifySession session) { session.LocalTimeZone = _user().Timezone; }
public void Configure(ClarifySession session) { var currentSdkUser = _user(); session.LocalTimeZone = currentSdkUser.Timezone; }
public static void AddToQueue(this EmployeeDTO employee, string queueName, ClarifySession clarifySession) { new InterfacesToolkit(clarifySession).AddUserToQueue(queueName, employee.Login); }
private static IClarifySession wrapSession(ClarifySession session) { return new ClarifySessionWrapper(session); }
public static void Dispatch(this EmployeeDTO employee, CaseDTO @case, string queueName, ClarifySession clarifySession) { new SupportToolkit(clarifySession).DispatchCase(new DispatchCaseSetup(@case.IDNumber, queueName) { UserName = employee.Login }); }
public void beforeAll() { _userClarifySessionConfigurator = MockRepository.GenerateStub<IUserClarifySessionConfigurator>(); _clarifyApplication = MockRepository.GenerateStub<IClarifyApplication>(); _userSessionStartObserver = MockRepository.GenerateStub<IUserSessionStartObserver>(); _userSessionEndObserver = MockRepository.GenerateStub<IUserSessionEndObserver>(); _container = bootstrap_ioc.getContainer(c => { c.For<IUserClarifySessionConfigurator>().Use(_userClarifySessionConfigurator); c.For<IClarifyApplication>().Use(_clarifyApplication); c.For<IUserSessionStartObserver>().Use(_userSessionStartObserver); c.For<IUserSessionEndObserver>().Use(_userSessionEndObserver); }); _cut = _container.GetInstance<ClarifySessionCache>(); _settings = _container.GetInstance<DovetailDatabaseSettings>(); //have to create a REAL session because a test fake just won't do _expectedSession = CreateRealSession(); }
public void SetUp() { theSession = SessionUtilities.CreateEmptySession(); theManager = new StubManager(); theAdapter = new ClarifySessionAdapter(theSession, theManager); }
public ClarifySessionAdapter(ClarifySession inner, IClarifySessionManager manager) { _inner = inner; _manager = manager; }
public static void Close(ClarifySession session) { _closeSession(session); }
public static void LinkCaseToFirstSolutionResolution(this SolutionDTO solution, CaseDTO @case, ClarifySession clarifySession) { new InterfacesToolkit(clarifySession).LinkCaseToWorkaround(@case.IDNumber, solution.Resolutions[0]); }