/*
          Metodo para actualizar un brand
          */
        private void updateBrandAux()
        {
            if (HttpContext.Current.Session["BrandGroupId"] != null)
            {

                string value = valueBrand.Text;
                if (value != "")
                {

                    String reason = Session["reason"].ToString();
                    String user = Context.User.Identity.Name;
                    AuditDataFromWeb audit = new AuditDataFromWeb();
                    audit.Reason = reason;
                    audit.StationIP = General.getIp(this.Page);
                    audit.UserName = user;

                    EquipmentService equipmentService = new EquipmentService();
                    BrandView brandView = new BrandView();

                    brandView.BrandId = Int32.Parse(HttpContext.Current.Session["BrandGroupId"].ToString());
                    brandView.BrandName = value;

                    CUDView crud = equipmentService.updateBrand(brandView, audit);

                    if (crud.update == false)
                    {
                        this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Could not update the Value')", true);
                    }
                    else
                    {
                        valueBrand.Text = "";
                        fillBrandGroupTable();
                        updateBrandModal.Update();
                    }
                    HttpContext.Current.Session["operation"] = "create";
                    showBrandModal();
                }
            }
        }
        protected void updateBrand_Click(object sender, EventArgs e)
        {
            if (HttpContext.Current.Session["BrandGroupId"] != null)
            {

                string value = valueBrand.Text;
                if (value != "")
                {
                    EquipmentService equipmentService = new EquipmentService();
                    BrandView brandView = new BrandView();

                    brandView.BrandId = Int32.Parse(HttpContext.Current.Session["BrandGroupId"].ToString());
                    brandView.BrandName = value;

                    CUDView crud = equipmentService.updateBrand(brandView);

                    if (crud.update == false)
                    {
                        this.Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Could not update the Value')", true);
                    }
                    else
                    {
                        valueBrand.Text = "";
                        fillBrandGroupTable();
                        updateBrandModal.Update();
                    }
                }
            }
        }