Ejemplo n.º 1
0
 protected void EmpireAdjustmentRadGrid_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     EmpireAdjustmentRadGrid.Rebind();
     TotalDemandRadGrid.Rebind();
     TotalRevenueRadGridDataSource.DataBind();
     TotalRevenueRadGrid.Rebind();
 }
        protected void grdUsuarios_ItemUpdated(object source, GridUpdatedEventArgs e)
        {
            try
            {
                GridEditableItem item = e.Item as GridEditableItem;
                string userId = item.GetDataKeyValue("USER_ID").ToString();

                Connection conexion = new Connection();
                conexion.Actualizar(String.Format("UPDATE USUARIOS SET P_EXPIRATION = '{0}' WHERE USER_ID = '{1}'", DateTime.Now.AddMonths(1).ToString("yyyMMdd"), userId));

                if (e.Exception != null)
                {
                    e.KeepInEditMode = true;
                    e.ExceptionHandled = true;
                    RadAjaxManager1.ResponseScripts.Add(String.Format("errorEdicion('{0}');", e.Exception.Message.ToString()));
                }
                else
                {
                    RadAjaxManager1.ResponseScripts.Add(String.Format("alert('Usuario actualizado.');"));
                }
            }
            catch (Exception error)
            {
                RadAjaxManager1.ResponseScripts.Add(String.Format("errorEnvio('{0}');", error.Message));
            }
        }
Ejemplo n.º 3
0
 protected void MnemonicBasePartRadGrid_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     CSMDemandRadGrid.Rebind();
     AdjustedCSMDemandRadGrid.Rebind();
     EmpireFactorRadGrid.Rebind();
     EmpireAdjustmentRadGrid.Rebind();
     TotalDemandRadGrid.Rebind();
     TotalRevenueRadGrid.Rebind();
 }
 protected void grid_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
         e.KeepInEditMode   = true;
         ntf.Show("Cannot update! check the data again");
     }
 }
Ejemplo n.º 5
0
 protected void productsGrid_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
         ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.error('" + e.Exception.Message.Replace("'", "").Replace("\r\n", "") + "', 'Error');", true);
     }
     else
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.success('Updated Successfully', 'Success');", true);
     }
 }
Ejemplo n.º 6
0
 protected void tabGrid_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
         ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.error('Tabernacle name already exist...Cannot Update', 'Error');", true);
     }
     else
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "", "toastr.success('Updated Successfully', 'Success');", true);
     }
 }
 protected void RadGrid1_ItemUpdated(object source, GridUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.ExceptionHandled = true;
     }
     else
     {
         string NameOld = e.Item.SavedOldValues["Name"].ToString();
         string NameNew = e.Item.GetDataKeyValue("Name").ToString();
     }
 }
Ejemplo n.º 8
0
 protected void CageTypesRadGrid_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.KeepInEditMode   = true;
         e.ExceptionHandled = true;
         DisplayMessage(true, "Cage " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["cage_type_id"] + " cannot be updated. Reason: " + e.Exception.Message);
     }
     else
     {
         DisplayMessage(false, "Cage " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["cage_type_id"] + " updated");
     }
 }
Ejemplo n.º 9
0
 protected void LanesRadGrid_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.KeepInEditMode   = true;
         e.ExceptionHandled = true;
         DisplayMessage(true, "Unable to (re)assign cage type to lane " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["lane_id"] + ". Reason: " + e.Exception.Message);
     }
     else
     {
         DisplayMessage(false, "Lane " + e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["lane_id"] + " cage type assigned");
     }
 }
Ejemplo n.º 10
0
        protected void gridValidity_ItemUpdated(object sender, GridUpdatedEventArgs e)
        {
            GridDataItem dataItem = (GridDataItem)e.Item;
            String       id       = dataItem.GetDataKeyValue("Record_Id").ToString();

            if (e.Exception != null)
            {
                e.ExceptionHandled = true;
                NotifyUser("Item with ID " + id + " cannot be deleted. Reason: " + e.Exception.Message);
            }
            else
            {
                NotifyUser("Item with ID " + id + " is deleted!");
            }
        }
Ejemplo n.º 11
0
        protected void RadGrid1_ItemUpdated(object sender, GridUpdatedEventArgs e)
        {
            string radalertscript = "";

            if (e.Exception != null)
            {
                radalertscript = "<script language='javascript'>function f(){radalert('There was an error updating this record...', 230, 110); Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</script>";
            }
            else
            {
                radalertscript = "<script language='javascript'>function f(){radalert('Record updated!', 230, 110); Sys.Application.remove_load(f);}; Sys.Application.add_load(f);</script>";
            }

            Page.ClientScript.RegisterStartupScript(this.GetType(), "radalert", radalertscript);
            e.KeepInEditMode = true;
        }
Ejemplo n.º 12
0
        protected void RadGrid1_ItemUpdated(object sender, GridUpdatedEventArgs e)
        {
            var item = e.Item;
            var id   = item.GetDataKeyValue("UserId").ToString();

            if (e.Exception != null)
            {
                e.KeepInEditMode   = true;
                e.ExceptionHandled = true;
                SetMessage("El registro con ID: # <strong>" + id + "</strong> no pudo ser actualizado. Error: " + e.Exception.Message + " TRACE: " + e.Exception.StackTrace);
            }
            else
            {
                SetMessage("Registro actualizado!");
            }
        }
Ejemplo n.º 13
0
 protected void CsmDemandRadGrid_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     CSMDemandRadGridDataSource.DataBind();
     CSMDemandRadGrid.Rebind();
     EmpireFactorRadGridDataSource.DataBind();
     EmpireFactorRadGrid.Rebind();
     AdjustedCSMDemandRadGridDataSource.DataBind();
     AdjustedCSMDemandRadGrid.Rebind();
     EmpireAdjustmentRadGridDataSource.DataBind();
     EmpireAdjustmentRadGrid.Rebind();
     TotalDemandRadGridDataSource.DataBind();
     TotalDemandRadGrid.Rebind();
     TotalRevenueRadGridDataSource.DataBind();
     TotalRevenueRadGrid.Rebind();
     TotalMaterialRadGridDataSource.DataBind();
     TotalMaterialRadGrid.Rebind();
 }
Ejemplo n.º 14
0
        protected void RadGrid1_ItemUpdated(object sender, GridUpdatedEventArgs e)
        {
            GridEditableItem item = (GridEditableItem)e.Item;

            //String id = item.GetDataKeyValue("ID").ToString();
            //double Sales = Convert.ToDouble(item["SALES"].ToString());
            if (e.Exception != null)
            {
                e.KeepInEditMode   = true;
                e.ExceptionHandled = true;
                //NotifyUser("Product with ID " + id + " cannot be updated. Reason: " + e.Exception.Message);
            }
            else
            {
                //NotifyUser("Product with ID " + id + " is updated!");
                //item["CLOSING"].Text = ( Convert.ToDecimal(item["CLOSING"].Text) - Convert.ToDecimal(item["SALES"].Text)).ToString();
            }
        }
Ejemplo n.º 15
0
 protected void RadTaskGrid_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     RadTaskGrid.Rebind();
 }
Ejemplo n.º 16
0
 protected void RadGrid2_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
 }
 protected void RadGridEditor_ItemUpdated(object source, GridUpdatedEventArgs e)
 {
     if (e.Exception != null)
     {
         e.KeepInEditMode = true;
         e.ExceptionHandled = true;
         SqlException ex = e.Exception as SqlException;
         if (ex == null)
             DisplayMessage("لم نتمكن من تعديل الصف وذلك بسبب:  " + Environment.NewLine + e.Exception.Message);
         else
             DisplayMessage("لم نتمكن من تعديل الصف وذلك بسبب:  " + Environment.NewLine + MC.CheckExp(ex));
     }
     else
         DisplayMessage("تم التعديل");
 }
Ejemplo n.º 18
0
 protected void RadGrid1_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
 }
Ejemplo n.º 19
0
 protected void RadGrid3_ItemUpdated(object sender, GridUpdatedEventArgs e)
 {
     RadGrid3.Rebind();
 }
Ejemplo n.º 20
0
 //protected void _grdUnit_EditCommand(object source, GridCommandEventArgs e)
 //{
 //    _lblMessage.Text = "Oklllllllllll";
 //}
 protected void _grdUserUnit_ItemUpdated(object source, GridUpdatedEventArgs e)
 {
 }