/*
        Metodo que inserta las unidades desde la ventana de add units
        */
        protected void addUnit_Click(object sender, EventArgs e)
        {
            string Name = UnitName.Text;
            string Symbol = UnitSymbol.Text;

            if (Name != "" & Symbol != "")
            {
                ParameterService parameterService = new ParameterService();
                UnitsInsertView unit = new UnitsInsertView();
                unit.UnitName = Name;
                unit.UnitSymbol = Symbol;

                String user = Context.User.Identity.Name;
                AuditDataFromWeb audit = new AuditDataFromWeb();
                audit.Reason = "N/A";
                audit.StationIP = General.getIp(this.Page);
                audit.UserName = user;

                CUDView crud = parameterService.insertUnits(unit, audit);

                if (crud.insert == false)
                {
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Could not insert the Value')", true);
                }
                else
                {
                    UnitName.Text = "";
                    UnitSymbol.Text = "";

                    fillUnitGroupTable();
                    updateUnitModal.Update();
                }

            }
        }
        protected void addUnit_Click(object sender, EventArgs e)
        {
            string Name = UnitName.Text;
            string Symbol = UnitSymbol.Text;

            if (Name != "" & Symbol != "")
            {
                ParameterService parameterService = new ParameterService();
                UnitsInsertView unit = new UnitsInsertView();
                unit.UnitName = Name;
                unit.UnitSymbol = Symbol;

                CUDView crud = parameterService.insertUnits(unit);

                if (crud.insert == false)
                {
                    this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Could not insert the Value')", true);
                }
                else
                {
                    UnitName.Text = "";
                    UnitSymbol.Text = "";

                    fillUnitGroupTable();
                    updateUnitModal.Update();
                }

            }
        }