protected override void Add() { //AllConto = // new ObservableCollection<Conto>(Context.GetAllConto(ConfigTempoSinglenton.GetInstance().CurrentFirma.Id,this)); //RefreshConto(AllConto); CSearchAcc ac = new CSearchAcc(); CopyInterface(this, ac); Entrence.Mask = ac; }
private void SaveMask() { // Create OpenFileDialog Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog(); // Set filter for file extension and default file extension dlg.FileName = "Маск"; dlg.DefaultExt = ".bin"; // Display OpenFileDialog by calling ShowDialog method bool?result = dlg.ShowDialog(); // Get the selected file name and display in a TextBox if (result == true) { // Open document CSearchAcc ac = new CSearchAcc(); CopyInterface(vm, ac); string filename = dlg.FileName; //SerializeUtil.SerializeToXML<CSearchAcc>(filename, ac); FileStream fs = new FileStream(filename, FileMode.Create); // Construct a BinaryFormatter and use it to serialize the data to the stream. BinaryFormatter formatter = new BinaryFormatter(); try { formatter.Serialize(fs, ac); } catch (SerializationException e) { MessageBoxWrapper.Show("Failed to serialize. Reason: " + e.Message); throw; } finally { fs.Close(); } } }
public int GetAllContoCount(int id, CSearchAcc cSearchAcc) { return(RealDataContext.GetAllContoCount(id, cSearchAcc)); }
public IEnumerable <Conto> GetAllContoWithDdsAndNot(int id, CSearchAcc mask, string cl, string num) { return(RealDataContext.GetAllContoWithDdsAndNot(id, mask, cl, num)); }
public IEnumerable <Conto> GetAllContoWithoutDds(int p, CSearchAcc cSearchAcc, int tipdnev) { return(RealDataContext.GetAllContoWithoutDds(p, cSearchAcc, tipdnev)); }