Ejemplo n.º 1
0
    /// <summary>
    /// Load services label data into dropdownlist
    /// </summary>
    /// <param name="BaseMstr"></param>
    /// <param name="ActiveFilter"></param>
    /// <param name="ddl"></param>
    /// <returns></returns>
    public static CStatus LoadServiceDDL(
        CData Data,
        k_ACTIVE_ID ActiveFilter,
        DropDownList ddl)
    {
        ddl.Items.Clear();

        DataSet      dsService = null;
        CServiceData data      = new CServiceData(Data);
        CStatus      status    = data.GetServiceDS(ActiveFilter, out dsService);

        if (!status.Status)
        {
            return(status);
        }

        status = CDropDownList.RenderDataSet(
            dsService,
            ddl,
            "SERVICE_LABEL",
            "SERVICE_ID");
        if (!status.Status)
        {
            return(status);
        }

        return(new CStatus());
    }
Ejemplo n.º 2
0
    /// <summary>
    /// method
    /// loads the services into the service grid view
    /// </summary>
    /// <returns></returns>
    private CStatus LoadServices()
    {
        CServiceData service = new CServiceData(BaseMstr.BaseData);
        DataSet      ds      = null;
        CStatus      status  = service.GetServiceDS(k_ACTIVE_ID.All, out ds);

        if (!status.Status)
        {
            return(status);
        }

        Services = ds.Tables[0];
        if (Services.Rows.Count == 0)
        {
            gvService.Width = 468;
        }
        gvService.DataSource = Services;
        gvService.DataBind();
        return(new CStatus());
    }