Exemplo n.º 1
0
 // The following two event handlers illustrate two different techniques you can use to
 // correctly handle deleting when using custom paging with an ObjectDataSource. Currently,
 // these event handlers aren't wired up to any event, so they have no effect. But if you
 // configure the GridView to support deleing, you'll want to use either one of these two
 // approaches so that when a user deletes the last record from a page, the GridView's PageIndex
 // is updated accordingly.
 protected void ObjectDataSource1_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     // If we get back a Boolean value from the DeleteProduct method and it's true, then
     // we successfully deleted the product. Set AffectedRows to 1
     if (e.ReturnValue is bool && ((bool)e.ReturnValue) == true)
         e.AffectedRows = 1;
 }
Exemplo n.º 2
0
 protected void odsCity_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null) {
         PageUtility.DealWithException(this, e.Exception);
         e.ExceptionHandled = true;
     }
 }
Exemplo n.º 3
0
 protected void OdsMap_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (this.MapChanged != null)
     {
         MapChanged(this, new EventArgs());
     }
 }
Exemplo n.º 4
0
 protected void TourDetailDataset_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.ReturnValue != null && e.ReturnValue is int)
     {
         Response.Redirect("TourDetail.aspx?id=" + e.ReturnValue.ToString());
     }
 }
Exemplo n.º 5
0
 protected void odsPeriodReimburse_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null) {
         PageUtility.DealWithException(this, e.Exception);
         e.ExceptionHandled = true;
     }
 }
Exemplo n.º 6
0
    protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
    {
        if (e.AffectedRows == 0)
        {

        }
    }
 protected void ProcessException(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception != null)
     {
         //We can dispaly a message
     }
 }
Exemplo n.º 8
0
	protected void sourceEmployees_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
	{
		if (e.Exception == null)
		{
			lblConfirmation.Text = "Inserted record " + e.ReturnValue.ToString();
		}
	}
Exemplo n.º 9
0
    protected void BookingCancelledObjectDataSource_Updated(object sender, ObjectDataSourceStatusEventArgs e)
    {
        if (e.AffectedRows == -1)
        {

        }
    }
Exemplo n.º 10
0
 protected void ODS_ItemReference_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(this, null);
     }
 }
 protected void BusinessManagerDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (this.grdSystemParameters.Rows.Count <= 0)
     {
         this.frmSystemParameter.Visible = true;
         this.grdSystemParameters.Visible = false;
     }
 }
Exemplo n.º 12
0
 protected void ODS_Routing_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(routing.Code, e);
         ShowSuccessMessage("MasterData.Routing.Insert.Successfully", routing.Code);
     }
 }
Exemplo n.º 13
0
 protected void PendingAds_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     AdsDataComponent.AdsDataTable inactiveAds = e.ReturnValue as AdsDataComponent.AdsDataTable;
     if (inactiveAds != null && inactiveAds.Rows.Count > 0)
         ActivationAdsPanel.Visible = true;
     else
         ActivationAdsPanel.Visible = false;
 }
Exemplo n.º 14
0
 protected void ODS_TransportationAddress_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(transportationAddress.Id.ToString(), e);
         ShowSuccessMessage("Transportation.TransportationAddress.AddTransportationAddress.Successfully");
     }
 }
Exemplo n.º 15
0
 protected void ODS_Supplier_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(supplier.Code, e);
         ShowSuccessMessage("MasterData.Supplier.AddSupplier.Successfully", supplier.Code);
     }
 }
Exemplo n.º 16
0
 protected void ObjectDataSourceArchive_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception == null)
     {
         if (e.AffectedRows == -1)
             nrofBookingsArchived++;
     }
 }
Exemplo n.º 17
0
 protected void ODS_Flow_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(flow.Code, e);
         ShowSuccessMessage("MasterData.Flow.AddFlow.Successfully", flow.Code);
     }
 }
Exemplo n.º 18
0
 protected void ODS_Employee_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(employee.Code, e);
         ShowSuccessMessage("MasterData.Employee.AddEmployee.Successfully", employee.Code);
     }
 }
Exemplo n.º 19
0
 protected void ODS_SpecialTime_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(specialTime.ID.ToString(), e);
         ShowSuccessMessage("MasterData.WorkCalendar.Insert.Successfully");
     }
 }
Exemplo n.º 20
0
 protected void ODS_Role_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(role.Code, e);
         ShowSuccessMessage("Security.Role.AddRole.Successfully", role.Code);
     }
 }
 protected void odsManterItem_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (e.Exception == null)
     {
         DadosWeb.AtribuirMensagem(MensagemWeb.MensagemAlteradoSucesso);
         btnPesquisar_Click(sender, (EventArgs)e);
     }
 }
Exemplo n.º 22
0
 protected void ODS_TransportPriceList_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(transportPriceList.Code, e);
         ShowSuccessMessage("Transportation.TransportPriceList.AddTransportPriceList.Successfully", transportPriceList.Code);
     }
 }
Exemplo n.º 23
0
 protected void ODS_Client_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(client.ClientId, e);
         ShowSuccessMessage("MasterData.Client.AddClient.Successfully", client.ClientId);
     }
 }
Exemplo n.º 24
0
 protected void odsDeducibles_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (((DataTable)e.ReturnValue).Rows.Count == 0)
     {
         btnGuardar.Visible = false;
     }
     else btnGuardar.Visible = true;
 }
Exemplo n.º 25
0
 protected void ODS_ShiftDetail_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (EditEvent != null)
     {
         EditEvent(this, null);
     }
     ShowSuccessMessage("MasterData.WorkCalendar.Update.Successfully");
 }
Exemplo n.º 26
0
 protected void ODS_Shift_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(shift.Code, e);
         ShowSuccessMessage("MasterData.WorkCalendar.Insert.Successfully");
     }
 }
Exemplo n.º 27
0
 protected void ODS_Item_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(item.Code, e);
         ShowSuccessMessage("MasterData.Item.AddItem.Successfully", item.Code);
     }
 }
Exemplo n.º 28
0
 protected void ODS_Location_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(location.Code + "," + location.EnableAdvWM, e);
         ShowSuccessMessage("MasterData.Location.AddLocation.Successfully", location.Code);
     }
 }
Exemplo n.º 29
0
 protected void odsDocumentosSolicitados_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     divDocumentacionSolicitada.Visible = (((DataTable)e.ReturnValue).Rows.Count > 0);
     if (!divDocumentacionSolicitada.Visible)
     {
         InvokeEmpty(new EventArgs());
     }
 }
Exemplo n.º 30
0
 protected void ODS_Payment_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     if (CreateEvent != null)
     {
         CreateEvent(payment.PaymentNo, e);
         ShowSuccessMessage("MasterData.Payment.AddPayment.Successfully", payment.PaymentNo);
     }
 }
Exemplo n.º 31
0
 protected void ODS_Role_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     ShowSuccessMessage("Security.Role.UpdateRole.Successfully", RoleCode);
     //UpdateUserLastModifyDate();
 }
Exemplo n.º 32
0
 /// <summary>
 /// Сайт добавлен
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void controlTypeProject_SiteInserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     lvList.DataBind();
 }
Exemplo n.º 33
0
 protected void dsManutencao_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     Response.Redirect(String.Format("{0}/Paginas/Manutencao/Cidade.aspx?ID={1}", ProJur.DataAccess.Configuracao.getEnderecoVirtualSite(), e.ReturnValue));
 }
Exemplo n.º 34
0
 protected void SP_DPS_City_Info_ALL_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
 }
Exemplo n.º 35
0
 protected void objDsEmployer_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     //DetailsView Select Event has not been raised after submit/postback
     //so we need the following code to force the ASP.NET to fetch data again
     Response.Redirect("EmployerProfile.aspx");
 }
Exemplo n.º 36
0
 protected void dvDataSource_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
 }
Exemplo n.º 37
0
 protected void odsUserInRoles_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     cboRoles.DataBind();
     Page.ClientScript.RegisterStartupScript(this.GetType(), "ResetMenu", "top.ResetMenu();", true);
 }
Exemplo n.º 38
0
 protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     RmsOA.MODEL.GK_OA_MaterialTransferModel manpowerneedModel = ((List <RmsOA.MODEL.GK_OA_MaterialTransferModel>)e.ReturnValue)[0];
     this.ApplicationTitle = "固定资产/低耗品转移";
     //this.UnitCode = manpowerneedModel.UnitCode;
 }
Exemplo n.º 39
0
 /// <summary>
 /// Сайт удален
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void controlSite_SiteDeleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     lvSite.DataBind();
 }
Exemplo n.º 40
0
 protected void SelectedCheckForException(object sender, ObjectDataSourceStatusEventArgs e)
 {
     MessageUserControl.HandleDataBoundException(e); //just displays nothing if there is no exception
 }
 protected void getAndUpdateSubject_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     BusinessLayer.SharedMethods.SetMessage(e, ref lblMessage);
 }
 protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     RmsOA.MODEL.GK_OA_OfficialSealRegiesterModel manpowerneedModel = ((List <RmsOA.MODEL.GK_OA_OfficialSealRegiesterModel>)e.ReturnValue)[0];
     this.ApplicationTitle = manpowerneedModel.Detail + "-公章使用流程审批";
     this.UnitCode         = manpowerneedModel.UnitCode;
 }
Exemplo n.º 43
0
 protected void dsProcessoPeca_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     idProcessoPeca = e.ReturnValue.ToString();
 }
Exemplo n.º 44
0
 protected void ODS_TransportPriceListDetail_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     ShowSuccessMessage("Transportation.TransportPriceListDetail.UpdateWarehouseLease.Successfully");
     btnBack_Click(this, e);
 }
Exemplo n.º 45
0
 protected void dvDataSourceSubTypes_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
 }
Exemplo n.º 46
0
    protected void ODS_FlowBinding_Updated(object sender, ObjectDataSourceStatusEventArgs e)
    {
        String slaveFlowCode = ((Controls_TextBox)this.FV_FlowBinding.FindControl("tbSlaveFlow")).Text;

        ShowSuccessMessage("MasterData.Flow.Binding.UpdateBinding.Successfully", slaveFlowCode);
    }
Exemplo n.º 47
0
 protected void AddressBookDataSource_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     m_EntryID = Micajah.Common.Helper.Convert.o2i(e.ReturnValue);
 }
Exemplo n.º 48
0
 protected void ProductsDataSource_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     ProductsListView.InsertItemPosition = InsertItemPosition.None;
     ProductsListView.DataBind();
 }
 protected void CheckForException(object sender, ObjectDataSourceStatusEventArgs e)
 {
     //used to capture and handle errors from the
     //ODS control
     MessageUserControl.HandleDataBoundException(e);
 }
Exemplo n.º 50
0
 protected void ProductsDataSource_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     ProductsListView.DataBind();
 }
Exemplo n.º 51
0
 protected void CheckforException(object sender, ObjectDataSourceStatusEventArgs e)
 {
     MessageUserControl1.HandleDataBoundException(e);
 }
Exemplo n.º 52
0
 protected void odsUsersPaged_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
 }
Exemplo n.º 53
0
 protected void ODS_Vehicle_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     ShowSuccessMessage("Transportation.Vehicle.UpdateVehicle.Successfully", VehicleCode);
 }
Exemplo n.º 54
0
 protected void OwnerdvDataSource_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
 }
Exemplo n.º 55
0
 protected void ObjectDataSource1_GetAffectedRows(object sender, ObjectDataSourceStatusEventArgs e)
 {
     e.AffectedRows = Convert.ToInt32(e.ReturnValue);
 }
Exemplo n.º 56
0
 protected void SP_CMN_Branch_ALL_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
 }
Exemplo n.º 57
0
 protected void CoursesObjectDataSource_Deleted(object sender, ObjectDataSourceStatusEventArgs e)
 {
     CheckForOptimisticConcurrencyException(e, "delete");
 }
Exemplo n.º 58
0
 protected void OdsVendorMaster_Updated(object sender, ObjectDataSourceStatusEventArgs e)
 {
     MvVendorMaster.SetActiveView(MvVendorMaster.Views[0]);
     GvDepartmentMaster.DataBind();
 }
Exemplo n.º 59
0
 protected void ObjectDataSource2_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     int i = ((DataTable)e.ReturnValue).Rows.Count;
 }
Exemplo n.º 60
0
 protected void ObjectDataSource1_Selected(object sender, ObjectDataSourceStatusEventArgs e)
 {
     RmsOA.MODEL.GK_OA_WorkEvaluationModel manpowerneedModel = ((List <RmsOA.MODEL.GK_OA_WorkEvaluationModel>)e.ReturnValue)[0];
     this.ApplicationTitle = manpowerneedModel.SystemCode + "工作鉴定审批";
     this.UnitCode         = manpowerneedModel.UnitCode;
 }