/// <summary> /// Yeni Evrak Teslim Alan bilgisi girişi /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtEvrakiTeslimAlan_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { if (e.DisplayValue.ToString().IsEmpty() || e.DisplayValue == null) { return; } if (string.IsNullOrWhiteSpace(e.DisplayValue.ToString())) { return; } if (MessageBox.Show(this, e.DisplayValue + "' ekleniyor emin misiniz?", "Onayla", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } using (var db = new ETSEntities()) { db.Personel.Add(new Personel { Adi = e.DisplayValue.ToString() }); db.SaveChanges(); } SetPersonel(); e.Handled = true; }
private void txtGuvenlikNoOncelikDerecesi_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { if (e.DisplayValue.ToString().IsEmpty() || e.DisplayValue == null) { return; } if (string.IsNullOrWhiteSpace(e.DisplayValue.ToString())) { return; } if (MessageBox.Show(this, e.DisplayValue + "' ekleniyor emin misiniz?", "Onayla", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } using (var db = new ETSEntities()) { db.GuvenlikNoOncelikDerecesi.Add(new GuvenlikNoOncelikDerecesi { Derece = e.DisplayValue.ToString() }); db.SaveChanges(); } SetGuvenlikNoOncelikDerecesi(); e.Handled = true; }
private void txtOlayYeri_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { if (e.DisplayValue.ToString().IsEmpty() || e.DisplayValue == null) { return; } if (MessageBox.Show(this, e.DisplayValue + "' ekleniyor emin misiniz?", "Onayla", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } using (var db = new ETSEntities()) { db.OlayYerleri.Add(new OlayYerleri { OlayYeri = e.DisplayValue.ToString() }); db.SaveChanges(); } SetOlayYeri(); e.Handled = true; }
private async void ProcessNewToken(DependencyObject d, ProcessNewValueEventArgs e) { string query = e.DisplayText; if (String.IsNullOrEmpty(query)) { return; } switch (Mode) { case TokenMode.Person: List <SearchPerson> people = await App.Repository.SearchPersonAsync(query); SearchPeople(people, query); break; case TokenMode.Keyword: List <SearchKeyword> keywords = await App.Repository.SearchKeywordAsync(query); SearchKeywords(keywords, query); break; case TokenMode.Company: List <SearchCompany> companies = await App.Repository.SearchCompanyAsync(query); SearchCompanies(companies, query); break; } }
protected internal virtual void RaiseProcessNewValue(ProcessNewValueEventArgs e) { ProcessNewValueEventHandler handler = (ProcessNewValueEventHandler)Events[processNewValue]; if (handler != null) { handler(GetEventSender(), e); } }
private void lookUpEdit1_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { if(string.IsNullOrEmpty(e.DisplayValue.ToString())) return; var bl = new BlProfileNames(); if(bl.DoSave(lookUpEdit1.Text)=="1") { dsMaster1.Merge(ClsGetData.LoadProfileNameMast()); } e.Handled = true; }
private void lkUpOrganization_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { Dictionary <string, string> parameters = null; decimal pkId; DataRow dr = null; DataTable source = null; try { if (e.DisplayValue == null || string.IsNullOrEmpty(e.DisplayValue.ToString().Trim()) || string.Empty.Equals(e.DisplayValue)) { return; } pkId = Tool.NewPkId(); parameters = new Dictionary <string, string>(); parameters.Add("PKID", pkId.ToString()); parameters.Add("PARENTPKID", lkUpLocation.EditValue.ToString()); parameters.Add("NAME", string.Format("N'{0}'", e.DisplayValue.ToString())); parameters.Add("CREATEDBY", Tool.userStaffId.ToString()); parameters.Add("CREATEDDATE", string.Format("'{0}'", Tool.ConvertDateTime(DateTime.Now))); parameters.Add("STATUS", "'Y'"); SqlConnector.Insert(dbName, "OrganizationType", parameters); dr = organizationDt.NewRow(); dr["PKID"] = pkId; dr["PARENTPKID"] = lkUpLocation.EditValue; dr["NAME"] = e.DisplayValue; organizationDt.Rows.Add(dr); source = lkUpOrganization.Properties.DataSource as DataTable; if (source != null) { dr = source.NewRow(); dr["PKID"] = pkId; dr["PARENTPKID"] = lkUpLocation.EditValue; dr["NAME"] = e.DisplayValue; source.Rows.Add(dr); lkUpOrganization.Refresh(); } e.Handled = true; } catch (MofException ex) { System.Diagnostics.Debug.WriteLine("Байгууллагын бүртгэлийг нэмэхэд алдаа гарлаа: " + ex.Message); Tool.ShowError(ex.Message, ex.InnerException.Message); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine("Байгууллагын бүртгэлийг нэмэхэд алдаа гарлаа: " + ex.Message); Tool.ShowError("Байгууллагын бүртгэлийг нэмэхэд алдаа гарлаа!", ex.Message); } finally { parameters = null; dr = null; source = null; } }
private void cbxParamValue_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { LookUpEdit lookUpEdit = sender as LookUpEdit; DataTable table = lookUpEdit.Properties.DataSource as DataTable; string value = e.DisplayValue.ToString(); table.Rows.Add(new object[] { value, value, table.Rows.Count, value }).ToString(); table.AcceptChanges(); e.DisplayValue = value; e.Handled = true; }
private void serverLookUpEdit_ProcessNewValue(System.Object sender, ProcessNewValueEventArgs e) { DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit edit = ((LookUpEdit)sender).Properties; if (e.DisplayValue.ToString() == edit.NullText || string.IsNullOrEmpty(e.DisplayValue.ToString())) { return; } m_Servers.Add(e.DisplayValue); e.Handled = true; }
protected override void OnValidating(CancelEventArgs e) { base.OnValidating(e); if (Properties.GetNodeByText(filterText) == null && filterText != "") { ProcessNewValueEventArgs ee = new ProcessNewValueEventArgs(filterText); Properties.RaiseProcessNewValue(ee); if (ee.Handled) { EditValue = Properties.GetNodeByText(filterText)[Properties.ValueMember]; } } HidePopup(); }
private static void LookUp_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { GridLookUpEdit look = sender as GridLookUpEdit; if (look == null) { return; } if (string.IsNullOrEmpty(Convert.ToString(e.DisplayValue))) { look.EditValue = null; } }
public override void ProcessKeyDown(KeyEventArgs e) { base.ProcessKeyDown(e); string dispVal = (OwnerEdit as TreeListLookUpEdit).GetFilterText(); switch (e.KeyCode) { case Keys.Enter: if (Properties.GetNodeByEditValue(dispVal) == null && dispVal != "") { ProcessNewValueEventArgs ee = new ProcessNewValueEventArgs(dispVal); Properties.RaiseProcessNewValue(ee); if (ee.Handled) { OwnerEdit.EditValue = Properties.GetNodeByText(dispVal)[Properties.ValueMember]; } } (this.OwnerEdit as TreeListLookUpEdit).HidePopup(); break; case Keys.Down: if (TreeList.Focused == false) { TreeList.Focus(); if (TreeList.Nodes.Count != 0) { if (TreeList.FocusedNode.NextNode != null && TreeList.FocusedNode.NextNode.Visible == true) { TreeList.FocusedNode = TreeList.FocusedNode.NextNode; } } } break; case Keys.Up: if (TreeList.Focused == false) { TreeList.Focus(); if (TreeList.Nodes.Count != 0) { if (TreeList.FocusedNode.PrevNode != null && TreeList.FocusedNode.PrevNode.Visible == true) { TreeList.FocusedNode = TreeList.FocusedNode.PrevNode; } } } break; } }
private void gridLookUpEdit_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { var sender1 = ((GridLookUpEdit)sender); if (sender1 != null) { var Edit = sender1.Properties; if (e.DisplayValue == null || Edit.NullText.Equals(e.DisplayValue) || string.Empty.Equals(e.DisplayValue)) { return; } if (newDate != null) { newDate(e.DisplayValue.ToString()); } e.Handled = true; } }
private void CbxActId_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { try { if (e.DisplayValue == null || string.Empty.Equals(e.DisplayValue)) { return; } DataRow dr = dtActId.NewRow(); dr["COD_ID"] = e.DisplayValue; dr["COD_DESC"] = e.DisplayValue; dtActId.Rows.Add(dr); e.Handled = true; } catch (Exception ex) { throw ex; } }
/// <summary> /// Yeni ilgili birim /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void txtIlgiliBirim_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { if (string.IsNullOrWhiteSpace(e.DisplayValue.ToString())) { return; } if (MessageBox.Show(this, e.DisplayValue + "' ekleniyor emin misiniz?", "Onayla", MessageBoxButtons.YesNo) != DialogResult.Yes) { return; } using (var db = new ETSEntities()) { db.Birimler.Add(new Birimler { Birim = e.DisplayValue.ToString() }); db.SaveChanges(); } SetBirimler(); e.Handled = true; }
void ykgridLookUp_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { GridLookUpEdit ykgridLookUp = sender as GridLookUpEdit; string displayName = ykgridLookUp.Properties.DisplayMember; string valueName = ykgridLookUp.Properties.ValueMember; string display = e.DisplayValue.ToString(); List <InputItem> listData = ykgridLookUp.Properties.DataSource as List <InputItem>; if (listData != null) { int dataCount = listData.Where(i => i.DisPlayName == display).Count(); if (dataCount == 0) { InputItem item = new InputItem { DisPlayName = display, Value = display }; listData.Add(item); ykgridLookUp.EditValue = display; } } }
void gridLookUpEdit3_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { string displayName = gridLookUpEdit3.Properties.DisplayMember; string valueName = gridLookUpEdit3.Properties.ValueMember; string display = e.DisplayValue.ToString(); DataTable dtTemp = gridLookUpEdit3.Properties.DataSource as DataTable; if (dtTemp != null) { DataRow[] selectedRows = dtTemp.Select(string.Format("{0}='{1}'", displayName, display.Replace("'", "‘"))); if (selectedRows == null || selectedRows.Length == 0) { DataRow row = dtTemp.NewRow(); row[displayName] = display; row[valueName] = display; dtTemp.Rows.Add(row); dtTemp.AcceptChanges(); } } e.Handled = true; }
void cmb_ProcessNewValue(DependencyObject sender, ProcessNewValueEventArgs e) { // Добавление елемента в список. ObservableCollection<string> itemsSource = ItemsSource as ObservableCollection<string>; if (itemsSource != null && !itemsSource.Contains(e.DisplayText)) { itemsSource.Add(e.DisplayText); e.Handled = true; } }
private void lookupbankname_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { if (string.IsNullOrEmpty(e.DisplayValue.ToString())) return; var bl = new BlBanks(); if (bl.DoSave(lookupbankname.Text) == "1") { dsMaster1.Merge(bl.GetBankName()); } e.Handled = true; }
private void gridlokYXCF1_ProcessNewValue(object sender, ProcessNewValueEventArgs e) { string strDisplay = e.DisplayValue.ToString(); this.DataTableDispaly(strDisplay); e.Handled = true; }