private void edvV_PartRev_Vehicle_1View_EpiViewNotification(EpiDataView view, EpiNotifyArgs args) { // ** Argument Properties and Uses ** // view.dataView[args.Row]["FieldName"] // args.Row, args.Column, args.Sender, args.NotifyType // NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes if ((args.Sender.ToString() == "Ice.Lib.Framework.BAQDataView") && (args.NotifyType == EpiTransaction.NotifyType.Initialize)) { part = ((EpiTextBox)csm.GetNativeControlReference("ed6ec35a-0be1-4dcd-89eb-5308ac6794f1")); revision = ((EpiTextBox)csm.GetNativeControlReference("c1aa85d6-8d70-4496-955b-7daf20859ce2")); vehicleid = ((EpiTextBox)csm.GetNativeControlReference("7d32ffc7-c6fc-4973-9fd9-c6c252231c65")); brand = ((EpiTextBox)csm.GetNativeControlReference("4da113e1-62c5-460c-b2ba-a2c30f926bcc")); vehicle = ((EpiTextBox)csm.GetNativeControlReference("598f1ee6-03ca-4fb8-b233-2d570e3190ef")); year = ((EpiTextBox)csm.GetNativeControlReference("dfcbd85f-77fe-40cb-8c39-0eda0915d335")); model = ((EpiTextBox)csm.GetNativeControlReference("5409ba3e-abd9-456d-9b5a-bba146bc22cc")); if ((args.Row < 0) && (part.Text != "" || revision.Text != "" || vehicleid.Text != "" || brand.Text != "" || vehicle.Text != "" || year.Text != "" || model.Text != "")) { MessageBox.Show("No Results!"); } } }
private void btnNextID_Click(object sender, System.EventArgs args) { // ** Place Event Handling Code Here ** this.custAdapter = new CustomerAdapter(this.oTrans); this.custAdapter.BOConnect(); this.custDataView = (EpiDataView)(this.oTrans.EpiDataViews["Customer"]); DataRow currentCustomer = this.custDataView.CurrentDataRow; // Add Prefix string custID = formatNewID(currentCustomer["Name"].ToString()); // Set Suffix int custSuffix = 1; // 001 // Iterate until suffix exists with prefix do { string whereClause = "CustID = \'" + custID + custSuffix.ToString("D3") + "\'"; System.Collections.Hashtable whereClauses = new System.Collections.Hashtable(1); whereClauses.Add("Customer", whereClause); SearchOptions searchOptions = SearchOptions.CreateRuntimeSearch(whereClauses, DataSetMode.RowsDataSet); this.custAdapter.InvokeSearch(searchOptions); if ((this.custAdapter.CustomerData.Customer.Rows.Count > 0)) { custSuffix++; } } while(this.custAdapter.CustomerData.Customer.Rows.Count > 0); // Set new custID string newCustID = custID + custSuffix.ToString("D3"); //MessageBox.Show("New CustID: " + newCustID); et_newCustID = ((EpiTextBox)csm.GetNativeControlReference("eb06f6cc-8342-4610-8c12-bdfb93e78f8d")); et_newCustID.Text = newCustID; }
private void EpiTextBox_GotFocus(object sender, RoutedEventArgs e) { EpiTextBox.SelectAll(); }