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 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 ClarifyGenericSrvQueryParser( ClarifyDataSet dataSet ) { if( dataSet == null) throw new ArgumentNullException("dataSet"); this.dataSet = dataSet; }
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 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 query the records caseGeneric.AppendFilter( "owner", StringOps.Equals, session.UserName); caseGeneric.AppendFilter( "condition", StringOps.Like, "Open%"); // 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.openCasesGrid.DataSource = caseGeneric; // Build the DataGrid by calling DataBind() this.openCasesGrid.DataBind(); }
public void Visit(BeginModelMap instruction) { DataSet = _session.CreateDataSet(); _modelStack.Push(new ModelInformation { ModelName = instruction.Name }); }
public void Visit(BeginModelMap beginModelMap) { DataSet = _sessionCache.GetUserSession().CreateDataSet(); _modelStack.Push(new ModelInformation { ModelType = beginModelMap.ModelType }); }
public ClarifyGenericSrvIUD(ClarifySession session) { if (session == null) { throw new ArgumentNullException("session"); } dataSet = new ClarifyDataSet(session); }
public ClarifyGenericSrvQueryParser(ClarifyDataSet dataSet) { if (dataSet == null) { throw new ArgumentNullException("dataSet"); } this.dataSet = dataSet; }
public ClarifyGenericSrvQuery(ClarifySession session) { if (session == null) { throw new ArgumentNullException("session"); } dataSet = new ClarifyDataSet(session); }
public string[] GenerateEmployees(int count) { var ds = new ClarifyDataSet(_session); var privGeneric = ds.CreateGeneric("privclass"); var privClass = Guid.NewGuid().ToString(); var privClassRow = privGeneric.AddNew(); privClassRow["class_name"] = privClass; privClassRow["access_mask"] = "FFFFFFF FFFF FFFFTFFFFFF FF FF FFFFFF FFF"; privClassRow["trans_mask"] = new string('1', 255); privClassRow["member_type"] = "Employee"; privClassRow.Update(); var interfacesToolkit = new InterfacesToolkit(_session); var addressObjId = interfacesToolkit.CreateAddress("123 street", "Austin", "TX", "78759", "USA", "CST").Objid; var siteSetup = new CreateSiteSetup(SiteType.Customer, SiteStatus.Active, addressObjId) { SiteIDNum = _session.GetNextNumScheme("Site ID"), SiteName = Guid.NewGuid().ToString() }; var siteResult = interfacesToolkit.CreateSite(siteSetup); var employees = new List <string>(); for (var i = 0; i < count; i++) { var login = "******".ToFormat(Guid.NewGuid().ToString("N").Substring(0, 10)); var email = "{0}@test.dovetailsoftware.com".ToFormat(login); var createEmployeeSetup = new CreateEmployeeSetup("Employee " + i, "Dovetail", login, "password", siteResult.IDNum, email, "CSR") { WorkGroup = "Quality Engineer", IsActive = true, Phone = randomString(10), IsSupervisor = false }; var createEmployeeResult = interfacesToolkit.CreateEmployee(createEmployeeSetup); _instructions.Add(new CleanupInstruction("employee", createEmployeeResult.Objid)); var userId = (int)new SqlHelper("SELECT employee2user FROM table_employee WHERE objid = {0}".ToFormat(createEmployeeResult.Objid)).ExecuteScalar(); _instructions.Add(new CleanupInstruction("user", userId)); employees.Add(login); } _instructions.Add(new CleanupInstruction("site", siteResult.Objid)); _instructions.Add(new CleanupInstruction("privclass", privClassRow.DatabaseIdentifier())); return(employees.ToArray()); }
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(); dataSet = new ClarifyDataSet(session); }
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(); dataSet = new ClarifyDataSet(session); // Get the name of the table that contains the name of current user userTable = session.LoginType == ClarifyLoginType.Contact ? "contact" : "employee"; }
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"; }
public static ClarifyGeneric CreateGenericWithFields(this ClarifyDataSet dataSet, string objectName, params string[] fields) { if (fields == null || fields.Length < 1) { fields = new[] { "objid" } } ; var generic = dataSet.CreateGeneric(objectName); generic.DataFields.AddRange(fields); return(generic); } }
public HistoryModelMapVisitor(IMappingTransformRegistry registry, IServiceLocator services, IMappingVariableExpander expander, ClarifyGeneric rootGeneric, ClarifyDataSet dataSet, WorkflowObject workflowObject, HistorySettings settings) { _registry = registry; _services = services; _expander = expander; _rootGeneric = rootGeneric; _workflowObject = workflowObject; _settings = settings; DataSet = dataSet; }
static void Main(string[] args) { try { // Initialize ClarifyApplication FCApp = ClarifyApplication.Initialize(); // Create a new ClarifySession ClarifySession sess = FCApp.CreateSession(); //Create a new ClarifyDataSet ClarifyDataSet ds = new ClarifyDataSet(sess); // Create a new ClarifyGeneric object for address records ClarifyGeneric generic = ds.CreateGeneric("address"); // Check for address xml file if (!File.Exists(ADDRESS_PATH)) { Console.WriteLine("Unable to find \"{0}\".", ADDRESS_PATH); Console.WriteLine("Please ensure this file is in the same directory as the exe."); // Exit application Console.WriteLine("Press Enter to exit..."); Console.ReadLine(); return; } // Load address.xml into a XmlDocument XmlDocument doc = new XmlDocument(); doc.Load(ADDRESS_PATH); // Insert new address records into the database. InsertRecords(doc, generic); // Exit application Console.WriteLine("Press Enter to exit..."); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine("There was an unhandled exception when running the demo."); Console.WriteLine(); Console.WriteLine(ex); } }
static void Main(string[] args) { try { // Initialize ClarifyApplication FCApp = ClarifyApplication.Initialize(); // Create a new ClarifySession ClarifySession sess = FCApp.CreateSession(); //Create a new ClarifyDataSet ClarifyDataSet ds = new ClarifyDataSet(sess); // Create a new ClarifyGeneric object for address records ClarifyGeneric generic = ds.CreateGeneric("address"); // Check for address xml file if( !File.Exists(ADDRESS_PATH) ) { Console.WriteLine("Unable to find \"{0}\".", ADDRESS_PATH); Console.WriteLine("Please ensure this file is in the same directory as the exe."); // Exit application Console.WriteLine("Press Enter to exit..."); Console.ReadLine(); return; } // Load address.xml into a XmlDocument XmlDocument doc = new XmlDocument(); doc.Load(ADDRESS_PATH); // Insert new address records into the database. InsertRecords(doc, generic); // Exit application Console.WriteLine("Press Enter to exit..."); Console.ReadLine(); } catch( Exception ex ) { Console.WriteLine("There was an unhandled exception when running the demo."); Console.WriteLine(); Console.WriteLine(ex); } }
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); }
public ClarifyDataSet CreateDataSet() { var clarifyDataSet = new ClarifyDataSet(ClarifySession); return(clarifyDataSet); }
public ClarifyDataSet CreateDataSet() { var clarifyDataSet = new ClarifyDataSet(ClarifySession); return clarifyDataSet; }