Esempio n. 1
0
        public HeronValue LookupName(string s)
        {
            HeronValue r = CurrentFrame.LookupName(s);

            if (r != null)
            {
                return(r);
            }

            if (CurrentModuleDef != null)
            {
                foreach (HeronType t in CurrentModuleDef.GetTypes())
                {
                    if (t.name == s)
                    {
                        return(new TypeValue(t));
                    }
                }
            }

            if (GlobalModule != null)
            {
                foreach (HeronType t in GlobalModule.GetTypes())
                {
                    if (t.name == s)
                    {
                        return(new TypeValue(t));
                    }
                }
            }

            throw new Exception("Could not find '" + s + "' in the environment");
        }
Esempio n. 2
0
        public void TestHandleFloatLiteral()
        {
            GlobalModule m = new GlobalModule();

            Word w;
            bool found = m.TryFindWord("3.14", out w);

            Assert.AreEqual(true, found);
        }
        public async void TestAddGlobal()
        {
            await this.SetUp();

            const string Expected = @"expected_addglobal.config";

            Assert.Equal(37, _feature.GlobalModules.Count);

            var item = new GlobalModule(null);

            item.Name  = "test";
            item.Image = "test";
            _feature.AddGlobal(item);
            Assert.Equal(38, _feature.GlobalModules.Count);
            XmlAssert.Equal(Path.Combine("Modules", Expected), Current);
        }
Esempio n. 4
0
    private void Start()
    {
        _instance = this;
        DontDestroyOnLoad(gameObject);

        _fHeightForBubblingHint = _goBubbling.GetComponent <UIWidget>().localSize.y;
        _fMoveY = _fHeightForBubblingHint + 5f;

        //为其赋值
        for (int i = 0; i < _goBubblingBase.childCount; i++)
        {
            GameObject go = _goBubblingBase.GetChild(i).gameObject;
            _listBubbling.Add(go);
            go.SetActive(false);
        }
    }
Esempio n. 5
0
        public void TestRemoveGlobal()
        {
            SetUp();
            const string Expected = @"expected_removeglobal.config";

            var document = XDocument.Load(Current);

            document.Save(Expected);

            Assert.Equal(37, _feature.GlobalModules.Count);

            var item = new GlobalModule(null);

            item.Name  = "test";
            item.Image = "test";
            _feature.AddGlobal(item);
            Assert.Equal(38, _feature.GlobalModules.Count);

            _feature.RemoveGlobal(item);
            Assert.Equal(37, _feature.GlobalModules.Count);
            XmlAssert.Equal(Expected, Current);
        }
Esempio n. 6
0
        IVbModule IAnalyzer.Analyze(TokenStreamReader reader)
        {
            var attributes = AnalyzerTools.GetAttributes(reader).ToDictionary(_ => _.Name);

            GlobalModule mod = new GlobalModule();
            mod.Visibility = MemberVisibility.Default;
            mod.Name = attributes[AnalyzerConstants.AttributeName_Name].Value;

            foreach (IVbAttribute attribute in attributes.Values)
            {
                mod.AddMember(attribute);
            }
            foreach (IVbField field in AnalyzerTools.GetFields(reader.Rewind()))
            {
                mod.AddMember(field);
            }
            foreach (IVbMethod method in AnalyzerTools.GetMethods(reader.Rewind()))
            {
                mod.AddMember(method);
            }

            return mod;
        }
Esempio n. 7
0
        public void TestAddGlobal()
        {
            SetUp();
            const string Expected = @"expected_addglobal.config";
            var          document = XDocument.Load(Current);
            var          node     = document.Root?.XPathSelectElement("/configuration/system.webServer/globalModules");

            node?.Add(
                new XElement("add",
                             new XAttribute("name", "test"),
                             new XAttribute("image", "test")));
            document.Save(Expected);

            Assert.Equal(37, _feature.GlobalModules.Count);

            var item = new GlobalModule(null);

            item.Name  = "test";
            item.Image = "test";
            _feature.AddGlobal(item);
            Assert.Equal(38, _feature.GlobalModules.Count);
            XmlAssert.Equal(Expected, Current);
        }
        IVbModule IAnalyzer.Analyze(TokenStreamReader reader)
        {
            var attributes = AnalyzerTools.GetAttributes(reader).ToDictionary(_ => _.Name);

            GlobalModule mod = new GlobalModule();

            mod.Visibility = MemberVisibility.Default;
            mod.Name       = attributes[AnalyzerConstants.AttributeName_Name].Value;

            foreach (IVbAttribute attribute in attributes.Values)
            {
                mod.AddMember(attribute);
            }
            foreach (IVbField field in AnalyzerTools.GetFields(reader.Rewind()))
            {
                mod.AddMember(field);
            }
            foreach (IVbMethod method in AnalyzerTools.GetMethods(reader.Rewind()))
            {
                mod.AddMember(method);
            }

            return(mod);
        }
        private bool fncGuardar()
        {
            string str1  = "1";
            string str2  = "1";
            string sSQL  = "";
            string sSQL2 = "";
            string sSQL3 = "";
            string sSQL4 = "";
            string sSQL5 = "";
            string sSQL6 = "";

            //if (fncValidar() == false)
            //    return false;

            List <SqlParameter> pars  = new List <SqlParameter>();
            List <SqlParameter> pars2 = new List <SqlParameter>();
            List <SqlParameter> pars3 = new List <SqlParameter>();

            //RadWindow.Alert(new DialogParameters()
            //{
            //    Content = "Producto Guardado \n\n o Exitosamente del sistema",
            //    Header = "GGGC"
            //    // IconContent = "";
            //});
            //            RadMessageBox.Show(this, "My Message", "Window title",
            //MessageBoxButton.OK, MessageBoxImage.Information);
            try
            {
                string strOrderID    = strFolioOrden;
                string strCustomerID = customerInfo.CustomerID;

                string   strPrefix             = "P";
                string   strSufix              = "S";
                long     lngTicks              = DateTime.Now.Ticks;
                string   strCustomer           = customerInfo.Name;
                string   strInvoiceNumber      = txtPlacas.Text.Trim();
                string   strPaymentConditionID = "0";
                string   strDeliveryMetodID    = "0";
                DateTime dteInvoiceDate        = Convert.ToDateTime(customerInfo.Date); //customerInfo.Date.ToString("d");
                DateTime dteReceptionDate      = customerInfo.DueDate;
                DateTime dteDueDate            = DateTime.Now;
                DateTime dteAccountingDate     = DateTime.Now;
                decimal  decDiscount           = 0;
                int      intOrderQty           = 0;
                decimal  decSubtotal           = 0;
                decimal  decTax           = 0;
                decimal  decTotal         = 0;
                decimal  decRaiting       = 0;
                int      intQuarterID     = 0;
                int      intCompanyID     = Convert.ToInt32(customerInfo.CompanyID);
                byte     bytStoreID       = Convert.ToByte(GlobalModule.ActualStoreID);
                byte     bytRevisioNumber = 0;
                string   strComments      = customerInfo.Observaciones;
                int      intUserID        = GlobalModule.ActualUserID;
                string   strLocalIP       = GlobalModule.GetLocalIP();
                string   strPublicIP      = GlobalModule.getPublicIP();
                string   strSystemInfo    = GlobalModule.GetSystemInfo();
                string   strUserInfo      = GlobalModule.GetUserInfo();
                DateTime dteInsertDate    = DateTime.Now;
                DateTime dteModifiedDate  = DateTime.Now;
                DateTime dteLastUpDate    = DateTime.Now;
                byte     bytStatusID      = 0;
                byte     bytDeleteFlag    = 0;
                Guid     guidRowID        = Guid.NewGuid();

                int zero = 0;

                if (customerInfo.Observaciones == null)
                {
                    strComments = "";
                }

                // Detail
                //  m_items, supplierInfo
                //string strCodigo = this.txtCodigo.Text.Trim();
                //string strID = this.txtID.Text.Trim();
                //string strDesc = this.txtDescripcion.Text.Trim();
                //string strGUID = Guid.NewGuid().ToString();
                //string strObs = "obs";
                //string strMarca = "MMRF";
                //int productID = Convert.ToInt32(this.txtID.Text);
                //double decRin = 0.0;
                //byte bytCero = 0;
                //bool blnCentralesOK = false;
                //bool blnSucursalesOK = false;
                //bool b1 = false, b2 = false, b3 = false, b4 = false, b5 = false, b6 = false, b7 = false, b8 = false, b9 = false, b10 = false, b11 = false, b12 = false, b13 = false, b14 = false, b15 = false;
                //string strLinea = cboLine.SelectedValue.ToString();
                //switch (strLinea)
                //{
                //    case "1":
                //        strLinea = "02001";
                //        break;
                //    default:
                //        strLinea = "02001";
                //        break;
                //}
                if (true)
                {
                    //_idEmpresa = 2;//datos.BaseDatos.SelectMaxID("idEmpresa", "Empresas");
                    //_idSucursal = 6;
                    sSQL = "INSERT INTO mto_SalesOrderHeader ([OrderID], [CustomerID],  [Customer], [EmployeeID], [RFC], [InvoiceNumber], [Prefix],[Sufix],[Ticks], [PaymentConditionID],[DeliveryMethodID],[OrderDate],[DueDate],[RequiredDate], [AccountingDate], [Discount],[OrderQty],[Subtotal],[Tax],[Total],[Raiting],[QuarterID], [CompanyID], [DepartmentID], [VehiculoID], [Vehiculo], [Placas], [Kilometraje], [StoreID],[RevisionNumber],[Comments],[UserID],[LocalIP], [PublicIP],[SystemInfo], [UserInfo],[InsertDate],[ModifiedDate], [LastUpdate], [StatusID],[DeletedFlag],[RowID]) "
                           + "VALUES (@OrderID, @CustomerID, @Customer, @EmployeeID, @Rfc, @InvoiceNumber, @Prefix, @Sufix, @Ticks,   @PaymentConditionID, @DeliveryMethodID, @OrderDate, @DueDate, @RequiredDate, @AccountingDate, @Discount, @OrderQty, @Subtotal, @Tax, @Total, @Raiting, @QuarterID, @CompanyID, @DepartmentID, @VehicleID, @Vehiculo, @Placas, @kilometraje, @StoreID, @RevisionNumber,@Comments, @UserID, @LocalIP, @PublicIP, @SystemInfo, @UserInfo, @InsertDate, @ModifiedDate, @LastUpdate, @StatusID, @DeletedFlag, @RowID  )";
                }
                else
                {
                    //sSQL = "UPDATE Empresas SET Nombre = @Nombre, RFC = @RFC, Calle = @Calle, NumExt = @NumExt, NumInt = @NumInt, Colonia = @Colonia, " +
                    //    "Localidad = @Localidad, Municipio = @Municipio, Estado = @Estado, Pais = @Pais, CP = @CP, Referencia = @Referencia, ModoPrueba = @ModoPrueba, RutaTrabajo = @RutaTrabajo WHERE (idEmpresa = " + _idEmpresa + ")";
                }
                //, , , ,, , , , , , , , , , , @RowID  )";
                pars.Clear();
                pars.Add(new SqlParameter("@OrderID", strOrderID));
                pars.Add(new SqlParameter("@CustomerID", strCustomerID));
                pars.Add(new SqlParameter("@Customer", strCustomer));
                pars.Add(new SqlParameter("@EmployeeID", zero));
                pars.Add(new SqlParameter("@Rfc", ""));
                pars.Add(new SqlParameter("@InvoiceNumber", ""));
                pars.Add(new SqlParameter("@Prefix", strPrefix));
                pars.Add(new SqlParameter("@Sufix", strSufix));
                pars.Add(new SqlParameter("@Ticks", lngTicks));
                pars.Add(new SqlParameter("@PaymentConditionID", strPaymentConditionID));
                pars.Add(new SqlParameter("@DeliveryMethodID", strDeliveryMetodID));
                pars.Add(new SqlParameter("@OrderDate", dteInvoiceDate));
                //pars.Add(new SqlParameter("@ReceptionDate", dteReceptionDate));
                pars.Add(new SqlParameter("@DueDate", dteDueDate));
                pars.Add(new SqlParameter("@RequiredDate", dteDueDate));
                pars.Add(new SqlParameter("@AccountingDate", dteAccountingDate));

                pars.Add(new SqlParameter("@Discount", decDiscount));
                pars.Add(new SqlParameter("@OrderQty", intOrderQty));
                pars.Add(new SqlParameter("@Subtotal", decSubtotal));
                pars.Add(new SqlParameter("@Tax", decTax));
                pars.Add(new SqlParameter("@Total", decTotal));
                pars.Add(new SqlParameter("@Raiting", decRaiting));
                pars.Add(new SqlParameter("@QuarterID", intQuarterID));



                pars.Add(new SqlParameter("@CompanyID", intCompanyID));
                pars.Add(new SqlParameter("@DepartmentID", Convert.ToInt32(customerInfo.SucursalID)));
                pars.Add(new SqlParameter("@VehicleID", Convert.ToInt32(customerInfo.VehiculoID)));
                pars.Add(new SqlParameter("@Vehiculo", customerInfo.Vehiculo));
                pars.Add(new SqlParameter("@Placas", customerInfo.Placas));
                pars.Add(new SqlParameter("@Kilometraje", zero));
                pars.Add(new SqlParameter("@StoreID", bytStoreID));

                pars.Add(new SqlParameter("@RevisionNumber", bytRevisioNumber));
                pars.Add(new SqlParameter("@Comments", strComments));
                pars.Add(new SqlParameter("@UserID", intUserID));
                pars.Add(new SqlParameter("@LocalIP", strLocalIP));
                pars.Add(new SqlParameter("@PublicIP", strPublicIP));
                pars.Add(new SqlParameter("@SystemInfo", strSystemInfo));
                pars.Add(new SqlParameter("@UserInfo", strUserInfo));
                pars.Add(new SqlParameter("@InsertDate", dteInsertDate));
                pars.Add(new SqlParameter("@ModifiedDate", dteModifiedDate));
                pars.Add(new SqlParameter("@LastUpdate", dteLastUpDate));
                pars.Add(new SqlParameter("@DeletedFlag", bytDeleteFlag));
                pars.Add(new SqlParameter("@StatusID", bytStatusID));
                pars.Add(new SqlParameter("@RowID", guidRowID));

                // pars2.Clear();
                AccesoDatos sCen = new AccesoDatos(6);
                sCen.BaseDatos.Ejecuta(sSQL, pars.ToArray());
                pars.Clear();

                //Agregar registros del detalle
                decimal cantidad = 0, valorUnitario = 0, importe = 0;
                string  descripcion, unidad, codigo, obs;
                int     productID = 0;
                int     intZero   = 0;

                int intFilas = m_items.Count;
                for (int i = 0; i < intFilas; i++)
                {
                    productID   = m_items[i].ProductID;
                    codigo      = m_items[i].CodeID;
                    descripcion = m_items[i].ItemName;
                    obs         = m_items[i].Observ;
                    cantidad    = m_items[i].Quantity;
                    importe     = m_items[i].UnitPrice;
                    if (obs == null)
                    {
                        obs = "";
                    }

                    sSQL2 = "INSERT INTO mto_SalesOrderDetail ([SalesOrderID],[SalesOrderDetailID],[ProductID], [CodeID], [ProductDescription], [Comments], [UnitID], [OrderQty], [RejectedQty],[Qty] ,[Discount],[UnitPrice],[ModifiedDate],[LastUpdate],[RowID]) "
                            + "VALUES (@OrderID, @OrderDetailID, @ProductID, @CodeID, @ProductDescription, @Comments, @UnitID, @OrderQty, @RejectedQty, @Qty, @Discount, @UnitPrice, @ModifiedDate, @LastUpdate, @RowID  )";

                    pars.Clear();
                    pars.Add(new SqlParameter("@OrderID", strOrderID));
                    pars.Add(new SqlParameter("@OrderDetailID", i + 1));
                    pars.Add(new SqlParameter("@ProductID", productID));
                    pars.Add(new SqlParameter("@CodeID", codigo));
                    pars.Add(new SqlParameter("@ProductDescription", descripcion));
                    pars.Add(new SqlParameter("@Comments", obs));
                    pars.Add(new SqlParameter("@UnitID", intZero));
                    pars.Add(new SqlParameter("@OrderQty", cantidad));
                    pars.Add(new SqlParameter("@RejectedQty", intZero));
                    pars.Add(new SqlParameter("@Qty", cantidad));
                    pars.Add(new SqlParameter("@Discount", intZero));
                    pars.Add(new SqlParameter("@UnitPrice", importe));
                    pars.Add(new SqlParameter("@ModifiedDate", dteModifiedDate));
                    pars.Add(new SqlParameter("@LastUpdate", DateTime.Now));
                    pars.Add(new SqlParameter("@RowID", Guid.NewGuid()));
                    sCen.BaseDatos.Ejecuta(sSQL2, pars.ToArray());
                    pars.Clear();

                    //datos.BaseDatos.Ejecuta(sSQL, pars.ToArray());
                }


                //sCen.BaseDatos.Ejecuta(sSQL2, pars.ToArray());
                //pars.Clear();

                sCen.BaseDatos.Ejecuta("UPDATE mtto_Config SET SalesOrderID = SalesOrderID + 1", pars.ToArray());
                //Application.Current.Dispatcher.Invoke(new Action(() => updateLabel("Guardando en Servidor LRG...")));

                //this.Dispatcher.Invoke(DispatcherPriority.Normal,
                //      (System.Windows.Forms.MethodInvoker)delegate()
                //           {
                //           });
                //  string strMail = "<p>Alta de Artículo</p> <p>Codigo_De_Articulo:<b> " + productID + "</b></p>" + "<p>Descripción: " + strDesc + "</p> <font color=\"#08088A\"> Fecha:" + DateTime.Now.ToLongDateString() + ", " + DateTime.Now.ToLongTimeString() + "</font> <p>...</p>";
                AccesoDatos sPV = null;
                return(true);
            }

            catch (Exception ex)
            {
                // throw new Exception("Error al Guardar: " + ex.Message);


                //RadWindow.Alert(new DialogParameters()
                //{
                //    Content = "La requisicion puede estar duplicada \n\n o esta pendiente habilitar mas funciones del sistema",
                //    Header = "GGGC"
                //    // IconContent = "";
                //});

                MessageBox.Show("Mensaje error: " + ex.Message);
            }
            return(false);
        }
Esempio n. 10
0
        public void TestConstruction()
        {
            GlobalModule m = new GlobalModule();

            Assert.IsNotNull(m);
        }
Esempio n. 11
0
 public void RegisterDotNetType(Type t)
 {
     GlobalModule.AddDotNetType(t.Name, t);
 }
Esempio n. 12
0
 public void RegisterDotNetType(Type t, string name)
 {
     GlobalModule.AddDotNetType(name, t);
 }
Esempio n. 13
0
        /// <summary>
        /// This exposes a set of globally recognized Heron and .NET
        /// types to the environment (essentially global variables).
        /// A simple way to extend the scope of Heron is to introduce
        /// new types in this function.
        /// </summary>
        private void RegisterPrimitives()
        {
            SortedDictionary <string, HeronType> prims = PrimitiveTypes.GetTypes();

            foreach (string s in prims.Keys)
            {
                GlobalModule.AddPrimitive(s, prims[s]);
            }

            // Math utilities
            RegisterDotNetType(typeof(Math));

            // File system support
            RegisterDotNetType(typeof(File));
            RegisterDotNetType(typeof(Directory));
            RegisterDotNetType(typeof(Path));

            // Low-level OS stuff
            RegisterDotNetType(typeof(Environment));
            RegisterDotNetType(typeof(Environment.SpecialFolder));
            RegisterDotNetType(typeof(Environment.SpecialFolderOption));
            RegisterDotNetType(typeof(EnvironmentVariableTarget));
            RegisterDotNetType(typeof(OperatingSystem));
            RegisterDotNetType(typeof(ProcessorArchitecture));
            RegisterDotNetType(typeof(Process));

            // IO functionality
            RegisterDotNetType(typeof(Console));
            RegisterDotNetType(typeof(StreamReader));
            RegisterDotNetType(typeof(StreamWriter));
            RegisterDotNetType(typeof(TextReader));
            RegisterDotNetType(typeof(TextWriter));

            // Concurrency support
            RegisterDotNetType(typeof(Thread));
            RegisterDotNetType(typeof(Task));

            // Regex functionality supported
            RegisterDotNetType(typeof(System.Text.RegularExpressions.Regex));
            RegisterDotNetType(typeof(System.Text.RegularExpressions.Capture));
            RegisterDotNetType(typeof(System.Text.RegularExpressions.CaptureCollection));
            RegisterDotNetType(typeof(System.Text.RegularExpressions.Group));
            RegisterDotNetType(typeof(System.Text.RegularExpressions.GroupCollection));
            RegisterDotNetType(typeof(System.Text.RegularExpressions.Match));
            RegisterDotNetType(typeof(System.Text.RegularExpressions.MatchCollection));
            RegisterDotNetType(typeof(System.Text.RegularExpressions.RegexOptions));

            // Time and TimeSpan
            RegisterDotNetType(typeof(TimeSpan));
            RegisterDotNetType(typeof(DateTime));

            // Load other libraries specified in the configuration file
            foreach (string lib in Config.libs)
            {
                RegisterAssemblyFile(lib);
            }

            // Load the standard library types
            RegisterDotNetType(typeof(HeronStandardLibrary.Viewport), "Viewport");
            RegisterDotNetType(typeof(HeronStandardLibrary.Util), "Util");
        }
        public EditCatalogServicesViewModel(IServiceFactory serviceFactory, Service obj)
        {
            _ServiceFactory = serviceFactory;

            try
            {
                //13nov 80 898
                GlobalModule.ActualStoreID = "2";
                GlobalModule.ActualUserID  = 898131180;

                int intID = Math.Abs(Guid.NewGuid().GetHashCode());
                //if (intID < 0)
                //    intID = intID * -1;

                _Obj = new Service()
                {
                    EntityKey    = obj.EntityKey,
                    ProductID    = intID,
                    ClassID      = 0,
                    GroupID      = 0,
                    LineID       = 0,
                    BrandID      = 0,
                    UnitID       = 0,
                    CodeID       = "",
                    Description  = "",
                    Prefix       = "SERV",
                    Sufix        = "",
                    TaxID        = 0.16M,
                    OnStock      = 1,
                    Editable     = 0,
                    Comments     = "",
                    UserID       = GlobalModule.ActualUserID,
                    LocalIP      = GlobalModule.GetLocalIP(),
                    PublicIP     = GlobalModule.getPublicIP(),
                    SystemInfo   = GlobalModule.GetSystemInfo(),
                    UserInfo     = GlobalModule.GetUserInfo(),
                    InsertDate   = DateTime.Now,//Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")),
                    ModifiedDate = DateTime.Now,
                    LastUpdate   = DateTime.Now,
                    StatusID     = 0,
                    DeletedFlag  = 0,
                    RowID        = Guid.NewGuid()
                                   //DepartmentID = obj.DepartmentID,
                                   //Subject = "",//obj.Subject, Convert.ToInt32(DateTime.Now.Ticks)
                                   //Body = obj.Body,
                                   //StoreID = Convert.ToByte(GlobalModule.ActualStoreID),
                                   //UserID = GlobalModule.ActualUserID,
                                   //PriorityID = obj.PriorityID,
                                   //OrderStatusID = 1,
                                   //Rating = obj.Rating,
                                   //SystemInfo = GlobalModule.GetSystemInfo(),
                                   //UserInfo = GlobalModule.GetUserInfo(),
                                   //Problem = " ",
                                   //Solution = " ",
                                   //Tags = "",
                                   //LocalIP = GlobalModule.GetLocalIP(),
                                   //PublicIP = GlobalModule.getPublicIP(),
                                   //Comments = "",
                                   //StatusID = 0,
                                   //DeletedFlag = 0,
                                   //ResourcesQty = 0,
                                   //OrderDate = DateTime.Now,
                                   //StartDate = DateTime.Now,
                                   //EndDate = DateTime.Now,
                                   //ClosedDate = DateTime.Now,
                                   //ModifiedDate = DateTime.Now,
                                   //InsertDate = DateTime.Now,//Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")),
                                   //LastUpdate = DateTime.Now,//Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")),
                                   //RowID = obj.RowID
                                   //Guid.NewGuid()
                                   //Color = car.Color,
                                   //Year = car.Year,
                                   //RentalPrice = car.RentalPrice
                };

                if (obj.RowID == Guid.Empty)
                {
                    _Obj.RowID = Guid.NewGuid();
                }
                _Obj.CleanAll();
                //00000000-0000-0000-0000-000000000000
            }
            catch (Exception ex)
            {
                throw new Exception("Error " + ex.ToString());
            }


            SaveCommand   = new DelegateCommand <object>(OnSaveCommandExecute, OnSaveCommandCanExecute);
            CancelCommand = new DelegateCommand <object>(OnCancelCommandExecute);
        }