Ejemplo n.º 1
0
    private void get_product()
    {
        DataView dv = (DataView)AccessDataSource3.Select(DataSourceSelectArguments.Empty);

        DataTable myTable = new DataTable();

        myTable        = dv.ToTable();
        okquery_string = myTable.Rows[0][3].ToString();
        okentry_string = myTable.Rows[0][4].ToString();

        authrization_type = myTable.Rows[0][1].ToString();
    }
    private string GetDescriptionById(string id)
    {
        AccessDataSource3.SelectParameters["CategoryID"].DefaultValue = id;
        DataView result = (DataView)AccessDataSource3.Select(DataSourceSelectArguments.Empty);

        if (result.Count == 0)
        {
            return(string.Empty);
        }

        return(result[0]["Description"].ToString());
    }