Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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();
                }
            }
        }
Esempio n. 3
0
 public int GetAllContoCount(int id, CSearchAcc cSearchAcc)
 {
     return(RealDataContext.GetAllContoCount(id, cSearchAcc));
 }
Esempio n. 4
0
 public IEnumerable <Conto> GetAllContoWithDdsAndNot(int id, CSearchAcc mask, string cl, string num)
 {
     return(RealDataContext.GetAllContoWithDdsAndNot(id, mask, cl, num));
 }
Esempio n. 5
0
 public IEnumerable <Conto> GetAllContoWithoutDds(int p, CSearchAcc cSearchAcc, int tipdnev)
 {
     return(RealDataContext.GetAllContoWithoutDds(p, cSearchAcc, tipdnev));
 }